-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Reported by @douglasdgi on Discord:
When you delete an instrument track with any knob connected to any controller, LMMS crashes (in
Knob::friendlyUpdate
, according to gdb)
It's related to the stupid InstrumentTrackWindow
caching system.
- The
InstrumentTrackView
destructor calls
InstrumentTrackView::freeInstrumentTrackWindow()
, and it callsInstrumentTrackWindow::updateInstrumentView()
. the function deletes and then re-instantiatesm_instrumentView
. It results in deleting the instrument before deleting the view. - An
InstrumentTrackWindow
instance may still exist after the corresponding track is deleted, making the knob still updated after the model is deleted. Since the mixer thread handles value changes from controllers, the slot might be invoked after the sender(model) is deleted.
It seems like the current caching system is doing unnecessary jobs and causes some bugs like #3623 as well as this one.
Anyway, Knob::friendlyUpdate
should check for the model and do nothing if it's null or already deleted.