V1.20 AU demo crashed


#1

Hi there,

I tried to build new AU demo v1.3 with Juce v1.20.

I could build it successfully, then tried to use with AULab, it crashed when I chose it as insert fx.

My environment is the latest PBG4 15inch, Mac OS X 10.4.3. I tried to build with both Mac OS X 10.4 sdk and 10.3.9 sdk.

Here is a part of crash log.

[code]Date/Time: 2005-11-24 01:30:11.686 +0900
OS Version: 10.4.3 (Build 8F46)
Report Version: 3

Command: AU Lab
Path: /Developer/Applications/Audio/AU Lab.app/Contents/MacOS/AU Lab
Parent: WindowServer [62]

Version: 1.0.2 (1.0.2)
Build Version: 37
Project Name: PlayPen
Source Version: 240000

PID: 8410
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0 Crashed:
0 com.apple.audio.aulab 0x000a1208 0x1000 + 655880
1 com.apple.audio.aulab 0x0008bc04 0x1000 + 568324
2 com.apple.audio.aulab 0x000cb468 0x1000 + 828520
3 com.apple.Foundation 0x928d6f00 __NSFireMainThreadPerform + 276
4 com.apple.CoreFoundation 0x9078ef20 __CFRunLoopPerformPerform + 104
5 com.apple.CoreFoundation 0x9075ea5c __CFRunLoopDoSources0 + 384
6 com.apple.CoreFoundation 0x9075df8c __CFRunLoopRun + 452
7 com.apple.CoreFoundation 0x9075da0c CFRunLoopRunSpecific + 268
8 com.apple.HIToolbox 0x931711e0 RunCurrentEventLoopInMode + 264
9 com.apple.HIToolbox 0x931707ec ReceiveNextEventCommon + 244
10 com.apple.HIToolbox 0x931706e0 BlockUntilNextEventMatchingListInMode + 96
11 com.apple.AppKit 0x9366f904 _DPSNextEvent + 384
12 com.apple.AppKit 0x9366f5c8 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 116
13 com.apple.AppKit 0x9366bb0c -[NSApplication run] + 472
14 com.apple.AppKit 0x9375c618 NSApplicationMain + 452
15 com.apple.audio.aulab 0x00002ce0 0x1000 + 7392
16 com.apple.audio.aulab 0x00002b88 0x1000 + 7048

Thread 1:
0 libSystem.B.dylib 0x9002b8a8 semaphore_wait_signal_trap + 8
1 libSystem.B.dylib 0x9003001c pthread_cond_wait + 488
2 com.apple.Foundation 0x928d0840 -[NSConditionLock lockWhenCondition:] + 68
3 com.apple.AppKit 0x9370c4dc -[NSUIHeartBeat _heartBeatThread:] + 324
4 com.apple.Foundation 0x928c96d4 forkThreadForFunction + 108
5 libSystem.B.dylib 0x9002b200 _pthread_body + 96

Thread 2:
0 libSystem.B.dylib 0x9000b208 mach_msg_trap + 8
1 libSystem.B.dylib 0x9000b15c mach_msg + 60
2 com.apple.CoreFoundation 0x9075e108 __CFRunLoopRun + 832
3 com.apple.CoreFoundation 0x9075da0c CFRunLoopRunSpecific + 268
4 com.apple.audio.CoreAudio 0x914021dc HALRunLoop::OwnThread(void*) + 264
5 com.apple.audio.CoreAudio 0x91401f7c CAPThread::Entry(CAPThread*) + 96
6 libSystem.B.dylib 0x9002b200 _pthread_body + 96

Thread 3:
0 libSystem.B.dylib 0x90040258 mach_wait_until + 8
1 libSystem.B.dylib 0x90040020 nanosleep + 384
2 …materialsoftware.JuceAUDemo 0x0693ce08 juce::Thread::sleep(int) + 136 (juce_mac_Threads.cpp:216)
3 …materialsoftware.JuceAUDemo 0x06a7e16c juce::InternalTimerThread::run() + 120 (juce_Timer.cpp:169)
4 …materialsoftware.JuceAUDemo 0x069cb860 juce::Thread::threadEntryPoint(juce::Thread*) + 168 (juce_Thread.cpp:67)
5 …materialsoftware.JuceAUDemo 0x069cb904 juce::juce_threadEntryPoint(void*) + 36 (juce_Thread.cpp:86)
6 …materialsoftware.JuceAUDemo 0x0693cb44 juce::threadEntryProc(void*) + 32 (juce_mac_Threads.cpp:160)
7 libSystem.B.dylib 0x9002b200 _pthread_body + 96

Thread 0 crashed with PPC Thread State 64:
srr0: 0x00000000000a1208 srr1: 0x000000000200f030 vrsave: 0x0000000000000000
cr: 0x42004422 xer: 0x0000000000000004 lr: 0x00000000000a1200 ctr: 0x0000000006a75748
r0: 0x00000000000a1200 r1: 0x00000000bfffe480 r2: 0x00000000bfffe4bc r3: 0x0000000000000000
r4: 0x000000000000001f r5: 0x0000000000000000 r6: 0x0000000000000000 r7: 0x00000000bfffe250
r8: 0x00000000bfffe254 r9: 0x00000000ffffff03 r10: 0x0000000001857660 r11: 0x0000000000000082
r12: 0x0000000006a75748 r13: 0x0000000000000000 r14: 0x0000000000000001 r15: 0x0000000000000000
r16: 0x0000000000000001 r17: 0x00000000bffff310 r18: 0x0000000000000000 r19: 0x000000000621dfe0
r20: 0x0000000000000000 r21: 0x00000000bfffe4bc r22: 0x0000000000000001 r23: 0x000000000040c650
r24: 0x000000002ffff8b3 r25: 0x00000000062dc090 r26: 0x00000000062dbe9c r27: 0x0000000000000000
r28: 0x00000000062dbe9c r29: 0x0000000000000000 r30: 0x0000000000000000 r31: 0x00000000062dc090[/code]

Also I checked it with auval, it also crashed. So I couldn’t test it with Logic Pro 7.

Anyone else has the same problem?

P.S.
“Info-JuceAU.plist” is included in Resources folder, I think it would be better to uncheck the checkbox in the project. :slight_smile:

Best regards,
Masanao Hayashi
Korg Inc.


#2

drat… I was originally using AULab and it worked fine, but then I switched to garageband, and forgot to go back and test the last version in AULab, where it does indeed crash now.

Not sure why, I’ll have to have a look.


#3

I also tested it with GarageBand too, and crashed when opening the editor. The strange thing is the thread running juce routine is not crashed in all cases. (So I couldn’t trace it with debugger)

Best regards,
Masanao Hayashi
Korg Inc.


#4

Ok, this was just a simple error I must have put in at the last minute. I’ll post a new version soon, but in the meantime you should be able to get this going by changing these methods from juce_AudioUnitWrapper.cpp:

    ComponentResult GetPropertyInfo (AudioUnitPropertyID inID,
                                     AudioUnitScope inScope,
                                     AudioUnitElement inElement,
                                     UInt32& outDataSize,
                                     Boolean& outWritable)
    {
        if (inScope == kAudioUnitScope_Global)
        {
            if (inID == juceFilterObjectPropertyID)
            {
                outWritable = false;
                outDataSize = sizeof (void*);
                return noErr;
            }
        }

        return AUMIDIEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable);
    }

    ComponentResult GetProperty (AudioUnitPropertyID inID,
                                 AudioUnitScope inScope,
                                 AudioUnitElement inElement,
                                 void* outData)
    {
        if (inScope == kAudioUnitScope_Global)
        {
            if (inID == juceFilterObjectPropertyID)
            {
                *((void**) outData) = (void*) juceFilter;
                return noErr;
            }
        }

        return AUMIDIEffectBase::GetProperty (inID, inScope, inElement, outData);
    }

#5

I did it with my project, it worked on AULab. My plugin GUI was showed in the window. Thank you!!

But it does not work with Logic Pro 7.1.1. There are some errors in auval. You can see the error outputs by “auval -v aufx JcDm RawM”.

With Logic 7, I could ignore the error and could use it but the GUI is displayed at the left-top corner of the screen, under the MenuBar. I couldn’t move the window.

Here is the part of the result of auval of sample project.

[code]Cocoa Views Available: 0

VERIFYING CLASS INFO
2005-11-28 22:33:54.465 auval[18930] *** _NSAutoreleaseNoPool(): Object 0x31fe10 of class NSCFString autoreleased with no pool in place - just leaking
2005-11-28 22:33:54.465 auval[18930] *** -[NSCFData objectForKey:]: selector not recognized [self = 0x31e140]
2005-11-28 22:33:54.465 auval[18930] *** _NSAutoreleaseNoPool(): Object 0x320b80 of class NSCFString autoreleased with no pool in place - just leaking
2005-11-28 22:33:54.465 auval[18930] *** _NSAutoreleaseNoPool(): Object 0x320ce0 of class NSCFString autoreleased with no pool in place - just leaking
2005-11-28 22:33:54.465 auval[18930] *** _NSAutoreleaseNoPool(): Object 0x320cc0 of class NSException autoreleased with no pool in place - just leaking
2005-11-28 22:33:54.465 auval[18930] *** Uncaught exception: *** -[NSCFData objectForKey:]: selector not recognized [self = 0x31e140][/code]

Here is the crash report by Logic AU Manager. (it uses auval inside)

[code]Thread 0 Crashed:
0 com.apple.Foundation 0x928e4620 _NSRaiseError + 264
1 com.apple.Foundation 0x928e435c +[NSException raise:format:] + 40
2 com.apple.Foundation 0x928bd48c -[NSObject(NSForwardInvocation) forward::] + 176
3 libobjc.A.dylib 0x909c50d0 _objc_msgForward + 176
4 auval 0x00006334 0x1000 + 21300
5 auval 0x00005d84 0x1000 + 19844
6 auval 0x00003230 0x1000 + 8752
7 auval 0x0000daa8 0x1000 + 51880
8 auval 0x0000cf9c 0x1000 + 49052
9 auval 0x00001e20 0x1000 + 3616
10 auval 0x00001cc4 0x1000 + 3268

Thread 1:
0 libSystem.B.dylib 0x90040258 mach_wait_until + 8
1 libSystem.B.dylib 0x90040020 nanosleep + 384
2 …materialsoftware.JuceAUDemo 0x010a8260 juce::Thread::sleep(int) + 80 (CAVectorUnit.cpp:79)
3 …materialsoftware.JuceAUDemo 0x01167118 juce::InternalTimerThread::run() + 84 (juce_Array.h:90)
4 …materialsoftware.JuceAUDemo 0x010f9da4 juce::Thread::threadEntryPoint(juce::Thread*) + 128 (CAVectorUnit.cpp:79)
5 …materialsoftware.JuceAUDemo 0x010a80ec juce::threadEntryProc(void*) + 16 (CAVectorUnit.cpp:79)
6 libSystem.B.dylib 0x9002b200 _pthread_body + 96

Thread 0 crashed with PPC Thread State 64:
srr0: 0x00000000928e4620 srr1: 0x000000000202f030 vrsave: 0x0000000000000000
cr: 0x24004422 xer: 0x0000000000000007 lr: 0x00000000928e45f8 ctr: 0x00000000928a645c
r0: 0x0000000000000000 r1: 0x00000000bffff2f0 r2: 0x00000000a28a4508 r3: 0x00000000bfffeea0
r4: 0x0000000000000000 r5: 0x00000000928a5d84 r6: 0x00000000bfffef24 r7: 0x00000000000000ff
r8: 0x00000000bfffef10 r9: 0x00000000003208c0 r10: 0x00000000909be648 r11: 0x0000000024004422
r12: 0x00000000928a645c r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000
r16: 0x0000000000000001 r17: 0x0000000000000001 r18: 0x0000000000000000 r19: 0x0000000000000000
r20: 0x0000000000000000 r21: 0x0000000000000000 r22: 0x0000000000000000 r23: 0x0000000000000000
r24: 0x000000000031e190 r25: 0x00000000bffff468 r26: 0x000000000031e190 r27: 0x00000000a28bdadc
r28: 0x0000000000320d10 r29: 0x00000000a28a9814 r30: 0x00000000bffff864 r31: 0x00000000928e4528[/code]

Best regards,
Masanao Hayashi


#6

Yeah, I’m still trying to scrounge a free copy of logic so I can try it myself…

It’s an odd crash - looks like it’s auval that’s crashing rather than the plugin (?) I’ll see what I can find out.


#7

[quote=“jules”]Yeah, I’m still trying to scrounge a free copy of logic so I can try it myself…

It’s an odd crash - looks like it’s auval that’s crashing rather than the plugin (?) I’ll see what I can find out.[/quote]
I hope you can get it… Meanwhile, auval may help you.

I also found another problem with composited window. AULab supports composited window for plugins (as you might know, you can check “Use composited Carbon windows for Carbon AU views” to use composite window). Nothing is shown when using JuceAU plugin with composite window. (A few months ago Apple announced to use composite window to AU developers.)

I’m so sorry for reporting a lot of things…

Best regards,
Masanao Hayashi
Korg Inc.


#8

I found a fix for the crash - it was just to do with saving state. I’ll put out a new version soon with a fix. Hadn’t seen the compositing option, so thanks for spotting that one - I’ll see if I can fix it.


#9