Lightroom: How to Better Understand When LR Bugs Bite? (Can we somehow activate error logging?)

  • 2
  • Question
  • Updated 7 years ago
  • Answered
Is there a way in which I could help to address some of the remaining bugs?

I relatively frequently get an "An unknown error occurred." message. Is there a way, e.g., by activating a logging mechanism, in which I could help the team to find out about the source of this error / these errors?

I recently could not reorganise a folder structure because LR told me "You cannot move a folder into one of its subfolders" (or very similar). The target folder was not a subfolder. I subsequently moved the folder I wanted to move into the target folder using Windows Explorer and then let LR "find" the folder at the new location. This appears to have worked but LR should have supported the move in the first place.

Sometimes, when I want to move a folder within LR, LR tells me that the operation didn't succeed and when I try again immediately the move works.

Obviously all the above normally works so I'm not sure whether there would be a point in filing bug reports for these.

Maybe being able to activate some logging and/or sending data to the team would help to make the above scenarios repeatable?

After recently having lost all photo orientation data, having had folder synchronisation problems (because one file somehow had its "rootFolder" become "nil" problem that caused LR to be unable to synchronise a folder was not picked up by a catalogue check / optimisation.

It seems that there are a number of bugs but without being able to gain a deeper understanding what situations in particular cause LR to choke, I doubt regular bug reports will help to track down those bugs.
Photo of TK

TK

  • 531 Posts
  • 109 Reply Likes
  • no longer confident in LR keeping catalogues sound and would like to be able to help in the detective work.

Posted 7 years ago

  • 2
Photo of Dan Tull

Dan Tull, Employee

  • 172 Posts
  • 38 Reply Likes
Official Response
The "unknown error occurred." message is typically something that can be diagnosed with a logging switch I added in 3.0 for just this purpose. Another example issue that tracebacks is good at diagnosing is the dreaded error switching modules message.

You need to pass -tracebacks to the executable as a command line argument. On windows, you can tweak the shortcut to pass this parameter. On the Mac, you could either make a .command which passes the extra parameter or run LR from Terminal.app directly.

On Windows, these messages can be viewed if you attach WinDbg or run DebugView (note these need to be running _before_ you elicit the error to capture the messages). On the Mac, Console.app can be used to view the traceback output.

Note that not all output from this command corresponds to a bug. It logs each time a Lua "throw". Some of these are errors, but some are throws used to cancel an operation and unroll the call stack.

I've used it enough at this point that I'm thinking I may try to make it easier to use this mode in some future version.

There's additional logging that can be enabled, but it's noisier and more subsystem specific in terms of its use.
Photo of TK

TK

  • 531 Posts
  • 108 Reply Likes
Thanks heaps, Dan! I'll give that a spin. I fully understand that some exception handling is perfectly normal. Hopefully, I'll be able to submit more useful bug reports.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
|> There's additional logging that can be enabled, but it's noisier and more subsystem specific in terms of its use.

Dan - Do tell!
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
|> I've used it enough at this point that I'm thinking I may try to make it easier to use this mode in some future version.

It's now a built-in option when creating Lightroom startup batch file using SQLiteroom.
Photo of TK

TK

  • 531 Posts
  • 109 Reply Likes
Dan, just a quick note to let you know that I've diligently ran DebugView and started LR with the respective switch.

Glad to report that I didn't get any "Unknown Error" messages since then. I caught a few others. Please let me know if you are interested in the (very short) logs (not sure what they would be worth to you without the respective catalogs and runtime context).

I could post what I've got here or send it to you via email.

P.S.: I have a hunch that the "Unknown Error" messages I've seen in the past were probably memory related. I think I ran a number of programs in the background. I normally start LR on its own making sure that I don't have any background applications/processes running but I reckon when these error messages popped up I didn't initially plan to use LR and didn't want to shut everything down first.

I'll keep watching, but so far I haven't seen the "Unknown Error" message yet again (LR 3.4).
Photo of Henry Seiden

Henry Seiden

  • 3 Posts
  • 0 Reply Likes
Way too deep for this newbie!!!
Photo of Henry Seiden

Henry Seiden

  • 3 Posts
  • 0 Reply Likes
Hi TK, Dan:

Can you explain in newbie-like language, preferably step-by-step, what to do to pass the information in this LR3.4 bug to where it can be seen (Console Log?) and hopefully properly reported, then fixed?

Is this a vain hope of mine to have a clear trouble reporting info flow? I reported a bug similar to the one you speak of (see screenshot) and can't troubleshoot it myself further without information. Your info is waaaay over my head. Simple shooter and user only.

Mine happens reliably when uploading Web Page of some 49-50 images, but not 30 different images or less. The error is unspecific and has not occurred before installing 3.4 (the very same set of images were once uploaded correctly).

This whole process of reporting is quite weird too if I may say so-- sign in, opt in to photoshop.com, upload a screenshot to an amazon site(!) instead of the site I was forced to signed to, etc.

Wow!

H

Photo of Dan Tull

Dan Tull, Employee

  • 172 Posts
  • 38 Reply Likes
I've got some instructions I can send. It's slightly involved, but the instructions are fairly easy to follow.
Photo of Dan Tull

Dan Tull, Employee

  • 172 Posts
  • 38 Reply Likes
You know, for some reason I've tended to only send this info privately, but it's nothing people can't figure out from the above, so here it is (in more step-by-step form):

Windows
1. Right click the Lightroom icon you use to launch on the desktop and choose Copy from the menu.
2. Right click the Desktop and choose Paste from the menu.
3. Right click the new icon and choose Properties... from the menu.
4. In the Target field of the properties dialog append -tracebacks (separated from the path by a space):
(It will look like this at the end when you're done (leave the rest of the path alone): lightroom.exe" -tracebacks)
5. In the general tab, you might also want to change the name so you can easily visually distinguish this new icon from the original (we'll delete it when we're done).
6. Go to this site in your browser: http://technet.microsoft.com/en-us/sy...
7. On the right hand side of the page, click the "Run DebugView" link (it's safe – it's just a debug output viewer from Microsoft)
8. Click through the Eula if necessary.
9. With DebugView running, double click the new icon we created in steps 1-5.
10. Repeat the steps in Lightroom that cause the error message or hang that you are seeing.
11. Save the output. You can either highlight and copy/paste or choose "Save as..." from the menu to save the output to a file.

Mac
1. In Finder, navigate to the Utilities subfolder of the Applications folder (Command + Shift + U).
2. Double Click Terminal.app
3. Paste the following text: '/Applications/Adobe Lightroom 3.app/Contents/MacOS/Adobe Lightroom 3' -tracebacks
(Note that this may be different for some versions of LR, like RC/Beta releases, etc)
4. Press enter to start.
5. Repeat the steps in Lightroom that cause the error message or hang that you are seeing.
6. Use the Shell -> Export Text As... menu item (Command + S) to save the output to a file (or select it for copy and paste).

Note that the output this produces requires the exact build number of LR that emitted it to be translated into a stack trace with source file names and line numbers.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
Dan, thank you for this. I just used it for the first time today - it worked like magic on the first try, and is useful not only for collecting Lightroom crash dumps, but also to help debug plugin catalog contentions, schema update functions, and other such stuff... - thanks again, Rob.
Photo of Dan Tull

Dan Tull, Employee

  • 172 Posts
  • 38 Reply Likes
I hadn't thought of that. Maybe I should get it into the SDK docs. It's easy to forget how hard it can be to debug release build issues without such tips.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
I replicated on SDK forum for the mean time: http://forums.adobe.com/thread/925598