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

Crash when Carla Instrument is removed #5743

Closed
tresf opened this issue Oct 29, 2020 · 0 comments · Fixed by #5808
Closed

Crash when Carla Instrument is removed #5743

tresf opened this issue Oct 29, 2020 · 0 comments · Fixed by #5808

Comments

@tresf
Copy link
Member

tresf commented Oct 29, 2020

Removing a Carla track may cause LMMS to segfault. This was reproducible on Windows 10 using the mingw 64-bit build as well as the MSVC build.

Some notes from #5713 which originally identified this bug.

@PhysSong wrote:

Reproduced with Carla 2.2 and MSVC build of LMMS. It seems like Carla crashed in CarlaEngine::ProtectedData::deletePluginsAsNeeded() which is indirectly called from CarlaInstrument::timerEvent(). Inspecting memory and registers suggests there might be some use after free conditions.
2.1.1 Also crashes in CarlaBackend::CarlaEngineNative::uiIdle(), but less frequently.
...
I found that it's related to the (improperly implemented) InstrumentTrackWindow caching which causes a temporary CarlaInstrumentView to be instantiated after the existing one is deleted. That will be deleted after CarlaInstrument, and timer events may kick in between those two events. That results in CarlaInstrumentView::timerEvent() using a deleted handle.

Tagging for windows, however the bug may exist on other platforms.

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

Successfully merging a pull request may close this issue.

1 participant