-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
crash during mix disabling quantize #11709
Comments
I wrote a controller js hack to spam the quantize button and I reproduced the crash -- I'll see if I can get any more info |
the mark is becoming invalid during the sort operation fuller backtrace:
|
the operator< is where the crash actually happens: rhs->getSamplePosition() |
discussion on mastodon, it looks like the QSharedPointer is invalid, not the thing it points to: https://furry.engineer/@huxley/110651195121630257 |
This looks like a race condition. When using std::sort the operator> must be reliable in a way that When you change two hotcues from the controller thread it may happen that the second one changes when the first one has triggered a sorting in the main thread. I can reproduce the crash when returning a random value form the operator> overload. Conclusion, the code must store the positions as value and not as CO pointers. |
I confused This comparison operator should better be removed to prevent such mistakes based on false assumptions. Naively comparing these instances could cause many issues. |
...otherwise you could have the idea to store it in a |
This fixes the crash due to changing sort keys reported in mixxxdj#11709
This fixes the crash due to changing sort keys reported in mixxxdj#11709
Fix crash disabling quantize Fixes #11709
fixed in #11744 |
Bug Description
Twice now (in many hours of DJing) I have had a crash when disabling quantize on deck 1. It is very, very hard to reproduce.
so when I disabled quantize it updated the cues... and somewhere in there it got unhappy. This was a release build so no line numbers. Here is the only sort in that function: https://github.com/mixxxdj/mixxx/blob/main/src/widget/woverview.cpp#L455
I am wondering if somehow the marks became invalid? Could updatecues be called from more than one thread?
My only theory is that m_marksToRender is somehow changing during the call -- I don't see how else a simple qlist sort would crash. So for now I'm dropping a mutex in updateCues. (I don't see a simultaneous call to updatecues in the backtrace, there are no other interesting threads).
Version
HEAD
OS
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: