Hi Jules, hope you’re well.
I believe this is what is required to replicate a crash:
- set listbox->setMouseMoveSelectsRows(true);
- later on, once the listbox is visible, set listbox->setMouseMoveSelectsRows(false);
I inspected this a bit, and here’s what happens: an instance of ListBoxMouseMoveSelector mouse-listens to the listbox in its constructor, but after getting deleted with 2) the listbox tries to update its mouse listeners - modifying a freed object. So the quick fix is to add these lines at juce_ListBox:243:
~ListBoxMouseMoveSelector() {
owner.removeMouseListener(this);
}
and all is well.
Cheers
Daven