-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Updating the XMP data of same image concurrently aborts the entire process. #230
Comments
@CeNiEi thank you for the great test case. I'll look into it in next few days. |
Good news: I can reliably reproduce this. See draft PR #232. Still working out where the crash occurs. |
… encountered when closing a file Fixes crash reported in #230.
@CeNiEi Good news: I've found a fix for the issue and it is in Bad news: The crate now exceeds the maximum upload size on crates.io and my attempt to fix that problem has failed. I have to step away from the computer for a while. Will try again to publish a release when I get a moment, possibly later today; more likely sometime tomorrow. |
@scouten-adobe Thanks a lot for the quick resolution.. Although while trying to stress test this, i might have stumbled upon another issue. I tried to change xmp data of the same file from different
I am not sure what to make of these errors, but as you can see, it seems somewhere along the line, the file itself got deleted. I checked on my disk too, the file is not there.. I am doing these tests on a JPEG which do not have a sidecar XMP file. I'll try to replicate this on my end, and report back if I make progress... Anyways Thanks for the help 👍 |
@CeNiEi from what I can tell, the underlying C++ code is writing a new copy of the file in temporary space and then swapping out the files (deleting and renaming in quick succession?) on the If the old and new files aren't in the expected locations, then any of the errors you've described are likely. Those errors did occur in my own testing. Now that we've made it not crash, I don't think there's a lot more we can do from the Rust side about this. If simultaneous writes to the same file are an important use case, I would encourage you to file an issue against the C++ XMP Toolkit on which this crate is based. |
@scouten-adobe got it 👍 thanks for the help .... |
@CeNiEi figured out the crate size issue just now. Just released version 1.9.0, which includes this fix. Based on your feedback, I'm closing this issue as fixed. If you find anything new that's not working, please open a new issue or reopen this one. Thanks again for the excellent repro case. That made it a lot easier for me to fix. |
The following code, which tries to update xmp data of the SAME file concurrently, will sometimes throw SIGABRT with
fatal runtime error: Rust cannot catch foreign exceptions
.I get that it happens when two different instances are trying to write the data to the same file.. but it will be much better to handle the raised c++ exception and return an appropriate rust error.
The text was updated successfully, but these errors were encountered: