I’ve been chasing a problem in which typing into TextEditor was causing crashes under AU. Crash logs (I’ve embedded the relevant part of one) didn’t seem to be directly inside Juce. Instead they looked like something that happened as the result of something Juce did. Making the crash is extremely easy for me–type into one TextEditor, then begin to edit in another–boom! The crash log is always the same. My test bed is Logic9, running under Mountain Lion. Same thing happens running Logic as 32-bit or 64-bit.
I thought it might be something about Xcode 4.5.1 or perhaps the AU SDK (we all know there are some problems there), but when I went back to Snow Leopard and Xcode 3.2.6 I had exactly the same result. Then I pulled a slightly older version of the tip from a backup (9/26 to be exact) and the problem went away. Pulled the tip code and the problem’s back. Revert to 9/26 and it’s fine again.
I don’t know exactly when this turned up, since I don’t have all of the revisions between 9/26 and now. But something bad happened. Here’s that chunk of crash log.
[quote]Process: Logic Pro [7355]
Path: /Applications/Logic Pro.app/Contents/MacOS/Logic Pro
Identifier: com.apple.logic.pro
Version: 9.1.7 (1700.57)
Build Info: Logic-17005700~1
Code Type: X86-64 (Native)
Parent Process: launchd [210]
User ID: 501
Date/Time: 2012-10-06 18:51:09.095 -0600
OS Version: Mac OS X 10.8.2 (12C60)
Report Version: 10
Interval Since Last Report: 116592 sec
Crashes Since Last Report: 44
Per-App Interval Since Last Report: 4647 sec
Anonymous UUID: 2DB0C92E-E8E8-BFEB-CA41-29682F08AA38
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: EXC_I386_GPFLT
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8cdfd212 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff87a57af4 pthread_kill + 90
2 libsystem_c.dylib 0x00007fff87a9be9e __abort + 159
3 libsystem_c.dylib 0x00007fff87a9bdff abort + 192
4 com.apple.logic.pro 0x00000001003b1df6 std::_Rb_tree<short, std::pair<short const, CGRect>, std::_Select1st<std::pair<short const, CGRect> >, std::less, std::allocator<std::pair<short const, CGRect> > >::_M_erase(std::_Rb_tree_node<std::pair<short const, CGRect> >) + 98422
5 libsystem_c.dylib 0x00007fff87a448ea _sigtramp + 26
6 libobjc.A.dylib 0x00007fff82024250 objc_msgSend + 16
7 com.apple.CoreFoundation 0x00007fff89422fdb CFStringGetCString + 123
8 com.apple.logic.pro 0x0000000100536580 std::vector<unsigned int, std::allocator >::reserve(unsigned long) + 338880
9 com.apple.logic.pro 0x000000010005aece GetChannelIDForIndex(TAudioBusFormat, int) + 8974
10 com.apple.logic.pro 0x000000010028b847 std::_List_base<copyExcludeRange, std::allocator >::_M_clear() + 4023
11 com.apple.logic.pro 0x000000010027fa86 std::vector<CONTEXTMENUITEM, std::allocator >::_M_insert_aux(__gnu_cxx::__normal_iterator<CONTEXTMENUITEM, std::vector<CONTEXTMENUITEM, std::allocator > >, CONTEXTMENUITEM const&) + 82662
12 com.apple.logic.pro 0x00000001005754db std::vector<TOSCService, std::allocator >::erase(__gnu_cxx::__normal_iterator<TOSCService*, std::vector<TOSCService, std::allocator > >, __gnu_cxx::__normal_iterator<TOSCService*, std::vector<TOSCService, std::allocator > >) + 165563
13 com.apple.logic.pro 0x0000000100510b9b std::vector<unsigned int, std::allocator >::reserve(unsigned long) + 184795
14 com.apple.logic.pro 0x00000001005c05d1 std::_Rb_tree<std::string, std::pair<std::string const, TOSCMessageData>, std::_Select1st<std::pair<std::string const, TOSCMessageData> >, std::lessstd::string, std::allocator<std::pair<std::string const, TOSCMessageData> > >::insert_unique(std::_Rb_tree_iterator<std::pair<std::string const, TOSCMessageData> >, std::pair<std::string const, TOSCMessageData> const&) + 302577
15 com.apple.logic.pro 0x00000001005c0416 std::_Rb_tree<std::string, std::pair<std::string const, TOSCMessageData>, std::_Select1st<std::pair<std::string const, TOSCMessageData> >, std::lessstd::string, std::allocator<std::pair<std::string const, TOSCMessageData> > >::insert_unique(std::_Rb_tree_iterator<std::pair<std::string const, TOSCMessageData> >, std::pair<std::string const, TOSCMessageData> const&) + 302134
16 com.apple.logic.pro 0x00000001005c0416 std::_Rb_tree<std::string, std::pair<std::string const, TOSCMessageData>, std::_Select1st<std::pair<std::string const, TOSCMessageData> >, std::lessstd::string, std::allocator<std::pair<std::string const, TOSCMessageData> > >::insert_unique(std::_Rb_tree_iterator<std::pair<std::string const, TOSCMessageData> >, std::pair<std::string const, TOSCMessageData> const&) + 302134
17 com.apple.AppKit 0x00007fff87ec16a8 -[NSMenu _populateFromDelegateWithEventRef:] + 674
18 com.apple.AppKit 0x00007fff87e65e64 -[NSMenu _populateWithEventRef:] + 83
19 com.apple.AppKit 0x00007fff87ec06ac -[NSCarbonMenuImpl _carbonPopulateEvent:handlerCallRef:] + 427
20 com.apple.AppKit 0x00007fff87ec0245 NSSLMMenuEventHandler + 342
21 com.apple.HIToolbox 0x00007fff832eaf0a DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1206
22 com.apple.HIToolbox 0x00007fff832ea3d9 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 410
23 com.apple.HIToolbox 0x00007fff832ea236 SendEventToEventTargetWithOptions + 43
24 com.apple.HIToolbox 0x00007fff83333d58 SendMenuPopulate(MenuData*, OpaqueEventTargetRef*, unsigned int, double, unsigned int, OpaqueEventRef*, unsigned char*) + 279
25 com.apple.HIToolbox 0x00007fff83333b13 PopulateMenu(MenuData*, OpaqueEventTargetRef*, CheckMenuData*, unsigned int, double) + 77
26 com.apple.HIToolbox 0x00007fff8333321c Check1MenuForKeyEvent(MenuData*, CheckMenuData*) + 207
27 com.apple.HIToolbox 0x00007fff83332b17 CheckMenusForKeyEvent(MenuData*, CheckMenuData*) + 904
28 com.apple.HIToolbox 0x00007fff83332703 _IsMenuKeyEvent(MenuData*, OpaqueEventRef*, unsigned int, MenuData**, unsigned short*) + 697
29 com.apple.HIToolbox 0x00007fff83332419 IsMenuKeyEvent + 120
30 com.apple.AppKit 0x00007fff87ec000c -[NSCarbonMenuImpl _menuItemWithKeyEquivalentMatchingEventRef:] + 295
31 com.apple.AppKit 0x00007fff87ebfdc8 _NSFindMenuItemMatchingCommandKeyEvent + 336
32 com.apple.AppKit 0x00007fff87d7fa78 _NSHandleCarbonMenuEvent + 423
33 com.apple.AppKit 0x00007fff87ca1b7f _DPSNextEvent + 2073
34 com.apple.AppKit 0x00007fff87ca0ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
35 com.apple.AppKit 0x00007fff87c98283 -[NSApplication run] + 517
36 com.apple.prokit 0x000000010120d324 NSProApplicationMain + 378
37 com.apple.logic.pro 0x000000010002a638 DummyConnection::DummyConnection() + 86[/quote]
