Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Focus Point stops with an error message on every first call #189

Closed
capricorn8 opened this issue Jan 5, 2025 · 1 comment
Closed

Comments

@capricorn8
Copy link
Collaborator

Starting with LrC 14 on Windows, the plug-in stops with an error message in MogrifyUtils on every first call for an image.
Subsequent calls will succeed in displaying the focus point.
Moving to the next image, same story.

@capricorn8
Copy link
Collaborator Author

capricorn8 commented Jan 5, 2025

Analysis and proposal for fix by John R. Ellis (LR SDK luminary on Adobe forums) in personal communication:

"The root cause of the issue is poorly designed concurrency architecture of the Lightroom SDK.

requestJpegThumbnail() appears to call the callback synchronously if the requested thumbnail is in an internal cache. Otherwise, it returns immediately and calls the callback asynchronously after the thumbnail is generated and loaded into the cache, which could take anywhere from 0.01 seconds to a couple seconds if the photo has to be re-rendered.

In order to make sure the thumbnail has been written to file before proceeding with the next steps, exportToDisk() should busy wait until the callback is invoked.

photo:getRawMetadata() has to be executed outside the callback, because this method "yields" which is not allowed in a no-yielding context (asynchronous call of callback)."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant