SL crashes on MIDI clock start

Report anything that appears to be a bug here.

Moderator: jesse

Post Reply
sarnold
Posts: 5
Joined: Sun Jan 17, 2010 6:59 am
Location: Berlin, Germany
Contact:

SL crashes on MIDI clock start

Post by sarnold »

Hi Jesse,

I am using the SooperLooper Audio Unit embedded in Max/MSP with a MIDI clock coming from a Nord Modular G2 synth. Current version is the 1.7.2 DMG, but I've had the problem since I changed my system to OSX (1.6.18 i guess). It worked perfectly before on Linux using version 1.6.8 and JACK instead of Max/MSP.

What happens is the following (it doesn't happen always, therefore hard to reproduce):

1. SL is set to MIDI clock sync, relative_sync="yes", sync=1, playback_sync=1
2. MIDI clock is running, SL runs a loop, everything is working fine.
3. MIDI clock is stopped and restarted after a short time (e.g. by changing a patch on the G2 Synth)
4. SooperLooper AU crashes Max/MSP with the following crash dump:

Code: Select all

Thread 12 Crashed:: com.apple.audio.IOThread.client
0   libsystem_c.dylib             	0x942dad7a bzero$VARIANT$sse42 + 26
1   net.essej.audiounit.SooperLooperAU	0x0b6004e5 SooperLooper::Engine::generate_sync(unsigned int, unsigned int) + 1127
2   net.essej.audiounit.SooperLooperAU	0x0b5ffacc SooperLooper::Engine::process(unsigned int) + 114
3   net.essej.audiounit.SooperLooperAU	0x0b5d1d30 SooperLooperAU::ProcessBufferLists(unsigned long&, AudioBufferList const&, AudioBufferList&, unsigned long) + 478
4   net.essej.audiounit.SooperLooperAU	0x0b5de827 AUEffectBase::Render(unsigned long&, AudioTimeStamp const&, unsigned long) + 575
5   net.essej.audiounit.SooperLooperAU	0x0b5d36b0 AUBase::RenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long) + 68
6   net.essej.audiounit.SooperLooperAU	0x0b5d7d37 AUBase::DoRenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, AUOutputElement*, unsigned long, AudioBufferList&) + 145
7   net.essej.audiounit.SooperLooperAU	0x0b5d65bc AUBase::DoRender(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long, AudioBufferList&) + 482
8   net.essej.audiounit.SooperLooperAU	0x0b5d9243 AUBase::ComponentEntryDispatch(ComponentParameters*, AUBase*) + 791
9   net.essej.audiounit.SooperLooperAU	0x0b5d3233 ComponentEntryPoint<SooperLooperAU>::Dispatch(ComponentParameters*, SooperLooperAU*) + 89
10  com.apple.CoreServices.CarbonCore	0x9370bade CallComponent + 151
11  com.apple.CoreServices.CarbonCore	0x9370bb38 CallComponentDispatch + 29
12  com.apple.audio.toolbox.AudioToolbox	0x91664f46 _AT_AudioUnitRender + 202
13  com.cycling74.MaxRuntime      	0x0033840c juce::AudioUnitPluginInstance::processBlock(juce::AudioSampleBuffer&, juce::MidiBuffer&) + 364
14  com.cycling74.MaxRuntime      	0x002a75b7 jpluginwrapper_perform(_jpluginwrapper*, float**, long, long, _midieventbuf*, _midieventbuf*) + 114
15  com.cycling74.MaxRuntime      	0x000b4a6e object_method_imp + 821
16  com.cycling74.MaxRuntime      	0x000b4d07 object_method + 143
17  com.cycling74.vst-            	0x0b14a991 vst_perform64 + 533
18  com.cycling74.MaxAudioAPI     	0x06b29e0b dspchain_tick + 314
19  com.cycling74.MaxAudioAPI     	0x06b33692 plugrunner_tick + 167
20  com.cycling74.MaxAudioAPI     	0x06b33a77 plugrunner_process + 125
21  com.cycling74.MaxAudioAPI     	0x06b4b4f0 patchernode_process + 217
22  com.cycling74.MaxAudioAPI     	0x06b47c17 mixerengine_process_fun + 85
23  com.cycling74.MaxRuntime      	0x00058593 linklist_funall_imp + 102
24  com.cycling74.MaxRuntime      	0x0005863d linklist_funall + 39
25  com.cycling74.MaxAudioAPI     	0x06b4d306 mixerengine_process + 113
26  com.cycling74.MaxAudioAPI     	0x06b4d5e2 mixerengine_processiovector + 703
27  com.cycling74.MaxAudioAPI     	0x06b224c9 ad_process + 266
28  com.cycling74.ad-coreaudio    	0x047fc25b adcoreaudio_callback + 185
29  com.cycling74.MaxRuntime      	0x002c4ef4 WrapperCallback::audioDeviceIOCallback(float const**, int, float**, int, int) + 64
30  com.cycling74.MaxRuntime      	0x004819dd juce::CoreAudioInternal::audioCallback(AudioBufferList const*, AudioBufferList*) + 183
31  com.cycling74.MaxRuntime      	0x0048160a juce::CoreAudioInternal::audioIOProc(unsigned long, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*) + 31
32  com.apple.audio.CoreAudio     	0x95a76b6f HALC_ProxyIOContext::IOWorkLoop() + 2729
33  com.apple.audio.CoreAudio     	0x95a76017 HALC_ProxyIOContext::IOThreadEntry(void*) + 145
34  com.apple.audio.CoreAudio     	0x95a80561 ___ZN19HALC_ProxyIOContextC2Emj_block_invoke_0 + 20
35  com.apple.audio.CoreAudio     	0x95a75f3d HALB_IOThread::Entry(void*) + 71
36  libsystem_c.dylib             	0x942ef5b7 _pthread_start + 344
37  libsystem_c.dylib             	0x942d9dce thread_start + 34
This might be some kind of race condition concerning the order and interval of MIDI clock beat messages MC_STOP, MC_START and MC_TICK being received. I can imagine that the G2 Synth might skip a MC_STOP on patch load or send two MC_TICKs at nearly the same time when restarting. This might also be related to viewtopic.php?f=15&t=1536&p=2991

Do you have time to look at the SooperLooper::Engine::generate_sync() function with these crashes in mind? If you need to have a detailed report, I will try to record a MIDI dump together with the crash and run SL isolated without Max.

Best,
Sebastian

jesse
Posts: 531
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: SL crashes on MIDI clock start

Post by jesse »

Could you use something like MIDI Monitor to record the exact MIDI events being received from the G2 at the time of a crash?
http://www.snoize.com/MIDIMonitor/

Then post them here, and that should help narrow it down...

Post Reply