Hang on Max/MSP


#1

After a fetch to the commit 3285c2b (juce_mac_MouseCursor.mm) the Max/MSP application hangs at start up with my externals (bundles) that use JUCE. I know that this is a terribly specific situation (not supported) and so i don’t really expect a fix. I open that thread just FYI, and in case that other hackers could confirm (or not) that problem.

Date/Time:       2015-06-13 15:56:27 +0200
OS Version:      10.6.8 (Build 10K549)
Architecture:    x86_64
Report Version:  7

Command:         MaxMSP
Path:            /Applications/Max5/MaxMSP.app/Contents/MacOS/MaxMSP
Version:         5.1.9 (48561) (5.1.9)
Parent:          launchd [103]

PID:             1672
Event:           hang
Duration:        6.00s (sampling started after 2 seconds)
Steps:           20 (100ms sampling interval)

Pageins:         5
Pageouts:        0

Process:         MaxMSP [1672]
Path:            /Applications/Max5/MaxMSP.app/Contents/MacOS/MaxMSP
UID:             501

Thread 40cd       DispatchQueue 100
User stack:
20 start + 41 (in MaxMSP) [0x5925]
20 _start + 216 (in MaxMSP) [0x59fe]
20 main + 76 (in MaxMSP) [0x1e5032]
20 juce::JUCEApplication::main(int, char**, juce::JUCEApplication*) + 125 (in MaxMSP) [0x2dbed3]
20 juce::JUCEApplication::main(juce::String&, juce::JUCEApplication*) + 605 (in MaxMSP) [0x2dbdf9]
20 juce::MessageManager::runDispatchLoop() + 42 (in MaxMSP) [0x2dd49e]
20 juce::MessageManager::dispatchNextMessage(bool, bool*, bool) + 79 (in MaxMSP) [0x2dd3df]
20 juce::juce_dispatchNextMessageOnSystemQueue(bool, bool) + 630 (in MaxMSP) [0x2d37a6]
20 SendEventToEventTarget + 52 (in HIToolbox) [0x925d27f3]
20 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 (in HIToolbox) [0x925afef6]
20 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2672 (in HIToolbox) [0x925b1080]
20 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 1417 (in HIToolbox) [0x925e43ef]
20 SendEventToEventTarget + 52 (in HIToolbox) [0x925d27f3]
20 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 (in HIToolbox) [0x925afef6]
20 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567 (in HIToolbox) [0x925b0c2f]
20 juce::MouseClickHandlerProc(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 195 (in MaxMSP) [0x2d1cd5]
20 MenuSelect + 190 (in HIToolbox) [0x927a5936]
20 MenuSelectCore(MenuData*, Point, double, unsigned long, OpaqueMenuRef**, unsigned short*) + 454 (in HIToolbox) [0x925f3160]
20 FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*) + 152 (in HIToolbox) [0x92623a5d]
20 SendMenuItemSelectedEvent + 121 (in HIToolbox) [0x92623b47]
20 SendMenuCommandWithContextAndModifiers + 66 (in HIToolbox) [0x92623b90]
20 SendHICommandEvent(unsigned long, HICommand const*, unsigned long, unsigned long, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) + 448 (in HIToolbox) [0x925fee87]
20 SendEventToEventTarget + 52 (in HIToolbox) [0x925d27f3]
20 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 (in HIToolbox) [0x925afef6]
20 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567 (in HIToolbox) [0x925b0c2f]
20 app_eventhandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 169 (in MaxMSP) [0x12967]
20 interface_process + 24 (in MaxMSP) [0xe09f4]
20 jmenu_process + 46 (in MaxMSP) [0x15fae8]
20 jmenu_command_process(_jcommand*, unsigned long, object*) + 526 (in MaxMSP) [0x15faa2]
20 object_method_typed + 174 (in MaxMSP) [0xb84c2]
20 object_method_typedfun + 134 (in MaxMSP) [0xb83da]
20 max_openrecent + 54 (in MaxMSP) [0xe0ea4]
20 recent_exec(long) + 137 (in MaxMSP) [0x5c711]
20 fileload + 41 (in MaxMSP) [0x12235]
20 fileload_unique + 99 (in MaxMSP) [0x11efd]
20 fileload_extended + 169 (in MaxMSP) [0x11991]
20 lowload_type + 597 (in MaxMSP) [0x11091]
20 jpatcher_load(char*, short, short, atom*) + 374 (in MaxMSP) [0x10e04]
20 jpatcher_load_frombuffer(char*, short, char const*, long, short, atom*) + 314 (in MaxMSP) [0x10b90]
20 jpatcher_load_fromdictionary(char*, short, object*, short, atom*) + 437 (in MaxMSP) [0x10a0d]
20 object_new_typed + 46 (in MaxMSP) [0xbc412]
20 object_new_typed_flags + 637 (in MaxMSP) [0xbc3d3]
20 typedmess_fun + 1973 (in MaxMSP) [0x1caef]
20 jpatcher_new + 900 (in MaxMSP) [0x1813e6]
20 jpatcher_fromdictionary + 1692 (in MaxMSP) [0x181050]
20 jpatcher_pastefromdictionary + 670 (in MaxMSP) [0x171240]
20 jpatcher_newobject + 380 (in MaxMSP) [0x170c1e]
20 object_new_typed + 46 (in MaxMSP) [0xbc412]
20 object_new_typed_flags + 578 (in MaxMSP) [0xbc398]
20 typedmess_fun + 1973 (in MaxMSP) [0x1caef]
20 jnewobj_new + 2283 (in MaxMSP) [0x16311b]
20 atombuf_eval + 152 (in MaxMSP) [0x83e0]
20 aeval + 899 (in MaxMSP) [0x1d1f9]
20 typedmess + 83 (in MaxMSP) [0x1cb79]
20 typedmess_fun + 1973 (in MaxMSP) [0x1caef]
20 newload + 40 (in MaxMSP) [0x117f2]
20 newload_internal + 93 (in MaxMSP) [0x114a5]
20 object_new_typed + 46 (in MaxMSP) [0xbc412]
20 object_new_typed_flags + 637 (in MaxMSP) [0xbc3d3]
20 typedmess_fun + 1973 (in MaxMSP) [0x1caef]
20 tll_new(symbol*, long, atom*) + 239 (Tralala.cpp:202 in tralala) [0x18241a00]
20 _tll::_tll() + 56 (Tralala.cpp:39 in tralala) [0x18248a4c]
20 Wrapper::Wrapper(_tll&) + 25 (Tralala.hpp:238 in tralala) [0x182485dd]
20 Wrapper::Window::Window() + 373 (Tralala.hpp:111 in tralala) [0x18248285]
20 juce::ResizableWindow::setResizable(bool, bool) + 136 (juce_ResizableWindow.cpp:272 in tralala) [0x18513a3c]
20 juce::ResizableCornerComponent::ResizableCornerComponent(juce::Component*, juce::ComponentBoundsConstrainer*) + 137 (juce_ResizableCornerComponent.cpp:31 in tralala) [0x18513909]
20 juce::MouseCursor::MouseCursor(juce::MouseCursor::StandardCursorType) + 23 (juce_MouseCursor.cpp:137 in tralala) [0x1850a4df]
20 juce::MouseCursor::SharedCursorHandle::createStandard(juce::MouseCursor::StandardCursorType) + 93 (juce_MouseCursor.cpp:75 in tralala) [0x185a09b5]
20 juce::GenericScopedLock::GenericScopedLock(juce::SpinLock const&) + 25 (juce_ScopedLock.h:72 in tralala) [0x182a7a25]
19 juce::SpinLock::enter() const + 70 (juce_Thread.cpp:263 in tralala) [0x182ef62e]
18 juce::Thread::yield() + 11 (juce_posix_SharedCode.h:943 in tralala) [0x182ead91]
16 swtch_pri + 10 (in libSystem.B.dylib) [0x98c58bd2]
2 swtch_pri + 0 (in libSystem.B.dylib) [0x98c58bc8]
1 sched_yield + 0 (in libSystem.B.dylib) [0x98ccf227]
1 juce::SpinLock::enter() const + 81 (juce_Thread.cpp:263 in tralala) [0x182ef639]
1 juce::SpinLock::tryEnter() const + 33 (juce_SpinLock.h:66 in tralala) [0x1833a9e1]
1 juce::Atomic::compareAndSetBool(int, int) + 31 (juce_Atomic.h:356 in tralala) [0x18245cab]
1 juce::Atomic::castTo32Bit(int) + 17 (juce_Atomic.h:161 in tralala) [0x18408bb9]
  1 int juce::Atomic::castTo(int) + 15 (juce_Atomic.h:157 in tralala) [0x1823c6f3]
  
Kernel stack:
    9 lo_mach_scall + 266 [0x2a20ea]
    6 lo_allintrs + 302 [0x2a1c2e]
      6 interrupt + 192 [0x2ab423]
        6 lapic_interrupt + 108 [0x2b32f2]
          6 mp_kdp_exit + 868 [0x2b4560]
            6 sync_iss_to_iks + 124 [0x2aabf6]
    4 lo_mach_scall + 280 [0x2a20f8]
      1 mach_kauth_cred_uthread_update + 0 [0x470576]
      1 get_user_regs + 88 [0x295748]
      1 get_user_regs + 100 [0x295754]
      1 get_user_regs + 548 [0x295914]
        1 swtch_pri + 47 [0x22b95d]
          1 kernel_preempt_check + 70 [0x2aac45]
            1 ml_set_interrupts_enabled + 47 [0x2a45e3]
    1 swtch_pri + 166 [0x22b9d4]
MaxMSP[1720]	13/06/15 15:59:12	*** Assertion failure in -[NSBitmapImageRep initWithCGImage:], /SourceCache/AppKit/AppKit-1038.36/AppKit.subproj/NSBitmapImageRep.m:1215
MaxMSP[1720]	13/06/15 15:59:12	HIToolbox: ignoring exception 'Invalid parameter not satisfying: cgImage != NULL' that raised inside Carbon event dispatch
(
	0   CoreFoundation                      0x914226ca __raiseError + 410
	1   libobjc.A.dylib                     0x9802c5a9 objc_exception_throw + 56
	2   CoreFoundation                      0x914223f8 +[NSException raise:format:arguments:] + 136
	3   Foundation                          0x924166e7 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
	4   AppKit                              0x90453e1f -[NSBitmapImageRep initWithCGImage:] + 152
	5   tralala                             0x185d9134 _ZN4juce18MouseCursorHelpersL14fromHIServicesEPKc + 732
	6   tralala                             0x185d96ba _ZN4juce11MouseCursor25createStandardMouseCursorENS0_18StandardCursorTypeE + 762
	7   tralala                             0x1866fbbb _ZN4juce11MouseCursor18SharedCursorHandleC1ENS0_18StandardCursorTypeE + 17
	8   tralala                             0x1866fc8d _ZN4juce11MouseCursor18SharedCursorHandle14createStandardENS0_18StandardCursorTypeE + 149
	9   tralala                             0x185d977f _ZN4juce11MouseCursorC1ENS0_18StandardCursorTypeE + 23
	10  tralala                             0x185e2ba9 _ZN4juce24ResizableCornerComponentC1EPNS_9ComponentEPNS_26ComponentBoundsConstrainerE + 137
	11  tralala                             0x185e2cdc _ZN4juce15ResizableWindow12setResizableEbb + 136
	12  tralala                             0x18317645 _ZN7Wrapper6WindowC1Ev + 373
	13  tralala                             0x1831799d _ZN7WrapperC1ER4_tll + 25
	14  tralala                             0x18317e0c _ZN4_tllC1Ev + 56
	15  tralala                             0x18310dc0 _Z7tll_newP6symbollP4atom + 239
	16  MaxMSP                              0x0001caef typedmess_fun + 1973
	17  MaxMSP                              0x000bc3d3 object_new_typed_flags + 637
	18  MaxMSP                              0x000bc412 object_new_typed + 46
	19  MaxMSP                              0x000114ed newload_internal + 165
	20  MaxMSP                              0x000117f2 newload + 40
	21  MaxMSP                              0x0001caef typedmess_fun + 1973
	22  MaxMSP                              0x0001cb79 typedmess + 83
	23  MaxMSP                              0x0001d1f9 aeval + 899
	24  MaxMSP                              0x000083e0 atombuf_eval + 152
	25  MaxMSP                              0x0016311b jnewobj_new + 2283
	26  MaxMSP                              0x0001caef typedmess_fun + 1973
	27  MaxMSP                              0x000bc398 object_new_typed_flags + 578
	28  MaxMSP                              0x000bc412 object_new_typed + 46
	29  MaxMSP                              0x00170c1e jpatcher_newobject + 380
	30  MaxMSP                              0x00171240 jpatcher_pastefromdictionary + 670
	31  MaxMSP                              0x00181050 jpatcher_fromdictionary + 1692
	32  MaxMSP                              0x001813e6 jpatcher_new + 900
	33  MaxMSP                              0x0001caef typedmess_fun + 1973
	34  MaxMSP                              0x000bc3d3 object_new_typed_flags + 637
	35  MaxMSP                              0x000bc412 object_new_typed + 46
	36  MaxMSP                              0x00010a0d _Z28jpatcher_load_fromdictionaryPcsP6objectsP4atom + 437
	37  MaxMSP                              0x00010b90 _Z24jpatcher_load_frombufferPcsPKclsP4atom + 314
	38  MaxMSP                              0x00010e04 _Z13jpatcher_loadPcssP4atom + 374
	39  MaxMSP                              0x00011091 lowload_type + 597
	40  MaxMSP                              0x00011991 fileload_extended + 169
	41  MaxMSP                              0x00011efd fileload_unique + 99
	42  MaxMSP                              0x00012235 fileload + 41
	43  MaxMSP                              0x0005c711 _Z11recent_execl + 137
	44  MaxMSP                              0x000e0ea4 max_openrecent + 54
	45  MaxMSP                              0x000b83da object_method_typedfun + 134
	46  MaxMSP                              0x000b84c2 object_method_typed + 174
	47  MaxMSP                              0x0015faa2 _Z21jmenu_command_processP9_jcommandmP6object + 526
	48  MaxMSP                              0x0015fae8 jmenu_process + 46
	49  MaxMSP                              0x000e09f4 interface_process + 24
	50  MaxMSP                              0x00012967 _Z16app_eventhandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 169
	51  HIToolbox                           0x925b0c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
	52  HIToolbox                           0x925afef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
	53  HIToolbox                           0x925d27f3 SendEventToEventTarget + 52
	54  HIToolbox                           0x925fee87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
	55  HIToolbox                           0x92623b90 SendMenuCommandWithContextAndModifiers + 66
	56  HIToolbox                           0x92623b47 SendMenuItemSelectedEvent + 121
	57  HIToolbox                           0x92623a5d _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 152
	58  HIToolbox                           0x925f3160 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454
	59  HIToolbox                           0x927a5936 MenuSelect + 190
	60  MaxMSP                              0x002d1cd5 _ZN4juce21MouseClickHandlerProcEP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 195
	61  HIToolbox                           0x925b0c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
	62  HIToolbox                           0x925afef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
	63  HIToolbox                           0x925d27f3 SendEventToEventTarget + 52
	64  HIToolbox                           0x925e43ef _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv + 1417
	65  HIToolbox                           0x925b1080 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 2672
	66  HIToolbox                           0x925afef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
	67  HIToolbox                           0x925d27f3 SendEventToEventTarget + 52
	68  MaxMSP                              0x002d37a6 _ZN4juce37juce_dispatchNextMessageOnSystemQueueEbb + 630
	69  MaxMSP                              0x002dd3df _ZN4juce14MessageManager19dispatchNextMessageEbPbb + 79
	70  MaxMSP                              0x002dd49e _ZN4juce14MessageManager15runDispatchLoopEv + 42
	71  MaxMSP                              0x002dbdf9 _ZN4juce15JUCEApplication4mainERNS_6StringEPS0_ + 605
	72  MaxMSP                              0x002dbed3 _ZN4juce15JUCEApplication4mainEiPPcPS0_ + 125
	73  MaxMSP                              0x001e5032 main + 76
	74  MaxMSP                              0x000059fe _start + 216
	75  MaxMSP                              0x00005925 start + 41
)

#2

Hmm. I'll certainly stop it causing an error and make it fail gracefully, but I'm curious as to why the code doesn't work.. Which OS version are you using and targeting?


#3

I’m Mac OS X 10.6 and targeting Mac OS X 10.6 also.


#4

Ok.. Maybe a problem with older SDKs then. I'll see what I can do..


#5

Surely ; i can test some snippets on my system if you don’t want to mess the repository.


#6

Thanks, seems OK now.