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

Surge Reaper Mac VST3 Crash #6558

Closed
baconpaul opened this issue Aug 21, 2022 · 0 comments · Fixed by #6559
Closed

Surge Reaper Mac VST3 Crash #6558

baconpaul opened this issue Aug 21, 2022 · 0 comments · Fixed by #6559
Labels
Bug Report Item submitted using the Bug Report template Host Specific Issues related to specific host(s) or host features Resolved Issues that have been resolved, but not merged - usually only used directly after a release

Comments

@baconpaul
Copy link
Collaborator

Reported by discord user 0xk1tt3n in march and we never made it to GitHub for the 11 milestone :(

reaper on mac crash:
Open REAPER, open the Surge GUI dialog, open the Surge preset dropdown menu, press Esc to close the Surge GUI dialog with the menu still open, click any menu item, crash.
not sure if it's reaper or surge at fault

totally confirmed at head with reaper 6.66 on macOS

Here's the thread

Thread 0 Crashed:: reaper Dispatch queue: com.apple.main-thread
0   ???                           	       0x2a935fc48 typeinfo for juce::Component::Positioner + 0
1   Surge XT                      	       0x2a780d7dc Surge::Widgets::PatchSelector::showClassicMenu(bool)::$_14::operator()(int) const + 44
2   Surge XT                      	       0x2a780d790 decltype(static_cast<Surge::Widgets::PatchSelector::showClassicMenu(bool)::$_14&>(fp)(static_cast<int>(fp0))) std::__1::__invoke<Surge::Widgets::PatchSelector::showClassicMenu(bool)::$_14&, int>(Surge::Widgets::PatchSelector::showClassicMenu(bool)::$_14&, int&&) + 36
3   Surge XT                      	       0x2a780d73c void std::__1::__invoke_void_return_wrapper<void, true>::__call<Surge::Widgets::PatchSelector::showClassicMenu(bool)::$_14&, int>(Surge::Widgets::PatchSelector::showClassicMenu(bool)::$_14&, int&&) + 52
4   Surge XT                      	       0x2a780d6fc std::__1::__function::__alloc_func<Surge::Widgets::PatchSelector::showClassicMenu(bool)::$_14, std::__1::allocator<Surge::Widgets::PatchSelector::showClassicMenu(bool)::$_14>, void (int)>::operator()(int&&) + 52
5   Surge XT                      	       0x2a780c284 std::__1::__function::__func<Surge::Widgets::PatchSelector::showClassicMenu(bool)::$_14, std::__1::allocator<Surge::Widgets::PatchSelector::showClassicMenu(bool)::$_14>, void (int)>::operator()(int&&) + 52
6   Surge XT                      	       0x2a7eab448 std::__1::__function::__value_func<void (int)>::operator()(int&&) const + 84
7   Surge XT                      	       0x2a7eab39c std::__1::function<void (int)>::operator()(int) const + 48
8   Surge XT                      	       0x2a7eab31c void juce::NullCheckedInvocation::invoke<std::__1::function<void (int)>, int&, 0>(std::__1::function<void (int)>&&, int&) + 72
9   Surge XT                      	       0x2a7eab150 juce::ModalComponentManager::Callback* juce::ModalCallbackFunction::create<std::__1::function<void (int)>&>(std::__1::function<void (int)>&)::Callable::modalStateFinished(int) + 48
10  Surge XT                      	       0x2a7c8d890 juce::ModalComponentManager::handleAsyncUpdate() + 260
11  Surge XT                      	       0x2a79d2e48 juce::AsyncUpdater::AsyncUpdaterMessage::messageCallback() + 68
12  Surge XT                      	       0x2a79dcbd4 juce::MessageQueue::deliverNextMessage() + 112
13  Surge XT                      	       0x2a79dcb2c juce::MessageQueue::runLoopCallback() + 64
14  Surge XT                      	       0x2a79dc7dc juce::MessageQueue::runLoopSourceCallback(void*) + 24
15  CoreFoundation                	       0x1a2635044 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
16  CoreFoundation                	       0x1a2634f90 __CFRunLoopDoSource0 + 208
17  CoreFoundation                	       0x1a2634cf4 __CFRunLoopDoSources0 + 368
18  CoreFoundation                	       0x1a2633610 __CFRunLoopRun + 828
19  CoreFoundation                	       0x1a2632b34 CFRunLoopRunSpecific + 600

Looks like the showClassicMenu callback isn't protecting against itself disappearing underneath it. P{probably need a juce safe pointer.

@baconpaul baconpaul added the Bug Report Item submitted using the Bug Report template label Aug 21, 2022
@baconpaul baconpaul added this to the Surge XT 1.1.1 milestone Aug 21, 2022
@mkruselj mkruselj added the Host Specific Issues related to specific host(s) or host features label Aug 21, 2022
baconpaul added a commit to baconpaul/surge that referenced this issue Aug 21, 2022
Escape-closing surge with the patch menu open would segv because we didn't
do the safe pointer thing. We really need to do that everywhere (See
Closes surge-synthesizer#6558
baconpaul added a commit that referenced this issue Aug 21, 2022
Escape-closing surge with the patch menu open would segv because we didn't
do the safe pointer thing. We really need to do that everywhere (See
Closes #6558
baconpaul added a commit to baconpaul/surge that referenced this issue Aug 22, 2022
We had a bunch of lambdas which referenced 'this' rather than
'that = SafePointer' for callbacks on timers and I think
perhaps one of those is what caused the very occasional crash-on
close in reaper reported in surge-synthesizer#6558 so review them and push a change.

Keep the issue open for a bit while we look for crashes tho
@baconpaul baconpaul added the Resolved Issues that have been resolved, but not merged - usually only used directly after a release label Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Item submitted using the Bug Report template Host Specific Issues related to specific host(s) or host features Resolved Issues that have been resolved, but not merged - usually only used directly after a release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants