-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Removing a SampleTCO while it plays will crash lmms (master and latest rc) #4980
Comments
It crashes only with the middle mouse button. If I use the context menu, it doesn't crash. |
Could you test the latest |
@PhysSong It is probably a race condition since I had to do that a couple of times in order to reproduce it. This is the crash's stacktrace:
The problemsharedObject::unref might delete |
I found that diff --git a/src/core/Track.cpp b/src/core/Track.cpp
index 7a04ded95..eb8ebb3dc 100644
--- a/src/core/Track.cpp
+++ b/src/core/Track.cpp
@@ -422,7 +422,9 @@ void TrackContentObjectView::remove()
// delete ourself
close();
- m_tco->deleteLater();
+ Engine::mixer()->requestChangeInModel();
+ delete m_tco;
+ Engine::mixer()->doneChangeInModel();
} #4982 looks fine, and I don't mind if any of them is accepted. |
I think that your solution might actually be better, but for some reason, lmms still crashes with this solution; I need the research ti fouther. We also have a problem with this function being called twice in a row; that will simply cause a double-free. |
OK, for now, I'm going to merge it for stable-1.2. The recording branch has a better fix for that and will target master. |
@Reflexe is there a reason why you reopened this? |
Steps to reproduce
Please verify it so I'll work on a solution.
The text was updated successfully, but these errors were encountered: