plus~ example Xcode external crashes Max

Jul 14, 2006 at 9:56pm

plus~ example Xcode external crashes Max

Hi all,

I have tried to use the example plus~ external that I built using the
plus~.xcodeproj included in the MaxMSP UB SDK. The external compiles
well, finds its frameworks nicely, but crashes Max on load. (See
Crash Log below). I am using the Development build configuration for
the Xcode project which compiles and links only ppc code.

The plus~.mxo file created looks file, and is readily identified:

[Casper] penrose % file plus~
plus~: Mach-O bundle ppc

I tried this first on an old 500MHz Powerbook G4 (running 10.4.7). I
installed Xcode 2.3 and had this behavior. I downgraded to Xcode
2.2.1 hoping that there was a subtlety with bundles between
versions. The external compiled on Xcode 2.2.1 also has this
identical behavior.

I hoped that the problem was machine specific, however, a Dual 2.5
GHz Power Mac running 10.4.7 produced the crash log you see below.
The crash logs are quite similar on both machines.

Christopher
penrose@music.princeton.edu

Date/Time: 2006-07-14 11:41:44.218 -0700
OS Version: 10.4.7 (Build 8J135)
Report Version: 4

Command: MaxMSP
Path: /Applications/MaxMSP 4.6/MaxMSP.app/Contents/MacOS/MaxMSP
Parent: WindowServer [62]

Version: ??? (4.6b11)

PID: 702
Thread: 0

Exception: EXC_BAD_ACCESS (0×0001)
Codes: KERN_PROTECTION_FAILURE (0×0002) at 0×00000000

Thread 0 Crashed:
0 < <00000000>> 0×00000000 0 + 0
1 com.cycling74.plus~ 0x01ed731c main + 104 (plus~.c:33)
2 com.cycling74.MaxMSP46 0×00034740 external_bundleload
(char*, char*, char*, short) + 940 (install.c:816)
3 com.cycling74.MaxMSP46 0x0003492c external_load + 244
(install.c:215)
4 com.cycling74.MaxMSP46 0×00036770 extload + 140
(loader.c:528)
5 com.cycling74.MaxMSP46 0x00036cc0 newload_internal + 868
(loader.c:622)
6 com.cycling74.MaxMSP46 0x00036e04 newload + 64 (loader.c:
564)
7 com.cycling74.MaxMSP46 0x000449f8 typedmess_fun + 2332
(message.c:630)
8 com.cycling74.MaxMSP46 0×00045000 typedmess + 104
(message.c:399)
9 com.cycling74.MaxMSP46 0x000460c8 aeval + 1804
(message.c:1061)
10 com.cycling74.MaxMSP46 0x0000bc38 atombuf_eval + 216
(atombuf.c:234)
11 com.cycling74.MaxMSP46 0×00108460 patcher_vnewex + 208
(vnewobj.c:486)
12 com.cycling74.MaxMSP46 0×00044288 typedmess_fun + 428
(message.c:492)
13 com.cycling74.MaxMSP46 0×00045000 typedmess + 104
(message.c:399)
14 com.cycling74.MaxMSP46 0x000460c8 aeval + 1804
(message.c:1061)
15 com.cycling74.MaxMSP46 0x00013c10 bf_fastload + 944
(binfile.c:447)
16 com.cycling74.MaxMSP46 0x000350e8 lowload_type(char*,
short, long, short, atom*, short) + 748 (loader.c:145)
17 com.cycling74.MaxMSP46 0x000359f0 fileload_extended +
240 (loader.c:397)
18 com.cycling74.MaxMSP46 0x00035a88 fileload_type + 88
(loader.c:379)
19 com.cycling74.MaxMSP46 0x00035dd8 dropload + 532
(loader.c:260)
20 com.cycling74.MaxMSP46 0x00008f84 ae_openfile(FSSpec*) +
32 (appleevent.c:38)
21 com.cycling74.MaxMSP46 0x00123a6c sysiac_iterate + 376
(sysiac.c:157)
22 com.cycling74.MaxMSP46 0×00009134 ae_docopen(AEDesc
const*, AEDesc*, long) + 56 (appleevent.c:71)
23 com.apple.AE 0x914f9960 aeDispatchAppleEvent
(AEDesc const*, AEDesc*, unsigned long, unsigned char*) + 208
24 com.apple.AE 0x914f97fc
dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 44
25 com.apple.AE 0x914f9654 aeProcessAppleEvent + 284
26 com.apple.HIToolbox 0x931edeb0 AEProcessAppleEvent + 60
27 com.apple.HIToolbox 0x93231b24 ProcessHighLevelEvent
+ 140
28 com.apple.HIToolbox 0x93231a7c
StandardApplicationEventHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 328
29 com.apple.HIToolbox 0x931ea554 DispatchEventToHandlers
(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 692
30 com.apple.HIToolbox 0x931e9cac
SendEventToEventTargetInternal(OpaqueEventRef*,
OpaqueEventTargetRef*, HandlerCallRec*) + 372
31 com.apple.HIToolbox 0x931e9b28
SendEventToEventTargetWithOptions + 40
32 com.apple.HIToolbox 0x931f0e9c
ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 704
33 com.apple.HIToolbox 0x931ea7a4 DispatchEventToHandlers
(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1284
34 com.apple.HIToolbox 0x931e9cac
SendEventToEventTargetInternal(OpaqueEventRef*,
OpaqueEventTargetRef*, HandlerCallRec*) + 372
35 com.apple.HIToolbox 0x931f0a60 SendEventToEventTarget
+ 40
36 com.apple.HIToolbox 0x932317a0 ToolboxEventDispatcher
+ 92
37 com.apple.HIToolbox 0x9323172c HLTBEventDispatcher + 16
38 com.apple.HIToolbox 0x9322fce4
RunApplicationEventLoop + 148
39 com.cycling74.MaxMSP46 0×00038584 app_run + 96 (main.c:
1460)
40 com.cycling74.MaxMSP46 0x0003885c main + 708 (main.c:416)
41 com.cycling74.MaxMSP46 0x00001f18 _start + 340 (crt.c:272)
42 com.cycling74.MaxMSP46 0x00001dc0 start + 60

Thread 1:
0 libSystem.B.dylib 0x900551a8
semaphore_timedwait_signal_trap + 8
1 libSystem.B.dylib 0×90071828
pthread_cond_timedwait_relative_np + 556
2 …ple.CoreServices.CarbonCore 0x90bf4550
TSWaitOnSemaphoreCommon + 176
3 …ple.CoreServices.CarbonCore 0x90bfc4ec TimerThread + 60
4 libSystem.B.dylib 0x9002bc28 _pthread_body + 96

Thread 2:
0 libSystem.B.dylib 0x9000b268 mach_msg_trap + 8
1 libSystem.B.dylib 0x9000b1bc mach_msg + 60
2 com.apple.audio.midi.CoreMIDI 0x97036ac8
XServerMachPort::ReceiveMessage(int&, void*, int&) + 84
3 com.apple.audio.midi.CoreMIDI 0x97029c80 MIDIInPortThread::Run
() + 64
4 com.apple.audio.midi.CoreMIDI 0x9702df44 XThread::RunHelper
(void*) + 28
5 com.apple.audio.midi.CoreMIDI 0x9703787c CAPThread::Entry
(CAPThread*) + 96
6 libSystem.B.dylib 0x9002bc28 _pthread_body + 96

#26801
Jul 15, 2006 at 9:35am

On 14-Jul-2006, at 23:56, Christopher Penrose wrote:

> 0 < <00000000>> 0×00000000 0 + 0
> 1 com.cycling74.plus~ 0x01ed731c main + 104 (plus~.c:33)

Line 33 of plus~.c is the call to dsp_initclass(). So I’m wondering
if the MaxAudioAPI.framework is linked properly and found at runtime?

You might want to trace through main() using the GNU debugger and Max/
MSP Runtime.

Hope this helps,
Peter

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de

#80557
Jul 15, 2006 at 5:54pm

Thanks Peter,

I had used the GNU debugger on my Powerbook to see where in main the
crash was occurring, and I verified that it is the same on my PowerMac.

It crashes on the first line of the main() function which is the msp
setup() call specified in plus~.c from the UB SDK.

void main(void)
{
setup((t_messlist **)&plus_class, (method)plus_new, (method)
dsp_free, (short)sizeof(t_plus), 0L, A_DEFFLOAT, 0);

Christopher
penrose@music.princeton.edu

On Jul 15, 2006, at 2:35 AM, Peter Castine wrote:

> On 14-Jul-2006, at 23:56, Christopher Penrose wrote:
>
>> 0 < <00000000>> 0×00000000 0 + 0
>> 1 com.cycling74.plus~ 0x01ed731c main + 104 (plus~.c:
>> 33)
>
> Line 33 of plus~.c is the call to dsp_initclass(). So I’m wondering
> if the MaxAudioAPI.framework is linked properly and found at runtime?
>
> You might want to trace through main() using the GNU debugger and
> Max/MSP Runtime.

#80558
Jul 15, 2006 at 6:27pm

Thanks again Peter,

I just verified that MaxAPI.framework and MaxAudioAPI.framework found
in /Library/Frameworks were the versions provided in the UB SDK.
However, I discovered that I had older copies of these frameworks
inside of ~/Library/Frameworks Oops. For some reason Xcode was
linking against these at compile time =( Problem solved.

Christopher

On Jul 15, 2006, at 10:54 AM, Christopher Penrose wrote:

>
> Thanks Peter,
>
> I had used the GNU debugger on my Powerbook to see where in main
> the crash was occurring, and I verified that it is the same on my
> PowerMac.
>
> It crashes on the first line of the main() function which is the
> msp setup() call specified in plus~.c from the UB SDK.
>
> void main(void)
> {
> setup((t_messlist **)&plus_class, (method)plus_new, (method)
> dsp_free, (short)sizeof(t_plus), 0L, A_DEFFLOAT, 0);
>
>
> Christopher
> penrose@music.princeton.edu
>
>
>
> On Jul 15, 2006, at 2:35 AM, Peter Castine wrote:
>
>> On 14-Jul-2006, at 23:56, Christopher Penrose wrote:
>>
>>> 0 < <00000000>> 0×00000000 0 + 0
>>> 1 com.cycling74.plus~ 0x01ed731c main + 104
>>> (plus~.c:33)
>>
>> Line 33 of plus~.c is the call to dsp_initclass(). So I’m
>> wondering if the MaxAudioAPI.framework is linked properly and
>> found at runtime?
>>
>> You might want to trace through main() using the GNU debugger and
>> Max/MSP Runtime.
>
>
>
>

#80559

You must be logged in to reply to this topic.