Crash in NSSavePanel upon clicking a folder/directory - xcode

I built the app with Standard Architectures (64-bit Intel) (x86_64), SDK: Latest OSX (OSX 10.9) and deployment target: 10.8 using Xcode 5.1.1.
Upon Opening NSSavePanel, once the user clicks a folder, the app crashes. Below are the code snippets and the crash log. This issue does not happen in my development macbook (OS: 10.9.5). It just happens in the client's macbook (OS: 10.8.2). I can't run Xcode in my client's macbook by the way.
-(IBAction)onSaveScriptFileAs:(id)sender
{
NSSavePanel *theSavePanel = [NSSavePanel savePanel];
[theSavePanel setTitle:#"Save Test Script As"];
[theSavePanel setAllowedFileTypes:[NSArray arrayWithObject:#"ts"]];
if (tempScriptFileName != nil) {
[theSavePanel setNameFieldStringValue:tempScriptFileName];
}
if ([theSavePanel runModal] == NSFileHandlingPanelOKButton)
{
[self saveScriptFile:[[theSavePanel URL] path]];
[self setTempScriptFileName:nil];
}
}
Crash Log:
Process: MyAppName [5480]
Path: /Volumes/VOLUME/*/MyAppName5.18.85b.app/Contents/MacOS/MyAppName
Identifier: com.MyAppName
Version: 5.18.85b (5.18.85b)
Code Type: X86-64 (Native)
Parent Process: launchd [202]
User ID: 502
Date/Time: 2014-09-15 09:28:58.781 -0700
OS Version: Mac OS X 10.8.2 (12C3104)
Report Version: 10
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
VM Regions Near 0x8:
-->
__TEXT 00000001085db000-000000010866a000 [ 572K] r-x/rwx SM=COW /Volumes/VOLUME/*/MyAppName5.18.85b.app/Contents/MacOS/MyAppName
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ??? 0x0000000000000008 0 + 8
1 com.apple.FinderKit 0x00007fff8aea97ee ApplicationURL(TString const&) + 77
2 com.apple.FinderKit 0x00007fff8aea9a27 AppBundleIDCanOpenExtension(TString const&, TString const&) + 392
3 com.apple.FinderKit 0x00007fff8aeaa245 PreviewCanOpenExtension(TString const&) + 177
4 com.apple.FinderKit 0x00007fff8aeaa55e -[FIFinderViewGutsController finderLocationPopUpWillDisplay:] + 198
5 com.apple.FinderKit 0x00007fff8aed47ff -[FILocationPopUp menuNeedsUpdate:] + 46
6 com.apple.AppKit 0x00007fff89c486a8 -[NSMenu _populateFromDelegateWithEventRef:] + 674
7 com.apple.AppKit 0x00007fff89bece64 -[NSMenu _populateWithEventRef:] + 83
8 com.apple.AppKit 0x00007fff89c476ac -[NSCarbonMenuImpl _carbonPopulateEvent:handlerCallRef:] + 427
9 com.apple.AppKit 0x00007fff89c47245 NSSLMMenuEventHandler + 342
10 com.apple.HIToolbox 0x00007fff8769ff0a DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1206
11 com.apple.HIToolbox 0x00007fff8769f3d9 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 410
12 com.apple.HIToolbox 0x00007fff8769f236 SendEventToEventTargetWithOptions + 43
13 com.apple.HIToolbox 0x00007fff876e8d58 SendMenuPopulate(MenuData*, OpaqueEventTargetRef*, unsigned int, double, unsigned int, OpaqueEventRef*, unsigned char*) + 279
14 com.apple.HIToolbox 0x00007fff87671d5a SendMenuOpening(MenuSelectData*, MenuData*, double, unsigned int, unsigned int, __CFDictionary*, unsigned char, unsigned char*) + 286
15 com.apple.HIToolbox 0x00007fff87806cff PopUpMenuSelectCore(MenuData*, Point, double, Point, unsigned short, unsigned int, Rect const*, unsigned short, unsigned int, Rect const*, Rect const*, __CFString const*, OpaqueMenuRef**, unsigned short*) + 895
16 com.apple.HIToolbox 0x00007fff87806924 _HandlePopUpMenuSelection7 + 629
17 com.apple.AppKit 0x00007fff89cca61b _NSSLMPopUpCarbonMenu3 + 3916
18 com.apple.AppKit 0x00007fff8a02bd2a _NSPopUpCarbonMenu3 + 39
19 com.apple.AppKit 0x00007fff89cc95dc -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] + 346
20 com.apple.AppKit 0x00007fff89e8d315 -[NSPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 540
21 com.apple.AppKit 0x00007fff89b15c9c -[NSControl mouseDown:] + 820
22 com.apple.AppKit 0x00007fff89b0d60e -[NSWindow sendEvent:] + 6853
23 com.apple.AppKit 0x00007fff89b09744 -[NSApplication sendEvent:] + 5761
24 com.apple.AppKit 0x00007fff89c7276a -[NSApplication _realDoModalLoop:peek:] + 582
25 com.apple.AppKit 0x00007fff89c729ce -[NSApplication runModalForWindow:] + 120
26 com.apple.AppKit 0x00007fff89ebddb6 -[NSSavePanel runModal] + 302
27 com.TopTestDFU 0x00000001085f22fe -[AppController onSaveScriptFileAs:] + 148
28 com.apple.AppKit 0x00007fff89b18a59 -[NSApplication sendAction:to:from:] + 342
29 com.apple.AppKit 0x00007fff89c4e44c -[NSMenuItem _corePerformAction] + 406
30 com.apple.AppKit 0x00007fff89c4e13a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 133
31 com.apple.AppKit 0x00007fff8993b46f -[NSMenu _internalPerformActionForItemAtIndex:] + 36
32 com.apple.AppKit 0x00007fff8993b2f7 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 135
33 com.apple.AppKit 0x00007fff89c47245 NSSLMMenuEventHandler + 342
34 com.apple.HIToolbox 0x00007fff8769ff0a DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1206
35 com.apple.HIToolbox 0x00007fff8769f3d9 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 410
36 com.apple.HIToolbox 0x00007fff876b51bd SendEventToEventTarget + 40
37 com.apple.HIToolbox 0x00007fff876ebe89 SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) + 443
38 com.apple.HIToolbox 0x00007fff87690c11 SendMenuCommandWithContextAndModifiers + 59
39 com.apple.HIToolbox 0x00007fff87690bc3 SendMenuItemSelectedEvent + 254
40 com.apple.HIToolbox 0x00007fff87690a4f FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*) + 94
41 com.apple.HIToolbox 0x00007fff8766caab MenuSelectCore(MenuData*, Point, double, unsigned int, OpaqueMenuRef**, unsigned short*) + 605
42 com.apple.HIToolbox 0x00007fff8766c0b8 _HandleMenuSelection2 + 565
43 com.apple.AppKit 0x00007fff89b069c6 _NSHandleCarbonMenuEvent + 245
44 com.apple.AppKit 0x00007fff89a28b7f _DPSNextEvent + 2073
45 com.apple.AppKit 0x00007fff89a27ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
46 com.apple.AppKit 0x00007fff89a1f283 -[NSApplication run] + 517
47 com.apple.AppKit 0x00007fff899c3cb6 NSApplicationMain + 869
48 com.TopTestDFU 0x00000001085dc3d4 start + 52
Thank you!

My only guess is that your using Latest SDK 10.9, and client is running on 10.8.
Try linking with 10.8 SDK and giving that to client.
By the way, I use Xcode 6, but I'm still linking to 10.6 SDK using some trickery.
Must support older clients.

Related

Xcode Storyboard Reset to Suggested Constraints Error

Started getting this today after upgrading to iOS 11:
Any body have an ideas? I get this when I do Reset To Suggested Constraints:
Was working for months until today. Here's the log:
=================================
XCODE VERSION INFO:
Version = 9.0 (9A235)
Plugin Version = 13196
Beta Version = 0
OS Version = 10.12.6 (16G29)
=================================
ARBITER ERROR:
Failed to run arbitration with options: {
KeepRedundantDocumentConstraints = 1;
OnlyArbitrateConstraintsForViews = "{(\n >,\n ; layer = >,\n >,\n ; layer = >,\n ; layer = >,\n ; layer = >\n)}";
RelationshipHints = {
CommandKeyDown = 0;
Source = 4;
};
} (Failure reason: Left-over temporary explicit constraint: UIView[0x7fb68bf370a0].Width = + 375.000000 containingView={} scoreVector=, roundingAdjustment=0)
=================================
IDE ARBITRATION UNIT:
Register View Controller
Top Layout Guide
Bottom Layout Guide
View frame={{0, 0}, {375, 667}} tAMIC=YES
Email Address frame={{87, 272}, {200, 30}} tAMIC=YES
********* frame={{87, 321}, {200, 30}} tAMIC=YES
Register frame={{87, 370}, {200, 40}} tAMIC=YES
First Name frame={{87, 170}, {200, 30}} tAMIC=YES
Last Name frame={{87, 219}, {200, 30}} tAMIC=YES
=================================
BACKTRACE:
0 -[IBDocumentAutolayoutManager _scheduleArbitrationOfUnit:withOptions:] (in IDEInterfaceBuilderKit)
1 -[IBDocumentAutolayoutManager _runAutolayoutCommandForArbitrationUnits:withBlock:] (in IDEInterfaceBuilderKit)
2 -[IBDocumentAutolayoutManager _whitelistAndDecideConstraintsForItems:withOptions:] (in IDEInterfaceBuilderKit)
3 -[IBDocumentAutolayoutManager clearAndAddSuggestedConstraintsForItems:inAllConfigurations:] (in IDEInterfaceBuilderKit)
4 65-[IBDocument clearAndAddSuggestedConstraintsForItems:fromSource:]_block_invoke.4171 (in IDEInterfaceBuilderKit)
5 -[IBMemberRelationshipHelper handleOperation:onObjects:inDocument:hints:currentConfigurationOnlyHandler:defaultConfigurationHandler:] (in IDEInterfaceBuilderKit)
6 -[IBMemberRelationshipHelper handleOperation:onObjects:inDocument:fromSource:currentConfigurationOnlyHandler:defaultConfigurationHandler:] (in IDEInterfaceBuilderKit)
7 -[IBDocument clearAndAddSuggestedConstraintsForItems:fromSource:] (in IDEInterfaceBuilderKit)
8 -[IBAbstractDocumentEditor clearAndAddSuggestedConstraintsInArbitrationUnit:] (in IDEInterfaceBuilderKit)
9 _os_activity_initiate_impl (in libsystem_trace.dylib)
10 -[NSApplication(NSResponder) sendAction:to:from:] (in AppKit)
11 __37-[DVTApplication sendAction:to:from:]_block_invoke (in DVTKit)
12 DVTInvokeWithFailureHint (in DVTFoundation)
13 -[DVTApplication sendAction:to:from:] (in DVTKit)
14 -[NSMenuItem _corePerformAction] (in AppKit)
15 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] (in AppKit)
16 _os_activity_initiate_impl (in libsystem_trace.dylib)
17 -[NSMenu performActionForItemAtIndex:] (in AppKit)
18 -[NSMenu _internalPerformActionForItemAtIndex:] (in AppKit)
19 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] (in AppKit)
20 NSSLMMenuEventHandler (in AppKit)
21 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) (in HIToolbox)
22 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) (in HIToolbox)
23 SendEventToEventTarget (in HIToolbox)
24 SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) (in HIToolbox)
25 SendMenuCommandWithContextAndModifiers (in HIToolbox)
26 SendMenuItemSelectedEvent (in HIToolbox)
27 FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*) (in HIToolbox)
28 PopUpMenuSelectCore(MenuData*, Point, double, Point, unsigned short, unsigned int, Rect const*, unsigned short, unsigned int, Rect const*, Rect const*, __CFDictionary const*, __CFString const*, OpaqueMenuRef**, unsigned short*) (in HIToolbox)
29 _HandlePopUpMenuSelection8(OpaqueMenuRef*, OpaqueEventRef*, unsigned int, Point, unsigned short, unsigned int, Rect const*, unsigned short, Rect const*, Rect const*, __CFDictionary const*, __CFString const*, OpaqueMenuRef**, unsigned short*) (in HIToolbox)
30 _HandlePopUpMenuSelectionWithDictionary (in HIToolbox)
31 _NSSLMPopUpCarbonMenu3 (in AppKit)
32 -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] (in AppKit)
33 -[NSSegmentedCell _trackSelectedItemMenu] (in AppKit)
34 -[NSSegmentedCell _displayDelayedMenu] (in AppKit)
35 __NSFireTimer (in Foundation)
36 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION (in CoreFoundation)
37 __CFRunLoopDoTimer (in CoreFoundation)
38 __CFRunLoopDoTimers (in CoreFoundation)
39 __CFRunLoopRun (in CoreFoundation)
40 CFRunLoopRunSpecific (in CoreFoundation)
41 RunCurrentEventLoopInMode (in HIToolbox)
42 ReceiveNextEventCommon (in HIToolbox)
43 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
44 _DPSNextEvent (in AppKit)
45 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
46 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
47 -[NSWindow(NSEventRouting) trackEventsMatchingMask:timeout:mode:handler:] (in AppKit)
48 -[NSDragEventTracker trackEvent:usingHandler:] (in AppKit)
49 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] (in AppKit)
50 -[NSSegmentedCell trackMouse:inRect:ofView:untilMouseUp:] (in AppKit)
51 -[NSControl mouseDown:] (in AppKit)
52 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] (in AppKit)
53 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] (in AppKit)
54 -[NSWindow(NSEventRouting) sendEvent:] (in AppKit)
55 -[IDEWorkspaceWindow sendEvent:] (in IDEKit)
56 -[NSApplication(NSEvent) sendEvent:] (in AppKit)
57 -[IDEApplication sendEvent:] (in IDEKit)
58 -[NSApplication run] (in AppKit)
59 NSApplicationMain (in AppKit)
60 start (in libdyld.dylib)

How to debug app crashing on macOS Sierra at [[_NSCGSWindowBuffer colorSpace] retain]

I distribute an app through the Mac App Store. With the upgrade to macOS Sierra (10.12 & 10.12.1), a lot of my users see the app crashing at seemingly random times.
I've not been able to reproduce this myself, but it is affecting a lot of users. I suspect that a change in macOS Sierra is causing this, because the app works fine on older versions of Mac OS X.
How can I go about debugging this when the crash is deep in AppKit?
Here's what I have/know:
Document-based Mac app built on Mac OS X 10.11 (Xcode 7.2)
Works fine on 10.11 and before, crashes at random times on 10.12 and 10.12.1
It uses an embedded WebView
Cause is each time: objc_msgSend() selector name: retain at -[_NSCGSWindowBuffer colorSpace]
All crash logs show references to com.apple.JavaScriptCore in stack traces of other threads
Some users said they used the app in full-screen or split-view mode when it crashed
Looking at the stack trace, could this be an issue in WebKit or is this a coincidence, because my app happens to include an embedded WebView?
I thought about adding more logging statements to the app and give a special debug version to a few users. Is there something I could log or watch out for to figure out what is causing this?
At this point, I'm thankful for any and all suggestions...
EDIT:
One other developer running into the same issue got in touch with me. If you are seeing the same problem, please let me know so that we can compare notes and hopefully spot a pattern.
Crash log (excerpt):
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00002a955ae2bec0
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
VM Regions Near 0x2a955ae2bec0:
JS JIT generated code 000026d481e01000-000026d481e02000 [ 4K] ---/rwx SM=NUL
-->
MALLOC_NANO 0000600000000000-0000600002400000 [ 36.0M] rw-/rwx SM=PRV
Application Specific Information:
objc_msgSend() selector name: retain
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fffa66d8b5d objc_msgSend + 29
1 com.apple.AppKit 0x00007fff8fc86b71 -[_NSCGSWindowBuffer colorSpace] + 33
2 com.apple.AppKit 0x00007fff8fc5b5ad __NSCGSWindowBackingStoreMark__block_invoke + 997
3 com.apple.AppKit 0x00007fff8fc1eba3 NSCGSTransactionRunPreCommitActionsForOrder_ + 289
4 com.apple.AppKit 0x00007fff8fc1ea6f NSCGSTransactionRunPreCommitActions_ + 31
5 com.apple.AppKit 0x00007fff8fc1ea44 __39+[_NSCGSTransaction currentTransaction]_block_invoke + 34
6 com.apple.QuartzCore 0x00007fff979921ba CA::Transaction::run_commit_handlers(CATransactionPhase) + 46
7 com.apple.QuartzCore 0x00007fff97a9a12f CA::Context::commit_transaction(CA::Transaction*) + 959
8 com.apple.QuartzCore 0x00007fff97990d55 CA::Transaction::commit() + 475
9 com.apple.AppKit 0x00007fff8ff00c69 __37+[NSDisplayCycle currentDisplayCycle]_block_invoke.31 + 323
10 com.apple.CoreFoundation 0x00007fff91e75ec7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
11 com.apple.CoreFoundation 0x00007fff91e75e37 __CFRunLoopDoObservers + 391
12 com.apple.CoreFoundation 0x00007fff91e56d79 __CFRunLoopRun + 873
13 com.apple.CoreFoundation 0x00007fff91e567b4 CFRunLoopRunSpecific + 420
14 com.apple.HIToolbox 0x00007fff913f2fbc RunCurrentEventLoopInMode + 240
15 com.apple.HIToolbox 0x00007fff913f2cf9 ReceiveNextEventCommon + 184
16 com.apple.HIToolbox 0x00007fff913f2c26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
17 com.apple.AppKit 0x00007fff8fadcb79 _DPSNextEvent + 1093
18 com.apple.AppKit 0x00007fff901f21c3 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1637
19 com.apple.AppKit 0x00007fff8fad153d -[NSApplication run] + 926
20 com.apple.AppKit 0x00007fff8fa9c1ad NSApplicationMain + 1237
21 libdyld.dylib 0x00007fffa6fc3255 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fffa70f1fde __semwait_signal + 10
1 libsystem_c.dylib 0x00007fffa7078b72 nanosleep + 199
2 libc++.1.dylib 0x00007fffa5ba865b std::__1::this_thread::sleep_for(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > const&) + 80
3 com.apple.JavaScriptCore 0x00007fff94ccb3df void std::__1::this_thread::sleep_for<long long, std::__1::ratio<1l, 1000l> >(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> > const&) + 63
4 com.apple.JavaScriptCore 0x00007fff94cca3d1 bmalloc::waitUntilFalse(std::__1::unique_lock<bmalloc::StaticMutex>&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >, bool&) + 113
5 com.apple.JavaScriptCore 0x00007fff94cca220 bmalloc::Heap::scavenge(std::__1::unique_lock<bmalloc::StaticMutex>&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >) + 48
6 com.apple.JavaScriptCore 0x00007fff94cca0b4 bmalloc::Heap::concurrentScavenge() + 68
7 com.apple.JavaScriptCore 0x00007fff94ccb621 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop() + 97
8 com.apple.JavaScriptCore 0x00007fff94ccb529 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadEntryPoint(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*) + 9
9 com.apple.JavaScriptCore 0x00007fff94ccb7dd void* std::__1::__thread_proxy<std::__1::tuple<void (*)(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*), bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*> >(void*) + 93
10 libsystem_pthread.dylib 0x00007fffa71daaab _pthread_body + 180
11 libsystem_pthread.dylib 0x00007fffa71da9f7 _pthread_start + 286
12 libsystem_pthread.dylib 0x00007fffa71da221 thread_start + 13
[...]

Swift 2.0 spritekit application crash, EXC_BAD_ACCESS, with no traceback to the relevant line

EDIT: new description after transitioning to swift 2.0.
I'm working with an existing Swift 2.0 app on OSX 10.10, built with XCode 7.1. It's an interactive kiosk application running on a Mac Mini - a spritekit app that is doing some lower-level serial comms to accept input from a button and a few potentiometers (though that aspect is not causing any issues).
I've had issues with random crashing in deployment that never showed up in development or testing, often 6-8 hours into run time. I've gone back and more carefully unwrapped all optionals, which has helped the stability somewhat. But I am still getting daily crashes of this application.
Below is the latest symbolicated crash log:
Time Awake Since Boot: 7100 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000000000007c
VM Regions Near 0x7c:
-->
__TEXT 0000000100fee000-000000010100e000 [ 128K] r-x/rwx SM=COW /Users/USER/Documents/Volcano13.app/Contents/MacOS/Volcano
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.SpriteKit 0x000000010109fbe3 SKCSprite::removeSubsprite(SKCSprite*) + 131
1 com.apple.SpriteKit 0x00000001010a962d SKCEmitterSprite::~SKCEmitterSprite() + 79
2 com.apple.SpriteKit 0x00000001010a9224 SKCEmitterSprite::~SKCEmitterSprite() + 14
3 com.apple.SpriteKit 0x00000001010cdec6 -[SKNode dealloc] + 34
4 libobjc.A.dylib 0x00007fff85f8b89c objc_object::sidetable_release(bool) + 236
5 com.apple.CoreFoundation 0x00007fff897d5db0 CFRelease + 304
6 com.apple.CoreFoundation 0x00007fff897ea39d -[__NSArrayM dealloc] + 205
7 libobjc.A.dylib 0x00007fff85f8b89c objc_object::sidetable_release(bool) + 236
8 com.apple.SpriteKit 0x00000001010ce024 -[SKNode .cxx_destruct] + 179
9 libobjc.A.dylib 0x00007fff85f76ae8 object_cxxDestructFromClass(objc_object*, objc_class*) + 127
10 libobjc.A.dylib 0x00007fff85f71637 objc_destructInstance + 119
11 libobjc.A.dylib 0x00007fff85f71595 object_dispose + 22
12 com.apple.AppKit 0x00007fff908f1cec -[NSResponder dealloc] + 139
13 com.apple.SpriteKit 0x00000001010cdee5 -[SKNode dealloc] + 65
14 com.apple.SpriteKit 0x00000001010be1b2 -[SKEffectNode dealloc] + 99
15 libobjc.A.dylib 0x00007fff85f8b89c objc_object::sidetable_release(bool) + 236
16 com.apple.SpriteKit 0x0000000101069d52 -[SKView renderCallback:shouldBlock:] + 635
17 com.apple.SpriteKit 0x00000001010675ff __29-[SKView setUpRenderCallback]_block_invoke + 56
18 com.apple.SpriteKit 0x00000001010befbf __39-[SKDisplayLink _callbackForNextFrame:]_block_invoke33 + 32
19 libdispatch.dylib 0x00007fff86e79c13 _dispatch_client_callout + 8
20 libdispatch.dylib 0x00007fff86e8704e _dispatch_barrier_sync_f_slow_invoke + 412
21 libdispatch.dylib 0x00007fff86e79c13 _dispatch_client_callout + 8
22 libdispatch.dylib 0x00007fff86e85cbf _dispatch_main_queue_callback_4CF + 861
23 com.apple.CoreFoundation 0x00007fff898743f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
24 com.apple.CoreFoundation 0x00007fff8982f68f __CFRunLoopRun + 2159
25 com.apple.CoreFoundation 0x00007fff8982ebd8 CFRunLoopRunSpecific + 296
26 com.apple.HIToolbox 0x00007fff8c67956f RunCurrentEventLoopInMode + 235
27 com.apple.HIToolbox 0x00007fff8c6792ea ReceiveNextEventCommon + 431
28 com.apple.HIToolbox 0x00007fff8c67912b _BlockUntilNextEventMatchingListInModeWithFilter + 71
29 com.apple.AppKit 0x00007fff908fd8ab _DPSNextEvent + 978
30 com.apple.AppKit 0x00007fff908fce58 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
31 com.apple.AppKit 0x00007fff908f2af3 -[NSApplication run] + 594
32 com.apple.AppKit 0x00007fff9086f244 NSApplicationMain + 1832
33 cmnh.Volcano 0x00000001010092b9 main (in Volcano) (AppDelegate.swift:23)
34 libdyld.dylib 0x00007fff8dd315c9 start + 1
This seems to me to indicate a problem with removing an SKEmitter sprite after one of my scenes ended, but does not point me to anything more specific than that.
I do have two SKEmitter sprites that I added using the scene editor in XCode, both stationary with no target nodes. I pause and unpause them within my scene controller, but otherwise do no other operations with them. In fact, I am not adding or removing any nodes within the controller - everything that I need in the scene is the same as what is contained in the scene's SKS file.
Any suggestions?

Xcode 3.2.1 crashes on startup on OS X 10.6.2

I have uninstalled it via the devtools uninstall command and reinstalled 3 times to no avail. This all started when I downloaded iphone_sdk_3.1.3_with_xcode_3.2.1__snow_leopard__10m2003a.dmg from the DEV portal and installed.
I've trashed my com.apple.xcode.plist file, uninstalled all xcode plugins as well as Growlcode and I still can't solve this.
Here is the error information:
Process: Xcode [1096]
Path: /Developer/Developer Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.Xcode
Version: 3.1.2 (1149)
Build Info: DevToolsIDE-11490000~1
Code Type: X86 (Native)
Parent Process: launchd [196]
Date/Time: 2010-02-22 21:03:05.858 -0700
OS Version: Mac OS X 10.6.2 (10C540)
Report Version: 6
Interval Since Last Report: 373328 sec
Crashes Since Last Report: 17
Per-App Interval Since Last Report: 305 sec
Per-App Crashes Since Last Report: 17
Anonymous UUID: 2F82DA63-66A6-4C25-9C69-C2D02627B388
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Application Specific Information:
objc[1096]: garbage collection is ON
objc[1096]: layout_bitmap_or: layout bitmap too short: PBXJavaParentDV
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x96a5d43e _objc_fatal + 95
1 libobjc.A.dylib 0x96a5dacf layout_bitmap_or + 91
2 libobjc.A.dylib 0x96a5158c really_connect_class + 243
3 libobjc.A.dylib 0x96a5137a connect_class + 254
4 libobjc.A.dylib 0x96a5131f connect_class + 163
5 libobjc.A.dylib 0x96a4fd67 _read_images + 1303
6 libobjc.A.dylib 0x96a65933 map_images_nolock + 1545
7 libobjc.A.dylib 0x96a4f0d9 map_images + 72
8 dyld 0x8fe03f2d dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) + 795
9 dyld 0x8fe0decd ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, ImageLoader::RPathChain const&) + 251
10 dyld 0x8fe056af dyld::link(ImageLoader*, bool, ImageLoader::RPathChain const&) + 137
11 dyld 0x8fe0b242 dlopen + 471
12 libSystem.B.dylib 0x92b3f048 dlopen + 66
13 com.apple.CoreFoundation 0x94937109 _CFBundleDlfcnLoadBundle + 233
14 com.apple.CoreFoundation 0x94936c7a _CFBundleLoadExecutableAndReturnError + 1370
15 com.apple.Foundation 0x90c342df _NSBundleLoadCode + 995
16 com.apple.Foundation 0x90c33a67 -[NSBundle loadAndReturnError:] + 820
17 com.apple.Foundation 0x90c3372d -[NSBundle load] + 42
18 com.apple.Xcode.DevToolsCore 0x000976e4 -[XCPluginManager loadPluginBundle:] + 516
19 com.apple.Xcode.DevToolsCore 0x00092ad2 -[XCPluginManager findAndLoadPluginsInDomain:] + 1522
20 com.apple.Xcode.DevToolsCore 0x000924cd -[XCPluginManager findAndLoadPlugins] + 45
21 com.apple.Xcode.DevToolsCore 0x0008c6b9 XCInitializeCoreIfNeeded + 4441
22 com.apple.Xcode 0x00003252 0x1000 + 8786
23 com.apple.Foundation 0x90c031c7 _nsnote_callback + 176
24 com.apple.CoreFoundation 0x949309a9 __CFXNotificationPost + 905
25 com.apple.CoreFoundation 0x949303da _CFXNotificationPostNotification + 186
26 com.apple.Foundation 0x90bf8094 -[NSNotificationCenter postNotificationName:object:userInfo:] + 128
27 com.apple.Foundation 0x90c05471 -[NSNotificationCenter postNotificationName:object:] + 56
28 com.apple.AppKit 0x95cc87bd -[NSApplication finishLaunching] + 493
29 com.apple.AppKit 0x95cc81b9 -[NSApplication run] + 79
30 com.apple.AppKit 0x95cc0535 NSApplicationMain + 574
31 com.apple.Xcode 0x00002bca 0x1000 + 7114
Get the first argument to dlopen. This probably points to a corrupted file. You can do this with gdb.
$ gdb /Developer/Applications/Xcode.app/Contents/MacOS/Xcode
(gdb) run
... program will hopefully crash ...
(gdb) bt
(gdb) f N [where N is the highest numbered 'dlopen' frame]
(gdb) p (char *)*($esp) [I think... can't test now, I'm on PPC]

NULL in a RubyCocoa application?

I'm creating an application in RubyCocoa and I have this code:
fileContents = OSX::NSAttributedString.alloc.initWithData_options_documentAttributes_error_(data, null, null, outError)
It gives me this error:
2009-12-31 19:42:54.317 Ruby Text[3791:a0f] MyDocument#readFromData_ofType_error_: OSX::OCMessageSendException: Can't get Objective-C method signature for selector 'null' of receiver #<MyDocument:0x2aaa8a class='MyDocument' id=0x2770e20>
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50:in `ocm_send'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50:in `method_missing'
/Users/myname/Documents/Ruby Text/build/Debug/Ruby Text.app/Contents/Resources/MyDocument.rb:44:in `readFromData_ofType_error_'
/Users/myname/Documents/Ruby Text/build/Debug/Ruby Text.app/Contents/Resources/rb_main.rb:22:in `NSApplicationMain'
/Users/myname/Documents/Ruby Text/build/Debug/Ruby Text.app/Contents/Resources/rb_main.rb:22
2009-12-31 19:42:54.320 Ruby Text[3791:a0f] HIToolbox: ignoring exception 'Can't get Objective-C method signature for selector 'null' of receiver #<MyDocument:0x2aaa8a class='MyDocument' id=0x2770e20>' that raised inside Carbon event dispatch
(
0 CoreFoundation 0x97b0940a __raiseError + 410
1 libobjc.A.dylib 0x943ff509 objc_exception_throw + 56
2 CoreFoundation 0x97b53a21 -[NSException raise] + 17
3 RubyCocoa 0x00010ddc rbobj_call_ruby + 764
4 RubyCocoa 0x0000dbda install_ovmix_methods + 2218
5 libffi.dylib 0x97bceb9f ffi_closure_SYSV_inner + 177
6 libffi.dylib 0x97bce9c2 ffi_closure_SYSV + 34
7 AppKit 0x9135aac0 -[NSDocument readFromURL:ofType:error:] + 743
8 AppKit 0x91247955 -[NSDocument initWithContentsOfURL:ofType:error:] + 311
9 AppKit 0x912474f9 -[NSDocumentController makeDocumentWithContentsOfURL:ofType:error:] + 383
10 AppKit 0x912472b1 -[NSDocumentController openDocumentWithContentsOfURL:display:error:] + 886
11 AppKit 0x912457bf -[NSDocumentController _openDocumentsWithContentsOfURLs:display:presentErrors:] + 169
12 AppKit 0x9135ee87 -[NSDocumentController openDocument:] + 352
13 AppKit 0x9103af86 -[NSApplication sendAction:to:from:] + 112
14 AppKit 0x9103ae39 -[NSMenuItem _corePerformAction] + 435
15 AppKit 0x9103ab2a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
16 AppKit 0x9103aa16 -[NSMenu performActionForItemAtIndex:] + 65
17 AppKit 0x9103a9c9 -[NSMenu _internalPerformActionForItemAtIndex:] + 50
18 AppKit 0x9103a92f -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
19 AppKit 0x9103a873 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
20 AppKit 0x9102ef79 NSSLMMenuEventHandler + 404
21 HIToolbox 0x97719e29 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
22 HIToolbox 0x977190f0 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
23 HIToolbox 0x9773b981 SendEventToEventTarget + 52
24 HIToolbox 0x97767e3b _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
25 HIToolbox 0x9778cb20 SendMenuCommandWithContextAndModifiers + 66
26 HIToolbox 0x9778cad7 SendMenuItemSelectedEvent + 121
27 HIToolbox 0x9778c9d3 _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 152
28 HIToolbox 0x9775c212 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 440
29 HIToolbox 0x9775b9a9 _HandleMenuSelection2 + 465
30 HIToolbox 0x9775b7c7 _HandleMenuSelection + 53
31 AppKit 0x910284ba _NSHandleCarbonMenuEvent + 285
32 AppKit 0x90ffd076 _DPSNextEvent + 2304
33 AppKit 0x90ffc306 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
34 AppKit 0x90fbe49f -[NSApplication run] + 821
35 AppKit 0x90fb6535 NSApplicationMain + 574
36 libffi.dylib 0x97bce91d ffi_call_SYSV + 29
37 libffi.dylib 0x97bcec49 ffi_call + 138
38 RubyCocoa 0x0001c94e rb_ffi_dispatch + 2558
39 RubyCocoa 0x0001554c find_bs_method + 1020
40 libruby.1.dylib 0x00044dfa rb_rescue + 800
41 libruby.1.dylib 0x0004fac0 rb_proc_call + 1452
42 libruby.1.dylib 0x000507db rb_proc_call + 4807
43 libruby.1.dylib 0x0004bb0c rb_provided + 7165
44 libruby.1.dylib 0x0005b83d rb_eval_string + 262
45 libruby.1.dylib 0x0005b86e ruby_exec + 22
46 libruby.1.dylib 0x0005b89a ruby_run + 42
47 RubyCocoa 0x00012931 RBApplicationMain + 337
48 Ruby Text 0x00001f4d main + 47
49 Ruby Text 0x00001ef2 start + 54
)
I tried everything (including nil, OSX::NULL, OSX::nil, null(), NULL, etc).
Can anyone help me? Thanks.
In RubyCocoa, a method will return the method's return value and then any double indirection arguments (source):
fileContents, docAttributes, error = OSX::NSAttributedString.alloc.initWithData_options_documentAttributes_error_(data, options)
In MacRuby, you need to create a pointer to an object and pass that to the method (source):
error = Pointer.new_with_type(‘#’)
NSFileManager.defaultManager.attributesOfItemAtPath path, error:error

Resources