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

App fails to start when USB misconfigured #6614

Closed
MilesParker opened this issue Sep 15, 2022 · 8 comments
Closed

App fails to start when USB misconfigured #6614

MilesParker opened this issue Sep 15, 2022 · 8 comments
Labels
Bug Report Item submitted using the Bug Report template Standalone Issues pertaining to Surge standalone application and CLI (command line interface)
Milestone

Comments

@MilesParker
Copy link

Bug Description:
After connecting to and selecting a (somewhat flakey) external usb device then quitting, removing that connection and restarting, got a hard crash (even after plugging external speakers back in.

Surge XT Version
1.1.0.012f6ce

  • Version:
  • Plugin Type: [VST2, VST3, AU]
  • Bitness: [32-bit or 64-bit]

Reproduction Steps:
Will be hard to reproduce probably, but this was my path:

  1. Selected a (somewhat flakey) external usb device in options.
  2. Quit.
  3. Unplugged from external audio jack (not device itself) -- perhaps this is what created bad state?
  4. On launch, hard crash. Removing that connection and restarting and changing sound options in system prferences did not fix.

Workaround

I was able to fix by going into /Users/{username}/Library/Application\ Support/Surge\ XT.settings and just deleting the VALUE audioSetup::DEVICESETUP (but most users wouldn't know to do this).

Computer Information (please complete the following!):

  • OS: Mac 12.6
  • Host: Stand alone

Additional Information:

Relevant trace:

Thread 5 Crashed:: USB Audio
0 Surge XT 0x10a3ee417 SurgeSynthProcessor::processBlock(juce::AudioBuffer&, juce::MidiBuffer&) + 1223
1 Surge XT 0x10a756685 juce::AudioProcessorPlayer::audioDeviceIOCallback(float const**, int, float**, int, int) + 1733
2 Surge XT 0x10a3e3046 juce::StandalonePluginHolder::CallbackMaxSizeEnforcer::audioDeviceIOCallback(float const**, int, float**, int, int) + 134
3 Surge XT 0x10a9c151c juce::AudioDeviceManager::audioDeviceIOCallbackInt(float const**, int, float**, int, int) + 492
4 Surge XT 0x10a9cc243 juce::CoreAudioClasses::AudioIODeviceCombiner::run() + 1395
5 Surge XT 0x10a6d114a juce::Thread::threadEntryPoint() + 282
6 Surge XT 0x10a7044da juce::threadEntryProc(void*) + 26
7 libsystem_pthread.dylib 0x7ff80279f4e1 _pthread_start + 125
8 libsystem_pthread.dylib 0x7ff80279af6b thread_start + 15

Thread 5 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007000004aea98 rcx: 0x0000000000000000 rdx: 0x00007ff6d3900000
rdi: 0x0000000000000000 rsi: 0x00007000004ae5f0 rbp: 0x00007000004aead0 rsp: 0x00007000004ae5d0
r8: 0x0000000000000002 r9: 0x0000000000000003 r10: 0x0000000000000000 r11: 0x0000000000000000
r12: 0x00007ff725038a80 r13: 0x0000000000000000 r14: 0x00007ff7280c8000 r15: 0x00000000ffffffff
rip: 0x000000010a3ee417 rfl: 0x0000000000010246 cr2: 0x0000000000000000

@MilesParker MilesParker added the Bug Report Item submitted using the Bug Report template label Sep 15, 2022
@baconpaul
Copy link
Collaborator

Thanks

My bet is the juce audio manager interacts with the flaky system to give us a bus we don't expect but we aren't defensive about a null output bus properly in processBlock and blammo. Probably just a defensive if there.

@MilesParker
Copy link
Author

Yeah not familiar with low level audio handling here, but that seems right to me. BTW, I note that when I change audio settings, they often don't reflect until I restart.

@mkruselj mkruselj added the Standalone Issues pertaining to Surge standalone application and CLI (command line interface) label Nov 7, 2022
@mkruselj mkruselj added this to the Surge XT 1.1.3 milestone Nov 7, 2022
@mkruselj
Copy link
Collaborator

mkruselj commented Apr 5, 2023

@MilesParker Can you try to reproduce this issue with the latest Surge XT nightly? Thanks!

@baconpaul
Copy link
Collaborator

Yeah I bet this is 4dcd62c / #6885 exactky

@mkruselj
Copy link
Collaborator

mkruselj commented Apr 5, 2023

Yup my thoughts exactly!

@MilesParker
Copy link
Author

Yes that sounds exactly like the sequence that was happening for me -- I will verify but won't be able to get to it until tmrw or Friday. Apologies!

@MilesParker
Copy link
Author

Just FYI I have not seen this with any new builds.

@baconpaul
Copy link
Collaborator

baconpaul commented Jun 7, 2023

Excellent let me close this then. Thanks for getting back to us!

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 Standalone Issues pertaining to Surge standalone application and CLI (command line interface)
Projects
None yet
Development

No branches or pull requests

3 participants