SIGABRT crash on OS X app - xcode

I have had this crash that occurs rather rarely for ages. Unfortunately, I'm not able to get much hints from this received crashlog as it doesn't show any code line from my app. I believe this is related to bad memory management, but I have never managed to generate this crash in my debugger. I have tried enabling NSZombies and run this in Zombies-instruments but they have not shown the cause of the problem. Are there any other tricks I could try to find the cause for this kind of crash? Does the crashlog tell anything? Could it related to storyboard, timers or anything like that? Any hints are greatly appreciated!
Exception Type: SIGABRT
Exception Codes: #0 at 0x7fff93796d42
Crashed Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00007fff93796d42 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff936fc420 abort + 129
2 libc++abi.dylib 0x00007fff9225094a __cxa_bad_cast + 0
3 libc++abi.dylib 0x00007fff92275c2f _ZL26default_unexpected_handlerv + 0
4 libobjc.A.dylib 0x00007fff92d846fe _ZL15_objc_terminatev + 103
5 libc++abi.dylib 0x00007fff92272d49 _ZSt11__terminatePFvvE + 8
6 libc++abi.dylib 0x00007fff92272dc3 _ZSt9terminatev + 51
7 libdispatch.dylib 0x00007fff93632910 _dispatch_client_callout + 28
8 libdispatch.dylib 0x00007fff9363faac _dispatch_main_queue_callback_4CF + 925
9 com.apple.CoreFoundation 0x00007fff7df20bc9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
10 com.apple.CoreFoundation 0x00007fff7dee1c0d __CFRunLoopRun + 2205
11 com.apple.CoreFoundation 0x00007fff7dee1114 CFRunLoopRunSpecific + 420
12 com.apple.HIToolbox 0x00007fff7d441ebc RunCurrentEventLoopInMode + 240
13 com.apple.HIToolbox 0x00007fff7d441cf1 ReceiveNextEventCommon + 432
14 com.apple.HIToolbox 0x00007fff7d441b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
15 com.apple.AppKit 0x00007fff7b9d8a54 _DPSNextEvent + 1120
16 com.apple.AppKit 0x00007fff7c1547ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
17 com.apple.AppKit 0x00007fff7b9cd3db -[NSApplication run] + 926
18 com.apple.AppKit 0x00007fff7b997e0e NSApplicationMain + 1237
19 libdyld.dylib 0x00007fff93668235 start + 1

Related

Xcode 14 beta 5 cause crash on working app

We have been trying to run our app to prepare for iOS 16 but so far no luck. The app runs perfectly in Xcode 13. Also when we download the app from App Store to iOS 16 beta device, it works with no problem.
What we face with new Xcode 14 Beta 5 is the app runs till the first view controller then we get a weird error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application circumvented Objective-C runtime dealloc initiation for <UINavigationController> object.'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff800427380 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff80004dbaf objc_exception_throw + 48
2 Foundation 0x00007ff800b876ac _userInfoForFileAndLine + 0
3 UIKitCore 0x0000000124447d4e -[UIViewController dealloc] + 1475
4 UIKitCore 0x0000000124359e30 -[UINavigationController dealloc] + 389
5 libobjc.A.dylib 0x00007ff80004b6a1 _ZN11objc_object17sidetable_releaseEbb + 203
6 libobjc.A.dylib 0x00007ff80004be64 _ZN19AutoreleasePoolPage12releaseUntilEPP11objc_object + 180
7 libobjc.A.dylib 0x00007ff80004bcad objc_autoreleasePoolPop + 203
8 UIKitCore 0x00000001252e54bf -[_UIAfterCACommitBlock run] + 80
9 UIKitCore 0x00000001252e59a4 -[_UIAfterCACommitQueue flush] + 190
10 UIKitCore 0x0000000124d40730 _runAfterCACommitDeferredBlocks + 782
11 UIKitCore 0x0000000124d2eede _cleanUpAfterCAFlushAndRunDeferredBlocks + 96
12 UIKitCore 0x0000000124d64abb _afterCACommitHandler + 72
13 CoreFoundation 0x00007ff800386015 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
14 CoreFoundation 0x00007ff800380982 __CFRunLoopDoObservers + 515
15 CoreFoundation 0x00007ff800380ecd __CFRunLoopRun + 1161
16 CoreFoundation 0x00007ff800380667 CFRunLoopRunSpecific + 560
17 GraphicsServices 0x00007ff809bfc28a GSEventRunModal + 139
18 UIKitCore 0x0000000124d30621 -[UIApplication _run] + 994
19 UIKitCore 0x0000000124d354fd UIApplicationMain + 123
20 xxxxxx 0x000000010e9aa830 main + 96
21 dyld 0x00000001136e52bf start_sim + 10
22 ??? 0x00000001148c751e 0x0 + 4639716638
)
OK, So I fixed my own problem. For me it was the code in the dependency file I was using in my pods. So, simply search for
+ (void)initialize {
}
which is most possibly causing the error.

How can I debug a crash from the call to the undo command on a NSMenuItem?

I would like to be able to fix this crash on my OSX application, I've been seeing the crashes on my firebase console when users perform an undo action, from what I can see probably from a key command. But I have no idea why & where in the app is this happening.
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x7fff6c60981d objc_msgSend + 29
1 Foundation 0x7fff360047a7 -[_NSUndoStack popAndInvoke] + 187
2 Foundation 0x7fff36004514 -[NSUndoManager undoNestedGroup] + 296
3 AppKit 0x7fff30ff5d49 -[NSCellUndoManager undo] + 102
4 AppKit 0x7fff30d36437 -[NSApplication(NSResponder) sendAction:to:from:] + 299
5 AppKit 0x7fff30e46aee -[NSMenuItem _corePerformAction] + 312
6 AppKit 0x7fff30e4686a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 106
7 AppKit 0x7fff30e45767 -[NSMenu performKeyEquivalent:] + 412
8 AppKit 0x7fff3127b27b routeKeyEquivalent + 521
9 AppKit 0x7fff30c974dd -[NSApplication(NSEvent) sendEvent:] + 1161
10 AppKit 0x7fff30ae421f -[NSApplication run] + 707
11 AppKit 0x7fff30ab5ff6 NSApplicationMain + 777
12 libdyld.dylib 0x7fff6d7bdcc9 start + 1
Any help is greatly appreciated.

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?

Random crash on monomac/Xamarin.Mac

i want to know if any of you have faced an issue that you have a window and you click a few buttons and everything work fine, but then you get this
2014-07-29 23:08:23.448 Touring[2807:707] -[__NSCFString btnVenue:]: unrecognized selector sent to instance 0x7d0f14b0
2014-07-29 23:08:23.466 Touring[2807:707] (
0 CoreFoundation 0x9a666471 __raiseError + 193
1 libobjc.A.dylib 0x976be091 objc_exception_throw + 162
2 CoreFoundation 0x9a66acb3 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x9a5b6522 ___forwarding___ + 1010
4 CoreFoundation 0x9a5b610e _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x976ca2af -[NSObject performSelector:withObject:] + 70
6 AppKit 0x90d188a5 -[NSApplication sendAction:to:from:] + 438
7 AppKit 0x90d186ad -[NSControl sendAction:to:] + 102
8 AppKit 0x90d67c7b -[NSCell _sendActionFrom:] + 159
9 AppKit 0x90d82f2a -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2465
10 AppKit 0x90d82161 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 513
11 AppKit 0x90d81785 -[NSControl mouseDown:] + 690
12 AppKit 0x90cfda9d -[NSWindow sendEvent:] + 11953
13 AppKit 0x90c9991d -[NSApplication sendEvent:] + 4034
14 AppKit 0x90ade1bc -[NSApplication run] + 823
15 AppKit 0x90ac6ff8 NSApplicationMain + 1165
16 ??? 0x030e6948 0x0 + 51276104
17 ??? 0x030e6768 0x0 + 51275624
18 ??? 0x00a0e0bc 0x0 + 10543292
19 ??? 0x00a0e207 0x0 + 10543623
20 Touring 0x001b5bfc mono_jit_runtime_invoke + 828
21 Touring 0x00262ebe mono_runtime_invoke + 126
22 Touring 0x00267328 mono_runtime_exec_main + 376
23 Touring 0x00267675 mono_runtime_run_main + 725
24 Touring 0x00114d75 mono_jit_exec + 149
25 Touring 0x000c57e8 main + 1720
26 libdyld.dylib 0x94793701 start + 1
Any kind of help will be very appreciated.
Ok again, after trying a few things without luck, came to my mind to go to the project properties and go to the Mac Build and check the "Use the SGen generational garbage collector" (i don't know if on one of my test i un check this or came like that) but after this, many issues of crashing we're apparentely solved.
Have to try more deep to see if it work 100%.
Any way, thanks to anyone who may read this.

Xcode 3.2 crashes when opening/creating a project

Xcode 3.2 crashes when opening/creating a project. Log really explains the rest (OS version etc.)
LOG:
Process: Xcode [7718]
Path: /Xcode3.2/*/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.Xcode
Version: 3.2 (1610)
Build Info: DevToolsIDE-16100000~6
Code Type: X86-64 (Native)
Parent Process: launchd [224]
Date/Time: 2011-11-23 22:00:45.656 +0000
OS Version: Mac OS X 10.7.2 (11C74)
Report Version: 9
Interval Since Last Report: 172469 sec
Crashes Since Last Report: 8
Per-App Interval Since Last Report: 19398 sec
Per-App Crashes Since Last Report: 7
Anonymous UUID: 5085CBA9-0FEA-4928-84A9-B5802B0A1903
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Application Specific Information:
Performing #selector(overwriteSelectedAction:) from sender NSButton 0x401ab2520
objc[7718]: garbage collection is ON
Dyld Error Message:
Symbol not found: _dispatch_queue_attr_create
Referenced from: /Xcode3.2/*/Xcode.app/Contents/MacOS/../../../../Library/PrivateFrameworks//DevToolsCore.framework/Versions/A/DevToolsCore
Expected in: /usr/lib/libSystem.B.dylib
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 dyld 0x00007fff68fd906d dyld_fatal_error + 1
1 dyld 0x00007fff68fdc918 dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 128
2 libdyld.dylib 0x00007fff9281d716 dyld_stub_binder_ + 13
3 ??? 0x0000000100550010 0 + 4300537872
4 com.apple.Xcode.DevToolsCore 0x00000001001167a7 -[PBXProjectIndex initWithProject:] + 87
5 com.apple.Xcode.DevToolsCore 0x0000000100116479 -[PBXProject loadIndex] + 137
6 com.apple.Xcode.DevToolsCore 0x0000000100116304 -[PBXProject beginIndexing] + 52
7 com.apple.Xcode.DevToolsCore 0x00000001001162cb -[PBXProject openIndex] + 43
8 com.apple.Xcode.DevToolsInterface 0x0000000100870b7f -[PBXProjectDocument initWithProject:] + 367
9 com.apple.Xcode.DevToolsInterface 0x000000010096db80 +[PBXProjectDocument documentWithProject:] + 48
10 com.apple.Xcode.DevToolsInterface 0x00000001009d2bff -[PBXProjectWizard _finishTemplateInstantiationAfterFileCopying:instantiationResult:] + 351
11 com.apple.Xcode.DevToolsInterface 0x0000000100a765eb -[PBXFileCopyingWizard _finishCopyingTemplate:filesToPreserve:] + 219
12 com.apple.Xcode.DevToolsInterface 0x0000000100a9b780 -[PBXWizardOverwritingFilesModule sheetDidEnd:returnCode:contextInfo:] + 368
13 com.apple.AppKit 0x00007fff91d317d7 -[NSApplication endSheet:returnCode:] + 275
14 com.apple.Xcode.DevToolsInterface 0x0000000100a9b84e -[PBXWizardOverwritingFilesModule overwriteSelectedAction:] + 78
15 com.apple.CoreFoundation 0x00007fff9129fa1d -[NSObject performSelector:withObject:] + 61
16 com.apple.AppKit 0x00007fff91b80710 -[NSApplication sendAction:to:from:] + 139
17 com.apple.AppKit 0x00007fff91b80642 -[NSControl sendAction:to:] + 88
18 com.apple.AppKit 0x00007fff91b8056d -[NSCell _sendActionFrom:] + 137
19 com.apple.AppKit 0x00007fff91b7fa30 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2014
20 com.apple.AppKit 0x00007fff91bff8e0 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 489
21 com.apple.AppKit 0x00007fff91b7e63a -[NSControl mouseDown:] + 786
22 com.apple.AppKit 0x00007fff91b490e0 -[NSWindow sendEvent:] + 6306
23 com.apple.AppKit 0x00007fff91ae168f -[NSApplication sendEvent:] + 5593
24 com.apple.Xcode.DevToolsInterface 0x0000000100869bdd -[PBXExtendedApplication sendEvent:] + 301
25 com.apple.AppKit 0x00007fff91a77682 -[NSApplication run] + 555
26 com.apple.AppKit 0x00007fff91cf680c NSApplicationMain + 867
27 com.apple.Xcode 0x000000010000e97e 0x100000000 + 59774
28 com.apple.Xcode 0x0000000100001844 0x100000000 + 6212
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff8bcbf7e6 kevent + 10
1 libdispatch.dylib 0x00007fff8bc205be _dispatch_mgr_invoke + 923
2 libdispatch.dylib 0x00007fff8bc1f14e _dispatch_mgr_thread + 54
Thread 2:
0 libsystem_kernel.dylib 0x00007fff8bcbd67a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8bcbcd71 mach_msg + 73
2 com.apple.CoreFoundation 0x00007fff9123cb6c __CFRunLoopServiceMachPort + 188
3 com.apple.CoreFoundation 0x00007fff912452d4 __CFRunLoopRun + 1204
4 com.apple.CoreFoundation 0x00007fff91244ae6 CFRunLoopRunSpecific + 230
5 com.apple.DTDeviceKit 0x00000001094da094 -[DTDKRemoteDeviceDataListener listenerThreadImplementation] + 229
6 com.apple.Foundation 0x00007fff942fe7fe -[NSThread main] + 68
7 com.apple.Foundation 0x00007fff942fe776 __NSThread__main__ + 1575
8 libsystem_c.dylib 0x00007fff8d0798bf _pthread_start + 335
9 libsystem_c.dylib 0x00007fff8d07cb75 thread_start + 13
Thread 3:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff8bcbedf2 __select + 10
1 com.apple.CoreFoundation 0x00007fff9128df9b __CFSocketManager + 1355
2 libsystem_c.dylib 0x00007fff8d0798bf _pthread_start + 335
3 libsystem_c.dylib 0x00007fff8d07cb75 thread_start + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff8bcbf192 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8d07b594 _pthread_wqthread + 758
2 libsystem_c.dylib 0x00007fff8d07cb85 start_wqthread + 13
...*snip* - Rest at http://pastebin.com/BLsUxEkz
(Sorry, the log is LONG and putting 4 spaces at the begging of over 450 lines is too much! The rest of the log is at: http://pastebin.com/BLsUxEkz)
Thanks in advance.
EDIT: The only reason I wanted to use Xcode 3 (I usually use 4) is that I want to test my iOS app on iOS 3.x.
Xcode 3 is not officially supported on Mac OS X Lion.
Either upgrade to Xcode 4 (you can still target Mac OS X versions older than 10.7), or stick to Snow Leopard.
Otherwise, if you really want to use Lion and Xcode 3, I think you should install a 10.6 virtual machine, so you can run Xcode 3.
I heard some people said they couldn't run xcode3 on lion,so I think snow leopard well be chosen if you want use xcode3. Best regard.
Upgrading to Xcode 3.2.6 seemed to do the trick.

Resources