.mxo included in standalone = crash


    Aug 10 2006 | 7:08 am
    I've put together a custom mach-o external for talking directly to OS X CoreMIDI services, using the C++ compiler, build style = deployment.
    This external works fine when used in a regular Max patch in 4.6b11, but when included in a standalone, the resulting app crashes at startup. Excluding the .mxo and manually adding it to the app's support folder produces a working app.
    Huh?
    Crash report:
    Date/Time: 2006-08-10 19:05:21.289 +1200 OS Version: 10.4.3 (Build 8F46) Report Version: 3
    Command: Untitled Path: /Volumes/Opus Locus/Untitled.app/Contents/MacOS/Untitled Parent: WindowServer [68]
    Version: ??? (4.6b11)
    PID: 989 Thread: 0
    Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000014
    Thread 0 Crashed: 0 ...m.Max.Untitled.appRuntime46 0x000a6f3c sysfile_geteof + 16 (sysfile.c:271) 1 com.apple.CoreGraphics 0x903d2100 CGColorTransformConvertNeedsCMS + 944 2 ...m.Max.Untitled.appRuntime46 0x000a7514 sysfile_spoolcopy + 48 (sysfile.c:418) 3 ...m.Max.Untitled.appRuntime46 0x000ab5ec xpcoll_machoload + 572 (xpcoll.c:1959) 4 ...m.Max.Untitled.appRuntime46 0x000ab760 xpcoll_extload + 168 (xpcoll.c:1050) 5 ...m.Max.Untitled.appRuntime46 0x00019d18 external_load + 44 (install.c:210) 6 ...m.Max.Untitled.appRuntime46 0x0001af5c extload + 92 (loader.c:528) 7 ...m.Max.Untitled.appRuntime46 0x0001b254 newload_internal + 508 (loader.c:622) 8 ...m.Max.Untitled.appRuntime46 0x0001b2e8 newload + 20 (loader.c:566) 9 ...m.Max.Untitled.appRuntime46 0x0002277c typedmess_fun + 2056 (message.c:630) 10 ...m.Max.Untitled.appRuntime46 0x00023108 aeval + 964 (message.c:1062) 11 ...m.Max.Untitled.appRuntime46 0x00007ccc atombuf_eval + 120 (atombuf.c:235) 12 ...m.Max.Untitled.appRuntime46 0x00082e30 patcher_vnewex + 116 (vnewobj.c:486) 13 ...m.Max.Untitled.appRuntime46 0x00022400 typedmess_fun + 1164 (message.c:631) 14 ...m.Max.Untitled.appRuntime46 0x00023108 aeval + 964 (message.c:1062) 15 ...m.Max.Untitled.appRuntime46 0x0000c220 bf_fastload + 572 (binfile.c:447) 16 ...m.Max.Untitled.appRuntime46 0x0001a17c lowload_type(char*, short, long, short, atom*, short) + 460 (loader.c:145) 17 ...m.Max.Untitled.appRuntime46 0x0001a70c fileload_extended + 152 (loader.c:399) 18 ...m.Max.Untitled.appRuntime46 0x0001a770 fileload_type + 68 (loader.c:380) 19 ...m.Max.Untitled.appRuntime46 0x000a9840 xpcoll_loadentry + 40 (xpcoll.c:798) 20 ...m.Max.Untitled.appRuntime46 0x000a0820 linklist_funall + 84 (linklist.c:994) 21 ...m.Max.Untitled.appRuntime46 0x000a97ac xpcoll_loadpatchers + 76 (xpcoll.c:755) 22 ...m.Max.Untitled.appRuntime46 0x000a9800 xpcoll_load + 56 (xpcoll.c:571) 23 ...m.Max.Untitled.appRuntime46 0x0001c520 main + 676 (main.c:356) 24 ...m.Max.Untitled.appRuntime46 0x000029d0 _start + 340 (crt.c:272) 25 ...m.Max.Untitled.appRuntime46 0x00002878 start + 60
    Thread 1: 0 libSystem.B.dylib 0x9000b208 mach_msg_trap + 8 1 libSystem.B.dylib 0x9000b15c mach_msg + 60 2 com.apple.audio.midi.CoreMIDI 0x97015ac8 XServerMachPort::ReceiveMessage(int&, void*, int&) + 84 3 com.apple.audio.midi.CoreMIDI 0x97008c80 MIDIInPortThread::Run() + 64 4 com.apple.audio.midi.CoreMIDI 0x9700cf44 XThread::RunHelper(void*) + 28 5 com.apple.audio.midi.CoreMIDI 0x9701687c CAPThread::Entry(CAPThread*) + 96 6 libSystem.B.dylib 0x9002b200 _pthread_body + 96
    Thread 2: 0 libSystem.B.dylib 0x90053f68 semaphore_timedwait_signal_trap + 8 1 libSystem.B.dylib 0x900702c8 pthread_cond_timedwait_relative_np + 556 2 ...ple.CoreServices.CarbonCore 0x90b745e4 TSWaitOnSemaphoreCommon + 176 3 ...ple.CoreServices.CarbonCore 0x90b7c580 TimerThread + 60 4 libSystem.B.dylib 0x9002b200 _pthread_body + 96
    Thread 0 crashed with PPC Thread State 64: srr0: 0x00000000000a6f3c srr1: 0x000000000200f030 vrsave: 0x0000000000000000 cr: 0x24002222 xer: 0x0000000000000004 lr: 0x00000000000a7514 ctr: 0x00000000901265d8 r0: 0x00000000000a7514 r1: 0x00000000bfffbb80 r2: 0x00000000bfffbbfc r3: 0x0000000000000000 r4: 0x00000000bfffbbfc r5: 0x0000000000000000 r6: 0x00000000ffffffff r7: 0x0000000000000001 r8: 0x0000000069646900 r9: 0x0000000000000000 r10: 0x0000000001200d3e r11: 0x0000000024002222 r12: 0x00000000901265d8 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000 r16: 0x0000000000000000 r17: 0x0000000000000000 r18: 0x0000000000000000 r19: 0x0000000000000000 r20: 0x0000000000000000 r21: 0x00000000bfffc884 r22: 0x00000000bfffc904 r23: 0x00000000017b7310 r24: 0x0000000000000001 r25: 0x00000000bfffc08c r26: 0x00000000bfffc614 r27: 0x000000000116eda0 r28: 0x0000000000000000 r29: 0x0000000000000000 r30: 0x0000000000000000 r31: 0x00000000bfffc074
    Binary Images Description: 0x1000 - 0x10dfff com.cycling74.com.Max.Untitled.appRuntime46 ??? (4.6b11) /Volumes/Opus Locus/LC Xmu/Xmu registered/Untitled.app/Contents/MacOS/Untitled 0x1008000 - 0x1028fff com.cycling74.MaxAPI 1.0 /Volumes/Opus Locus/LC Xmu/Xmu registered/Untitled.app/Contents/Frameworks/MaxAPI.framework/MaxAPI 0x17eb000 - 0x17ecfff com.cycling74.augraph ??? (1.0) /Volumes/Opus Locus/LC Xmu/Xmu registered/Untitled.app/Contents/support/mididrivers/augraph.mxo/Contents/MacOS/augraph 0x17ef000 - 0x17f1fff com.cycling74.coremidi ??? (1.0) /Volumes/Opus Locus/LC Xmu/Xmu registered/Untitled.app/Contents/support/mididrivers/coremidi.mxo/Contents/MacOS/coremidi 0x41ea000 - 0x41ebfff com.cycling74.midi_adrewire ??? (1.0) /Volumes/Opus Locus/LC Xmu/Xmu registered/Untitled.app/Contents/support/mididrivers/midi_adrewire.mxo/Contents/MacOS/midi_adrewire 0x41ee000 - 0x41f9fff com.cycling74.MaxAudioAPI ??? (1.0) /Volumes/Opus Locus/LC Xmu/Xmu registered/Untitled.app/Contents/Frameworks/MaxAudioAPI.framework/Versions/A/MaxAudioAPI 0x45cb000 - 0x45d1fff com.apple.DictionaryServiceComponent 1.0.0 /System/Library/Components/DictionaryService.component/Contents/MacOS/DictionaryService 0x54a8000 - 0x54b3fff com.apple.LiveType.component 2.0 /Library/QuickTime/LiveType.component/Contents/MacOS/LiveType 0x7f950000 - 0x7f9b7fff com.apple.LiveType.framework 2.0 /System/Library/PrivateFrameworks/LiveType.framework/Versions/A/LiveType 0x8fe00000 - 0x8fe54fff dyld 44.2 /usr/lib/dyld 0x90000000 - 0x901b3fff libSystem.B.dylib /usr/lib/libSystem.B.dylib 0x9020b000 - 0x9020ffff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib 0x90211000 - 0x90264fff com.apple.CoreText 1.0.1 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText 0x90291000 - 0x90342fff ATS /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x90371000 - 0x906aefff com.apple.CoreGraphics 1.256.27 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x9073a000 - 0x90813fff com.apple.CoreFoundation 6.4.4 (368.18) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x9085c000 - 0x9085cfff com.apple.CoreServices 10.4 (???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x9085e000 - 0x90960fff libicucore.A.dylib /usr/lib/libicucore.A.dylib 0x909ba000 - 0x90a3efff libobjc.A.dylib /usr/lib/libobjc.A.dylib 0x90a68000 - 0x90ad6fff com.apple.framework.IOKit 1.4 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x90aed000 - 0x90afffff libauto.dylib /usr/lib/libauto.dylib 0x90b06000 - 0x90dddfff com.apple.CoreServices.CarbonCore 671.2 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x90e43000 - 0x90ec3fff com.apple.CoreServices.OSServices 4.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x90f0d000 - 0x90f4efff com.apple.CFNetwork 10.4.3 (129.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x90f63000 - 0x90f7bfff com.apple.WebServices 1.1.2 (1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore 0x90f8b000 - 0x9100cfff com.apple.SearchKit 1.0.4 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x91052000 - 0x9107bfff com.apple.Metadata 10.4.3 (121.20.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x9108c000 - 0x9109afff libz.1.dylib /usr/lib/libz.1.dylib 0x9109d000 - 0x9125ffff com.apple.security 4.2 (24844) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x91362000 - 0x9136bfff com.apple.DiskArbitration 2.1 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x91372000 - 0x91399fff com.apple.SystemConfiguration 1.8.1 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x913ac000 - 0x913b4fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib 0x913b9000 - 0x913d9fff libmx.A.dylib /usr/lib/libmx.A.dylib 0x913df000 - 0x913e7fff libbsm.dylib /usr/lib/libbsm.dylib 0x913eb000 - 0x91469fff com.apple.audio.CoreAudio 3.0.1 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x914a7000 - 0x914a7fff com.apple.ApplicationServices 10.4 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x914a9000 - 0x914e1fff com.apple.AE 1.5 (297) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x914fc000 - 0x915c9fff com.apple.ColorSync 4.4.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x9161e000 - 0x916b1fff com.apple.print.framework.PrintCore 4.3 (172.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x916f8000 - 0x917b5fff com.apple.QD 3.8.18 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x917f3000 - 0x91851fff com.apple.HIServices 1.5.1 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x9187f000 - 0x918a3fff com.apple.LangAnalysis 1.6.1 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x918b7000 - 0x918dcfff com.apple.FindByContent 1.5 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent 0x918ef000 - 0x91931fff com.apple.LaunchServices 10.4.5 (168) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x9194d000 - 0x91961fff com.apple.speech.synthesis.framework 3.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x9196f000 - 0x919a8fff com.apple.ImageIO.framework 1.4.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x919bd000 - 0x91a83fff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib 0x91ad0000 - 0x91ae5fff libcups.2.dylib /usr/lib/libcups.2.dylib 0x91aea000 - 0x91b06fff libJPEG.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x91b0b000 - 0x91b7afff libJP2.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x91b91000 - 0x91b95fff libGIF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x91b97000 - 0x91bc8fff libRaw.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib 0x91bcc000 - 0x91c0ffff libTIFF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x91c16000 - 0x91c2ffff libPng.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x91c34000 - 0x91c37fff libRadiance.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x91c39000 - 0x91c39fff com.apple.Accelerate 1.1.1 (Accelerate 1.1.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x91c3b000 - 0x91d25fff com.apple.vImage 2.0 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x91d2d000 - 0x91d4cfff com.apple.Accelerate.vecLib 3.1.1 (vecLib 3.1.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x91db8000 - 0x91e1dfff libvMisc.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x91e27000 - 0x91eb9fff libvDSP.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x91ed3000 - 0x92463fff libBLAS.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x924ab000 - 0x927bbfff libLAPACK.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x927e8000 - 0x92874fff com.apple.DesktopServices 1.3.1 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x928b6000 - 0x92ae0fff com.apple.Foundation 6.4.2 (567.21) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x92bfe000 - 0x92cdcfff libxml2.2.dylib /usr/lib/libxml2.2.dylib 0x92cfc000 - 0x92deafff libiconv.2.dylib /usr/lib/libiconv.2.dylib 0x92dfc000 - 0x92e1afff libGL.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x92e25000 - 0x92e7ffff libGLU.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x92e9d000 - 0x92e9dfff com.apple.Carbon 10.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x92e9f000 - 0x92eb3fff com.apple.ImageCapture 3.0 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture 0x92ecb000 - 0x92edbfff com.apple.speech.recognition.framework 3.4 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x92ee7000 - 0x92efcfff com.apple.securityhi 2.0 (203) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI 0x92f0e000 - 0x92f95fff com.apple.ink.framework 101.2 (69) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink 0x92fa9000 - 0x92fb4fff com.apple.help 1.0.3 (32) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help 0x92fbe000 - 0x92febfff com.apple.openscripting 1.2.3 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting 0x93005000 - 0x93015fff com.apple.print.framework.Print 5.0 (190.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print 0x93021000 - 0x93087fff com.apple.htmlrendering 1.1.2 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering 0x930b8000 - 0x9310afff com.apple.NavigationServices 3.4.2 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices 0x93136000 - 0x93153fff com.apple.audio.SoundManager 3.9 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound 0x93165000 - 0x93172fff com.apple.CommonPanels 1.2.2 (73) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels 0x9317b000 - 0x9348dfff com.apple.HIToolbox 1.4.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x935d9000 - 0x935e5fff com.apple.opengl 1.4.6 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x940e0000 - 0x941aafff com.apple.audio.toolbox.AudioToolbox 1.4.1 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x941fe000 - 0x941fefff com.apple.audio.units.AudioUnit 1.4 /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x94604000 - 0x94613fff libCGATS.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x9461b000 - 0x94627fff libCSync.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x9466c000 - 0x94684fff libRIP.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x9468b000 - 0x9493ffff com.apple.QuickTime 7.1.1 /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime 0x94a03000 - 0x94a86fff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib 0x97008000 - 0x97047fff com.apple.audio.midi.CoreMIDI 1.5 (41) /System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI 0x97c53000 - 0x97c60fff com.apple.agl 2.5.6 (AGL-2.5.6) /System/Library/Frameworks/AGL.framework/Versions/A/AGL
    Model: PowerBook3,5, BootROM 4.5.3f2, 1 processors, PowerPC G4 (3.2), 1 GHz, 1 GB Graphics: ATY,RV250M9, ATY,RV250M9, AGP, 64 MB Memory Module: SODIMM0/J16TOP, 512 MB, SDRAM, PC133U-333 Memory Module: SODIMM1/J16BOTTOM, 512 MB, SDRAM, PC133U-333 AirPort: AirPort, 9.52 Modem: MicroDash, Australia, V.92, 7.0, APPLE VERSION 2.6.6 Network Service: Built-in Ethernet, Ethernet, en0 PCI Card: TXN,PCI1410-02, cardbus, PC Card Parallel ATA Device: TOSHIBA MK8026GAX, 74.53 GB Parallel ATA Device: MATSHITACD-RW CW-8121, USB Device: Hub, , Up to 12 Mb/sec, 500 mA USB Device: iMate, USB To ADB Adaptor, Griffin Technology, Inc., Up to 1.5 Mb/sec, 100 mA USB Device: ProtectExecuter, Syncrosoft, Up to 12 Mb/sec, 100 mA USB Device: USB-PS/2 Optical Mouse, Logitech, Up to 1.5 Mb/sec, 100 mA USB Device: microKONTROL, KORG INC., Up to 12 Mb/sec, 500 mA FireWire Device: unknown_device, unknown_value, Up to 800 Mb/sec FireWire Device: Formac IDE Device 1, Formac, Up to 800 Mb/sec

    • Aug 14 2006 | 2:02 am
      OK, same crash in a standalone built with 4.6.0.
      More detail about my object: Based on an example external (maximum) with a lot of stuff (most messages, help etc) stripped out - I'm using the C++ compiler because I'm including MIDIServices.h, using Apples CoreMIDI framework to query/set MIDI endpoint properties.
      The external is therefore a combination of C/C++ code, compiles with no warnings, and seems to behave itself until it's included in a standalone.
      Can anyone shed some light on where I'm going wrong, or is this sort of thing just not supported by the collective/runtime engine? Project/code (183 lines) available on request.
      John Pitcairn
    • Aug 14 2006 | 6:48 pm
      On Aug 13, 2006, at 7:02 PM, John Pitcairn wrote: > The external is therefore a combination of C/C++ code, compiles > with no warnings, and seems to behave itself until it's included in > a standalone. > > Can anyone shed some light on where I'm going wrong, or is this > sort of thing just not supported by the collective/runtime engine? > Project/code (183 lines) available on request.
      If you can post a crash log, we might be able to offer more insight. I would imagine you are just not initializing all memory or there's some other memory violation in your object, and that it just happens to have problems by chance in a standalone. I don't know of specific functional differences in such a case which would lead to any problems.
      -Joshua
    • Aug 14 2006 | 11:30 pm
      I suspect you're right - I've since had a few random Max crashes but only with my object in use, so maybe it's stomping on some memory and that's showing up later at random.
      I'm exhibiting my C/C++ beginnerness here. I'll make a clean-slate version from an example with less stripped out, examine all pointer use, etc, and see how that goes.
      Thanks. Crash log was in my first post...
    • Aug 15 2006 | 12:47 am
      Duh.
      I'd added the path to the project's Deployment build folder to Max search paths. So Max was finding the external, and claimed to be copying it to the collective in the build results.
      But it seems that to successfully copy an external into a standalone collective the external MUST be in the C74 externals folder.
      The standalone startup crash is reproducible using a built version of the "maximum" XCode example, added to the search path (with maximum removed from C74 externals folder).
      Move it there and the built app starts with no crash.
      Could this be considered a bug in the build process?
      I'm not convinced I don't still have a memory issue anyway - unless instantiating/using an external that is in the search path but not in the externals folder could cause a crash in Max?
    • Aug 15 2006 | 12:47 am
      On Aug 14, 2006, at 4:30 PM, John Pitcairn wrote:
      > I suspect you're right - I've since had a few random Max crashes > but only with my object in use, so maybe it's stomping on some > memory and that's showing up later at random. > > Thanks. Crash log was in my first post...
      Unfortunately that crash log just shows that something had completely trashed memory (the call stack shouldn't even be possible). Not sure what you're doing but you might want to send another one if it looks more appropriate to crashing in your library.
      -Joshua
    • Aug 15 2006 | 12:51 am
      We both replied together it seems - see above.
    • Aug 15 2006 | 1:10 am
      On Aug 14, 2006, at 5:47 PM, John Pitcairn wrote: > I'd added the path to the project's Deployment build folder to Max > search paths. So Max was finding the external, and claimed to be > copying it to the collective in the build results. > > But it seems that to successfully copy an external into a > standalone collective the external MUST be in the C74 externals > folder. Move it there and the built app starts with no crash. > > Could this be considered a bug in the build process?
      Unsure. If you'd included the development build (with zero link enabled) it would make more sense, but perhaps something else is amok. Difficult for us to tell here.
      -Joshua
    • Aug 15 2006 | 1:30 am
      As it happens, I don't think this external will be viable anyway - I'm setting the "private" property on CoreMIDI endpoints, to hide MIDI ports from subsequently opened port-greedy apps (like Logic, sigh).
      This could potentially be very handy, using Max to intercept and process a MIDI stream, and prevent the target app from seeing the original hardware source.
      But it appears Max will likely be notified of this change anyway ("sysmidi changed") at some point, and may then attempt to communicate this to any existing objects using that port. The resulting crash is fairly unpredictable - either the external might be stomping on some memory (I'm now not so sure of this), or the private ports are making Max crash.
      A bit too bleeding edge for me. I think I'll abandon this little project. Any comments are welcome.