Default IntroJucer AU plug for ppc crashes

Hi,

building an IntroJucer AU plug for ppc with the default source. It crashes consistently on a G5 with 10.5.8 OS installed. The base SDK is 10.6 and the target OS is 10.5.

This is the top of the crash report:

[list]Process: REAPER [360]
Path: /Applications/REAPER.app/Contents/MacOS/REAPER
Identifier: com.cockos.reaper
Version: ??? (4.151)
Code Type: PPC (Native)
Parent Process: launchd [68]

Interval Since Last Report: 527 sec
Crashes Since Last Report: 3
Per-App Interval Since Last Report: 55 sec
Per-App Crashes Since Last Report: 3

Date/Time: 2012-02-29 12:19:11.695 +0100
OS Version: Mac OS X 10.5.8 (9L31a)
Report Version: 6
Anonymous UUID: 5CC66420-89D9-4459-B735-3A6888E5ACC9

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0

Thread 0 Crashed:
0 ??? 0000000000 0 + 0
1 com.yourcompany.NewProject 0x0857f1c8 ComponentBase::GetComponentDescription() const + 32
2 com.yourcompany.NewProject 0x0856af60 AUBase::SaveState(void const**) + 172
3 com.yourcompany.NewProject 0x085840d8 JuceAU::SaveState(void const**) + 48
4 com.yourcompany.NewProject 0x0856a6b4 AUBase::DispatchGetProperty(unsigned long, unsigned long, unsigned long, void*) + 484
5 com.yourcompany.NewProject 0x08575014 AUBase::ComponentEntryDispatch(ComponentParameters*, AUBase*) + 1052
6 com.yourcompany.NewProject 0x08578c0c AUMIDIEffectBase::ComponentEntryDispatch(ComponentParameters*, AUMIDIEffectBase*) + 56
7 com.yourcompany.NewProject 0x085855a0 ComponentEntryPoint::Dispatch(ComponentParameters*, JuceAU*) + 316
8 com.yourcompany.NewProject 0x08580330 NewProjectAUEntry + 16
9 …apple.audio.units.AudioUnit 0x92b816b0 AudioUnitGetProperty + 68
10 com.cockos.reaper 0x00243e44 AU_Plugin::SaveXML(WDL_Queue*) + 72
11 com.cockos.reaper 0x00248184 AU_Plugin::SaveParamsNew(int*, bool) + 300
12 com.cockos.reaper 0x002494a0 AU_Plugin::AU_Plugin(void*, char const*, void*) + 4496
13 com.cockos.reaper 0x00183cdc FxDsp::FxDsp(int, char const*, void*) + 1568
14 com.cockos.reaper 0x00191b7c FxChain::addDspToChain(int, char const*, void*, int) + 64
15 com.cockos.reaper 0x00191cb8 FxChain::addSelection(HWND__, bool) + 248
16 com.cockos.reaper 0x001a5494 addDialogProc(HWND__
, unsigned int, unsigned long, long) + 12148
17 com.cockos.reaper 0x002239c0 SwellDialogDefaultWindowProc(HWND__*, unsigned int, unsigned long, long) + 876
18 com.apple.AppKit 0x95553358 -[NSApplication sendAction:to:from:] + 108
19 com.apple.AppKit 0x9555328c -[NSControl sendAction:to:] + 96
20 com.apple.AppKit 0x955527a4 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 1588
21 com.apple.AppKit 0x955520dc -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 520
22 com.apple.AppKit 0x95551a18 -[NSControl mouseDown:] + 808
23 com.apple.AppKit 0x955502dc -[NSWindow sendEvent:] + 4516
24 com.apple.AppKit 0x95523680 -[NSApplication sendEvent:] + 3260
25 com.cockos.reaper 0x0014b6b0 -[REAPERapp sendEvent:] + 3052
26 com.apple.AppKit 0x954908d8 -[NSApplication run] + 804
27 com.apple.AppKit 0x9546129c NSApplicationMain + 444
28 com.cockos.reaper 0x00002ca8 _start + 760
29 com.cockos.reaper 0x000029ac start + 48
30 ??? 0x00000002 0 + 2
[/list]

Any ideas? I can’t debug on this machine because it has 10.5 and the base SDK is 10.6.

PieterS

Update:

building against the 10.5 base SDK seems to fix the problem. I need 10.6 though…

Fixed the problem by specifying base SDK 10.5 for ppc and 10.6 for the other platforms

Thanks PieterS, we’ve had the exact same problem and your solution worked for us.

We had an additional related problem which others may face, as we use OpenGL and juce now uses OpenGL 3.0 functions which aren’t available on powerpc. We solved it for now by #if-ing those out (see https://github.com/yairchu/juce/commit/a79d7610ea311e39136e2234da28eeb678498a82) as our apps don’t need that specific OpenGL functionality (OpenGL component sharing its rect with other components).

Cheers!

Did anybody succeed in building the latest tips demo plugin using 10.6 as base SDK? If I use 10.7 as base SDK and 10.5 as development target, the plugin crashes validation on 10.5 with the same error as in the OP…

The functions at the top of the stack in that crash are in Apple’s AU cpp files, which have changed over the years (and which normally need patching just to get them to compile at all). If you’re building with the newer SDK, it might be worth checking that you’ve got the latest version of those Apple files too.

I guess I have them… downloaded the newest XCode and the newest CoreAudio files, same error. It’s not such a terrible issue, people will move away from 10.5 anyway, but it’s annoying nevertheless.