-
Notifications
You must be signed in to change notification settings - Fork 345
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
Insert to bimaps left instead of directly to avoid crashes in caching #734
Conversation
What worries me is that the previous version is still supposed to work (not crash) according to the doc: it just adds a call to a copy constructor. Could you find an explanation for the crash? |
I cannot explain what produces the crash inside Boost although what I can do is share the following backtrace
|
I still have issues with this change:
|
I reverted this change, because:
In the statement, "However" refers to copying from a std::map:
Sorry, but the real bug is probably elsewhere, and it's more probably a race condition |
Probably it is, although I don't really know how exactly I was reproducing it many times while trying to test #733 in RB-2.5. |
This looks 90% like a race condition, as with many cache-related bugs:
|
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:
PR Description
What type of PR is this? (Check one of the boxes below)
What does this pull request do?
With Boost 1.76.0 (at least) Natron crashes when a cache run is triggered. AFAICT the LRU insertion of keys leaves the bimaps in a corrupted state and when the entries have to be iterated the crash is reproduced. Accourding to the Boost bimap docs inserting to the left map of a bimap is recommended instead of doing it directly, at least an extra call is avoided. By doing so I do not longer encounter the crash. The recomendation is valid from 1.72.0, I have yet to see if previous versions accept inserting to the left map.
Show a few screenshots (if this is a visual change)
N/A.
Have you tested your changes (if applicable)? If so, how?
Built Natron, laid out a nodegraph and hit play to preview it.
Futher details of this pull request
N/A.