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

SAIL - Version 2.0.beta3 crashes quite often on macOS #358

Open
rubyglow opened this issue Jan 21, 2023 · 17 comments
Open

SAIL - Version 2.0.beta3 crashes quite often on macOS #358

rubyglow opened this issue Jan 21, 2023 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@rubyglow
Copy link

Hi Benjamin

I've had Sail in my template for a long time and find it extremely useful. Thanks for that! I switched to the 2.0.beta3 update in the library when it came a month ago, and since then Sail is crashing Rack hard.

It doesn't crash immediately on startup, but rather after maybe 1, 5 or 20 minutes use. It's unpredictable, it's not only when I actively use the Sail mapping, it's just out of the blue with no discernable reason or pattern.

There's no doubt it's Sail causing the crash. Happens with nearly empty patches and it's always Sail crashing in the log. If I disable/bypass Sail in the patch the crashing stops.

Plugin: Stoermelder-P1
Version: 2.0.beta3
OS: macOS 10.12.6, Intel
Rack: Pro version 2.2.2, running standalone.

Rack log:

[274.865 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 11. Stack trace:
15: Rack(fatalSignalHandler(int)+27)
14: libsystem_platform.dylib(_sigtramp+26)
13: ???(0x0+4294967297)
12: plugin.dylib(StoermelderPackOne::Sail::SailModule::process(rack::engine::Module::ProcessArgs const&)+734)
11: libRack.dylib(rack::engine::Module::doProcess(rack::engine::Module::ProcessArgs const&)+143)
10: libRack.dylib(rack::engine::Engine::stepBlock(int)+1699)
9: libRack.dylib(rack::audio::Device::processBuffer(float const*, int, float*, int, int)+325)
8: libRack.dylib(rack::RtAudioDevice::rtAudioCallback(void*, void*, unsigned int, double, unsigned int, void*)+143)
7: libRack.dylib(RtApiCore::callbackEvent(unsigned int, AudioBufferList const*, AudioBufferList const*)+335)
6: libRack.dylib(callbackHandler(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*)+21)
5: CoreAudio(HALC_ProxyIOContext::IOWorkLoop()+5290)
4: CoreAudio(HALC_ProxyIOContext::IOThreadEntry(void*)+128)
3: CoreAudio(HALB_IOThread::Entry(void*)+75)
2: libsystem_pthread.dylib(_pthread_body+180)
1: libsystem_pthread.dylib(_pthread_body+0)
0: libsystem_pthread.dylib(thread_start+13)

Mac crash report, crash is in thread 4:

Process:               Rack [32596]
Path:                  /Applications/VCV Rack 2 Pro.app/Contents/MacOS/Rack
Identifier:            com.vcvrack.rack
Version:               2.2.2 (2.2.2)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Rack [32596]
User ID:               501

Date/Time:             2023-01-21 11:10:03.315 +0100
OS Version:            Mac OS X 10.12.6 (16G2136)
Report Version:        12
Anonymous UUID:        211F012D-B8AD-D5AA-ECB5-25E992615EB5

Sleep/Wake UUID:       C4058196-ADA2-42B3-AA44-37B9FAC9398A

Time Awake Since Boot: 160000 seconds
Time Since Wake:       4200 seconds

System Integrity Protection: enabled

Crashed Thread:        4  com.apple.audio.IOThread.client

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff9aed434a mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff9aed3797 mach_msg + 55
2   com.apple.framework.IOKit     	0x00007fff87585c9d io_connect_method + 375
3   com.apple.framework.IOKit     	0x00007fff8750b292 IOConnectCallMethod + 336
4   com.apple.framework.IOKit     	0x00007fff8750b459 IOConnectCallStructMethod + 56
5   com.apple.IOAccelerator       	0x00007fff94306c04 IOAccelContextSubmitDataBuffersExt2 + 270
6   libGPUSupportMercury.dylib    	0x00007fff93285390 gpusSubmitDataBuffers + 156
7   com.apple.GeForceGLDriver     	0x00007fff80e2a867 0x7fff80b1f000 + 3192935
8   com.apple.GeForceGLDriver     	0x00007fff80e2abfa gldPresentFramebufferData + 407
9   GLEngine                      	0x00000001206794f1 glSwap_Exec + 97
10  com.apple.opengl              	0x00007fff8a577126 CGLFlushDrawable + 66
11  com.apple.AppKit              	0x00007fff8338bd7b -[NSOpenGLContext flushBuffer] + 27
12  libRack.dylib                 	0x0000000106e6f5d7 swapBuffersNSGL + 215
13  libRack.dylib                 	0x0000000106df1e05 rack::window::Window::step() + 1941
14  libRack.dylib                 	0x0000000106df1658 rack::window::Window::run() + 40
15  com.vcvrack.rack              	0x0000000106c99f1c main + 3820
16  libdyld.dylib                 	0x00007fff9adad235 start + 1

Thread 1:
0   libsystem_kernel.dylib        	0x00007fff9aed434a mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff9aed3797 mach_msg + 55
2   com.apple.audio.midi.CoreMIDI 	0x00000001076c39c1 XServerMachPort::ReceiveMessage(int&, void*, int&) + 107
3   com.apple.audio.midi.CoreMIDI 	0x00000001076d9ba9 MIDIProcess::RunMIDIInThread() + 105
4   com.apple.audio.midi.CoreMIDI 	0x00000001076e6a9a XThread::RunHelper(void*) + 10
5   com.apple.audio.midi.CoreMIDI 	0x00000001076ea053 CAPThread::Entry(CAPThread*) + 85
6   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
7   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
8   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 2:
0   libsystem_kernel.dylib        	0x00007fff9aedbeb6 __select + 10
1   plugin.dylib                  	0x00000001135ea116 SocketReceiveMultiplexer::Implementation::Run() + 1366
2   plugin.dylib                  	0x00000001135b76fe void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (SerialOsc::*)(), SerialOsc*> >(void*) + 62
3   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
4   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
5   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 3:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	0x00007fff9aed434a mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff9aed3797 mach_msg + 55
2   com.apple.CoreFoundation      	0x00007fff855a8b44 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation      	0x00007fff855a7fd1 __CFRunLoopRun + 1361
4   com.apple.CoreFoundation      	0x00007fff855a7824 CFRunLoopRunSpecific + 420
5   com.apple.AppKit              	0x00007fff831e9f02 _NSEventThread + 205
6   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
7   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
8   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 4 Crashed:: com.apple.audio.IOThread.client
0   libRack.dylib                 	0x0000000106d984e4 rack::app::ParamWidget::getParamQuantity() + 4
1   plugin.dylib                  	0x000000011662121e StoermelderPackOne::Sail::SailModule::process(rack::engine::Module::ProcessArgs const&) + 734
2   libRack.dylib                 	0x0000000106ddcaef rack::engine::Module::doProcess(rack::engine::Module::ProcessArgs const&) + 143
3   libRack.dylib                 	0x0000000106dd5673 rack::engine::Engine::stepBlock(int) + 1699
4   libRack.dylib                 	0x0000000106d01ba5 rack::audio::Device::processBuffer(float const*, int, float*, int, int) + 325
5   libRack.dylib                 	0x0000000106d3987f rack::RtAudioDevice::rtAudioCallback(void*, void*, unsigned int, double, unsigned int, void*) + 143
6   libRack.dylib                 	0x000000010722893f RtApiCore::callbackEvent(unsigned int, AudioBufferList const*, AudioBufferList const*) + 335
7   libRack.dylib                 	0x0000000107227935 callbackHandler(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*) + 21
8   com.apple.audio.CoreAudio     	0x00007fff8510f8ce HALC_ProxyIOContext::IOWorkLoop() + 5290
9   com.apple.audio.CoreAudio     	0x00007fff8510e264 HALC_ProxyIOContext::IOThreadEntry(void*) + 128
10  com.apple.audio.CoreAudio     	0x00007fff8510dfa3 HALB_IOThread::Entry(void*) + 75
11  libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
12  libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
13  libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 5:
0   libsystem_kernel.dylib        	0x00007fff9aedbf46 __semwait_signal + 10
1   libsystem_c.dylib             	0x00007fff9ae62b72 nanosleep + 199
2   libc++.1.dylib                	0x00007fff9993265b std::__1::this_thread::sleep_for(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > const&) + 80
3   plugin.dylib                  	0x0000000113f7c680 HotTuna::pitch_detect_stride() + 112
4   plugin.dylib                  	0x0000000113f7cdfe void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (HotTuna::*)(), HotTuna*> >(void*) + 62
5   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 6:
0   libsystem_kernel.dylib        	0x00007fff9aedbbf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff9afc77fa _pthread_cond_wait + 712
2   libc++.1.dylib                	0x00007fff998f14cd std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47
3   plugin.dylib                  	0x000000010db868e5 bogaudio::ChannelAnalyzer::work() + 1125
4   plugin.dylib                  	0x000000010db8efce void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (bogaudio::ChannelAnalyzer::*)(), bogaudio::ChannelAnalyzer*> >(void*) + 62
5   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 7:
0   libsystem_kernel.dylib        	0x00007fff9aedbbf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff9afc77fa _pthread_cond_wait + 712
2   libc++.1.dylib                	0x00007fff998f14cd std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47
3   libRack.dylib                 	0x0000000106dda522 rack::engine::Engine_fallbackRun(rack::engine::Engine*) + 226
4   libRack.dylib                 	0x0000000106ddb18c void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(rack::engine::Engine*), rack::engine::Engine*> >(void*) + 44
5   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 8:
0   libsystem_kernel.dylib        	0x00007fff9aedc44e __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff9afc648e _pthread_wqthread + 1023
2   libsystem_pthread.dylib       	0x00007fff9afc607d start_wqthread + 13

Thread 9:
0   libsystem_kernel.dylib        	0x00007fff9aedc44e __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff9afc648e _pthread_wqthread + 1023
2   libsystem_pthread.dylib       	0x00007fff9afc607d start_wqthread + 13

Thread 10:
0   libsystem_kernel.dylib        	0x00007fff9aedc44e __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff9afc6621 _pthread_wqthread + 1426
2   libsystem_pthread.dylib       	0x00007fff9afc607d start_wqthread + 13

Thread 4 crashed with X86 Thread State (64-bit):
  rax: 0x0000600000017f70  rbx: 0x0000000000000000  rcx: 0x0000608000321720  rdx: 0x0000000000000000
  rdi: 0xbadd838df98ebead  rsi: 0x00007000097e9b10  rbp: 0x00007000097e9a30  rsp: 0x00007000097e9a30
   r8: 0x00007f8baac9bd88   r9: 0x00007f8baac9bf88  r10: 0x0000000000000010  r11: 0x0000000000000001
  r12: 0x00007f8baa4d55c0  r13: 0x0000000000000013  r14: 0x00007000097e9b10  r15: 0x00007000097e9b10
  rip: 0x0000000106d984e4  rfl: 0x0000000000000282  cr2: 0x00007fff9994634b
  
Logical CPU:     0
Error Code:      0x020000b8
Trap Number:     133
@stoermelder stoermelder self-assigned this Jan 21, 2023
stoermelder added a commit that referenced this issue Jan 21, 2023
@stoermelder stoermelder added the bug Something isn't working label Jan 21, 2023
@stoermelder
Copy link
Owner

Thanks for reporting. I commited a possible fix a few moments ago. It would be great if you can check the latest development build if the crashes are gone.

@rubyglow
Copy link
Author

Thanks Benjamin! You mean build it myself from the v2-dev branch, right? Because I don't see any downloads.

@stoermelder
Copy link
Owner

You can get an automatic build here:
https://github.com/stoermelder/vcvrack-packone/releases/tag/Nightly

@rubyglow
Copy link
Author

Ah, yes, got it. Will test right away...

@rubyglow
Copy link
Author

No crashes so far, the problem seems fixed. Thanks a bunch!

@rubyglow
Copy link
Author

Damn, got a crash again, when actively using the Sail mapping, but it took a lot longer than before.

[1965.214 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 11. Stack trace:
15: Rack(fatalSignalHandler(int)+27)
14: libsystem_platform.dylib(_sigtramp+26)
13: ???(0x0+0)
12: plugin.dylib(StoermelderPackOne::Sail::SailModule::process(rack::engine::Module::ProcessArgs const&)+313)
11: libRack.dylib(rack::engine::Module::doProcess(rack::engine::Module::ProcessArgs const&)+143)
10: libRack.dylib(rack::engine::Engine::stepBlock(int)+1699)
9: libRack.dylib(rack::audio::Device::processBuffer(float const*, int, float*, int, int)+325)
8: libRack.dylib(rack::RtAudioDevice::rtAudioCallback(void*, void*, unsigned int, double, unsigned int, void*)+143)
7: libRack.dylib(RtApiCore::callbackEvent(unsigned int, AudioBufferList const*, AudioBufferList const*)+335)
6: libRack.dylib(callbackHandler(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*)+21)
5: CoreAudio(HALC_ProxyIOContext::IOWorkLoop()+5290)
4: CoreAudio(HALC_ProxyIOContext::IOThreadEntry(void*)+128)
3: CoreAudio(HALB_IOThread::Entry(void*)+75)
2: libsystem_pthread.dylib(_pthread_body+180)
1: libsystem_pthread.dylib(_pthread_body+0)
0: libsystem_pthread.dylib(thread_start+13)

--------------

Process:               Rack [33475]
Path:                  /Applications/VCV Rack 2 Pro.app/Contents/MacOS/Rack
Identifier:            com.vcvrack.rack
Version:               2.2.2 (2.2.2)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Rack [33475]
User ID:               501

Date/Time:             2023-01-21 16:08:35.111 +0100
OS Version:            Mac OS X 10.12.6 (16G2136)
Report Version:        12
Anonymous UUID:        211F012D-B8AD-D5AA-ECB5-25E992615EB5

Sleep/Wake UUID:       2ECDE95E-1CD0-47FF-88E0-94272FCAF15D

Time Awake Since Boot: 180000 seconds
Time Since Wake:       15000 seconds

System Integrity Protection: enabled

Crashed Thread:        5  com.apple.audio.IOThread.client

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Thread 0:: Dispatch queue: com.apple.main-thread
0   libRack.dylib                 	0x00000001077307b6 nvg__tesselateBezier + 118
1   libRack.dylib                 	0x00000001077308f5 nvg__tesselateBezier + 437
2   libRack.dylib                 	0x00000001077308f5 nvg__tesselateBezier + 437
3   libRack.dylib                 	0x00000001077308f5 nvg__tesselateBezier + 437
4   libRack.dylib                 	0x00000001077308f5 nvg__tesselateBezier + 437
5   libRack.dylib                 	0x00000001077308f5 nvg__tesselateBezier + 437
6   libRack.dylib                 	0x00000001077308f5 nvg__tesselateBezier + 437
7   libRack.dylib                 	0x000000010770df1c nvg__flattenPaths + 300
8   libRack.dylib                 	0x000000010770eccf nvgStroke + 383
9   plugin.dylib                  	0x0000000113367734 MmKnobWithArc::drawLayer(rack::widget::Widget::DrawArgs const&, int) + 420
10  libRack.dylib                 	0x000000010783afea rack::widget::Widget::drawLayer(rack::widget::Widget::DrawArgs const&, int) + 458
11  libRack.dylib                 	0x000000010783afea rack::widget::Widget::drawLayer(rack::widget::Widget::DrawArgs const&, int) + 458
12  libRack.dylib                 	0x000000010783afea rack::widget::Widget::drawLayer(rack::widget::Widget::DrawArgs const&, int) + 458
13  libRack.dylib                 	0x00000001077ebe04 rack::app::RackWidget::draw(rack::widget::Widget::DrawArgs const&) + 388
14  libRack.dylib                 	0x000000010783ac8d rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) + 461
15  libRack.dylib                 	0x000000010783b2f9 rack::widget::ZoomWidget::draw(rack::widget::Widget::DrawArgs const&) + 105
16  libRack.dylib                 	0x000000010783ac8d rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) + 461
17  libRack.dylib                 	0x000000010783ac8d rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) + 461
18  libRack.dylib                 	0x0000000107833e44 rack::ui::ScrollWidget::draw(rack::widget::Widget::DrawArgs const&) + 52
19  libRack.dylib                 	0x000000010783ac8d rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) + 461
20  libRack.dylib                 	0x000000010783fdbe rack::window::Window::step() + 1870
21  libRack.dylib                 	0x000000010783f658 rack::window::Window::run() + 40
22  com.vcvrack.rack              	0x00000001076ebf1c main + 3820
23  libdyld.dylib                 	0x00007fff9adad235 start + 1

Thread 1:
0   libsystem_kernel.dylib        	0x00007fff9aed434a mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff9aed3797 mach_msg + 55
2   com.apple.audio.midi.CoreMIDI 	0x00000001081139c1 XServerMachPort::ReceiveMessage(int&, void*, int&) + 107
3   com.apple.audio.midi.CoreMIDI 	0x0000000108129ba9 MIDIProcess::RunMIDIInThread() + 105
4   com.apple.audio.midi.CoreMIDI 	0x0000000108136a9a XThread::RunHelper(void*) + 10
5   com.apple.audio.midi.CoreMIDI 	0x000000010813a053 CAPThread::Entry(CAPThread*) + 85
6   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
7   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
8   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 2:
0   libsystem_kernel.dylib        	0x00007fff9aedbeb6 __select + 10
1   plugin.dylib                  	0x0000000113862116 SocketReceiveMultiplexer::Implementation::Run() + 1366
2   plugin.dylib                  	0x000000011382f6fe void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (SerialOsc::*)(), SerialOsc*> >(void*) + 62
3   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
4   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
5   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 3:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	0x00007fff9aed434a mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff9aed3797 mach_msg + 55
2   com.apple.CoreFoundation      	0x00007fff855a8b44 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation      	0x00007fff855a7fd1 __CFRunLoopRun + 1361
4   com.apple.CoreFoundation      	0x00007fff855a7824 CFRunLoopRunSpecific + 420
5   com.apple.AppKit              	0x00007fff831e9f02 _NSEventThread + 205
6   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
7   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
8   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 4:
0   libsystem_kernel.dylib        	0x00007fff9aedbbf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff9afc77fa _pthread_cond_wait + 712
2   libc++.1.dylib                	0x00007fff998f14cd std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47
3   libRack.dylib                 	0x0000000107828522 rack::engine::Engine_fallbackRun(rack::engine::Engine*) + 226
4   libRack.dylib                 	0x000000010782918c void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(rack::engine::Engine*), rack::engine::Engine*> >(void*) + 44
5   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 5 Crashed:: com.apple.audio.IOThread.client
0   libRack.dylib                 	0x00000001077e64e4 rack::app::ParamWidget::getParamQuantity() + 4
1   plugin.dylib                  	0x000000011684bca9 StoermelderPackOne::Sail::SailModule::process(rack::engine::Module::ProcessArgs const&) + 313
2   libRack.dylib                 	0x000000010782aaef rack::engine::Module::doProcess(rack::engine::Module::ProcessArgs const&) + 143
3   libRack.dylib                 	0x0000000107823673 rack::engine::Engine::stepBlock(int) + 1699
4   libRack.dylib                 	0x000000010774fba5 rack::audio::Device::processBuffer(float const*, int, float*, int, int) + 325
5   libRack.dylib                 	0x000000010778787f rack::RtAudioDevice::rtAudioCallback(void*, void*, unsigned int, double, unsigned int, void*) + 143
6   libRack.dylib                 	0x0000000107c7693f RtApiCore::callbackEvent(unsigned int, AudioBufferList const*, AudioBufferList const*) + 335
7   libRack.dylib                 	0x0000000107c75935 callbackHandler(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*) + 21
8   com.apple.audio.CoreAudio     	0x00007fff8510f8ce HALC_ProxyIOContext::IOWorkLoop() + 5290
9   com.apple.audio.CoreAudio     	0x00007fff8510e264 HALC_ProxyIOContext::IOThreadEntry(void*) + 128
10  com.apple.audio.CoreAudio     	0x00007fff8510dfa3 HALB_IOThread::Entry(void*) + 75
11  libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
12  libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
13  libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 6:
0   libsystem_kernel.dylib        	0x00007fff9aedbbf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff9afc77fa _pthread_cond_wait + 712
2   libc++.1.dylib                	0x00007fff998f14cd std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47
3   plugin.dylib                  	0x000000010de098e5 bogaudio::ChannelAnalyzer::work() + 1125
4   plugin.dylib                  	0x000000010de11fce void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (bogaudio::ChannelAnalyzer::*)(), bogaudio::ChannelAnalyzer*> >(void*) + 62
5   libsystem_pthread.dylib       	0x00007fff9afc693b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff9afc6887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9afc608d thread_start + 13

Thread 7:
0   libsystem_kernel.dylib        	0x00007fff9aedc44e __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff9afc6621 _pthread_wqthread + 1426
2   libsystem_pthread.dylib       	0x00007fff9afc607d start_wqthread + 13

Thread 5 crashed with X86 Thread State (64-bit):
  rax: 0x0000610000016570  rbx: 0x0000000000000000  rcx: 0x0000600000137520  rdx: 0x0000000000000002
  rdi: 0xbaddf9639eb7bead  rsi: 0x000070000d21db10  rbp: 0x000070000d21da30  rsp: 0x000070000d21da30
   r8: 0x00007ffe0f0ad788   r9: 0x00007ffe0f0ad988  r10: 0x0000000000000010  r11: 0x0000000000000001
  r12: 0x00007ffe12e47fd0  r13: 0x0000000000000013  r14: 0x000070000d21db10  r15: 0x000070000d21db10
  rip: 0x00000001077e64e4  rfl: 0x0000000000000282  cr2: 0x00007fff9994634b
  
Logical CPU:     0
Error Code:      0x020000b8
Trap Number:     133

@rubyglow
Copy link
Author

And just now another one, quite quickly afterwards. Really thought it was fixed.

stoermelder added a commit that referenced this issue Jan 21, 2023
@stoermelder
Copy link
Owner

I'm not so sure whats going on here. I made a few additional changes but I'm not convinced it is fixed at the moment.
Do you remember what you were doing when the crash happen? Maybe delete a module?

@rubyglow
Copy link
Author

I was using a MIDI knob to gently modify a knob on a module by hovering over it. No deletion or other modifications involved. I'll test the new build as soon as I get time. Thanks.

@jackokring
Copy link

jackokring commented Jan 21, 2023

Seems like 4 is added to the parameter quantity base ... which parameter? Which quantity? What would cause a new quantity to be replaced over the old quantity? Is it a pointer to a struct and a freed struct lack of a lock. Thread zero looks like it was drawing text.

@stoermelder
Copy link
Owner

if (_hoveredWidget != nullptr) {
  paramQuantity = _hoveredWidget->getParamQuantity();
}

It is crashing at this point. I don't know how this is possible as _hoveredWidget can't become invalid in the middle of a process-call.

@rubyglow
Copy link
Author

I made a few additional changes but I'm not convinced it is fixed at the moment.

I've played with the latest build and it hasn't crashed for a couple of hours. Knock on wood.

@rubyglow
Copy link
Author

Hi Ben

SAIL crashed again, but it took a good couple of hours using it actively before it happened:

[2892.982 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 11. Stack trace:
15: Rack(fatalSignalHandler(int)+27)
14: libsystem_platform.dylib(_sigtramp+26)
13: ???(0x0+4294967297)
12: plugin.dylib(StoermelderPackOne::Sail::SailModule::process(rack::engine::Module::ProcessArgs const&)+734)
11: libRack.dylib(rack::engine::Module::doProcess(rack::engine::Module::ProcessArgs const&)+143)
10: libRack.dylib(rack::engine::Engine::stepBlock(int)+1699)
9: libRack.dylib(rack::audio::Device::processBuffer(float const*, int, float*, int, int)+325)
8: libRack.dylib(rack::RtAudioDevice::rtAudioCallback(void*, void*, unsigned int, double, unsigned int, void*)+143)
7: libRack.dylib(RtApiCore::callbackEvent(unsigned int, AudioBufferList const*, AudioBufferList const*)+335)
6: libRack.dylib(callbackHandler(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*)+21)
5: CoreAudio(HALC_ProxyIOContext::IOWorkLoop()+5290)
4: CoreAudio(HALC_ProxyIOContext::IOThreadEntry(void*)+128)
3: CoreAudio(HALB_IOThread::Entry(void*)+75)
2: libsystem_pthread.dylib(_pthread_body+180)
1: libsystem_pthread.dylib(_pthread_body+0)
0: libsystem_pthread.dylib(thread_start+13)

All the best,
Lars

@higaru2
Copy link

higaru2 commented Jan 28, 2023 via email

@stoermelder
Copy link
Owner

stoermelder commented Jan 29, 2023

also bad news STRIP also crashes after a long time of use ( in my case randomizing ) after 30+ minutes... :(

Please open a new issue and provide some helpful information, like a patch-file and a crash-log.

@stoermelder
Copy link
Owner

Hi Ben

SAIL crashed again, but it took a good couple of hours using it actively before it happened:

[2892.982 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 11. Stack trace:
15: Rack(fatalSignalHandler(int)+27)
14: libsystem_platform.dylib(_sigtramp+26)
13: ???(0x0+4294967297)
12: plugin.dylib(StoermelderPackOne::Sail::SailModule::process(rack::engine::Module::ProcessArgs const&)+734)
11: libRack.dylib(rack::engine::Module::doProcess(rack::engine::Module::ProcessArgs const&)+143)
10: libRack.dylib(rack::engine::Engine::stepBlock(int)+1699)
9: libRack.dylib(rack::audio::Device::processBuffer(float const*, int, float*, int, int)+325)
8: libRack.dylib(rack::RtAudioDevice::rtAudioCallback(void*, void*, unsigned int, double, unsigned int, void*)+143)
7: libRack.dylib(RtApiCore::callbackEvent(unsigned int, AudioBufferList const*, AudioBufferList const*)+335)
6: libRack.dylib(callbackHandler(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*)+21)
5: CoreAudio(HALC_ProxyIOContext::IOWorkLoop()+5290)
4: CoreAudio(HALC_ProxyIOContext::IOThreadEntry(void*)+128)
3: CoreAudio(HALB_IOThread::Entry(void*)+75)
2: libsystem_pthread.dylib(_pthread_body+180)
1: libsystem_pthread.dylib(_pthread_body+0)
0: libsystem_pthread.dylib(thread_start+13)

All the best, Lars

Hello Lars, thanks for letting me know. I reverted the change I made for v2 which should make the module more stable. As this is not the case it is back to the code of v1. I hope this stops the crashes finally.

@rubyglow
Copy link
Author

rubyglow commented Feb 4, 2023

A pattern I have noticed is, that it can take a long time before the first crash happens. But once it has happened they start coming in rapid succession, with perhaps 5 minutes apart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants