Xcode 5 developer preview crash on launch [closed] - crash

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 9 years ago.
This Xcode 5 DP version was downloaded from internet which uploaded by anyone else. Every time i clicked it on launch up, it'll crash at once. Cuz i had installed xcode 4.6 version before, and i'm just registered as a developer, but didn't pay $99 a year for credit card.
I don't make sure this is the problem cause crashed. Any one can help me solve problems? Big appreciate for that!
This is the xcode 5 DP crash log:
Process: Xcode [561]
Path: /Applications/Xcode5-DP.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 5.0 (3322.38)
Build Info: IDEApplication-3322038000000000~4
Code Type: X86-64 (Native)
Parent Process: launchd [147]
User ID: 501
Date/Time: 2013-06-12 11:28:58.292 +0800
OS Version: Mac OS X 10.8.3 (12D78)
Report Version: 10
Interval Since Last Report: 525462 sec
Crashes Since Last Report: 25
Per-App Interval Since Last Report: 446 sec
Per-App Crashes Since Last Report: 18
Anonymous UUID: A9DA8062-D29B-6AC1-2555-14D6D838145A
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 5A11314m
*** error for object 0x7fae2b97b130: pointer being freed was not allocated
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff81341212 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff844f4b54 pthread_kill + 90
2 libsystem_c.dylib 0x00007fff84538dce abort + 143
3 libsystem_c.dylib 0x00007fff8450c9b9 free + 392
4 libobjc.A.dylib 0x00007fff8ac6dfc0 object_dispose + 54
5 com.apple.dt.DVTFoundation 0x00000001040d7365 __DVTSetupKVODeallocAssertions_block_invoke_371 + 264
6 libobjc.A.dylib 0x00007fff8ac6e230 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 464
7 com.apple.CoreFoundation 0x00007fff8cbb3d72 _CFAutoreleasePoolPop + 34
8 com.apple.Foundation 0x00007fff8c475ada -[NSAutoreleasePool drain] + 154
9 com.apple.Foundation 0x00007fff8c47d580 _NSAppleEventManagerGenericHandler + 125
10 com.apple.AE 0x00007fff8da45078 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 307
11 com.apple.AE 0x00007fff8da44ed9 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 37
12 com.apple.AE 0x00007fff8da44d99 aeProcessAppleEvent + 318
13 com.apple.HIToolbox 0x00007fff85bae709 AEProcessAppleEvent + 100
14 com.apple.AppKit 0x00007fff88e29866 _DPSNextEvent + 1456
15 com.apple.AppKit 0x00007fff88e28e22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
16 com.apple.AppKit 0x00007fff88e201d3 -[NSApplication run] + 517
17 com.apple.AppKit 0x00007fff88dc4c06 NSApplicationMain + 869
18 libdyld.dylib 0x00007fff881417e1 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fff813416d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff844f5f4c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff844f5d13 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff844e01d1 start_wqthread + 13
Thread 2:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff81341d16 kevent + 10
1 libdispatch.dylib 0x00007fff8b480dea _dispatch_mgr_invoke + 883
2 libdispatch.dylib 0x00007fff8b4809ee _dispatch_mgr_thread + 54
Thread 3:
0 libsystem_kernel.dylib 0x00007fff813416d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff844f5f4c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff844f5d13 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff844e01d1 start_wqthread + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff813416d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff844f5f4c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff844f5d13 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff844e01d1 start_wqthread + 13
Thread 5:
0 libsystem_kernel.dylib 0x00007fff813416d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff844f5f4c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff844f5d13 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff844e01d1 start_wqthread + 13
Thread 6:: Dispatch queue: com.apple.root.low-priority
0 com.apple.DiskArbitration 0x00007fff8c034fa6 _DADiskInitialize + 16
1 com.apple.DiskArbitration 0x00007fff8c034d4c __DAInitialize + 16
2 libsystem_c.dylib 0x00007fff844f4ff0 pthread_once + 87
3 com.apple.DiskArbitration 0x00007fff8c034bc7 DASessionCreate + 21
4 com.apple.AppKit 0x00007fff89071f56 __48-[NSApplication _initializeAutomaticTermination]_block_invoke_01143 + 43
5 libdispatch.dylib 0x00007fff8b481f01 _dispatch_call_block_and_release + 15
6 libdispatch.dylib 0x00007fff8b47e0b6 _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff8b47f1fa _dispatch_worker_thread2 + 304
8 libsystem_c.dylib 0x00007fff844f5d0b _pthread_wqthread + 404
9 libsystem_c.dylib 0x00007fff844e01d1 start_wqthread + 13
Thread 7:: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x00007fff8133f686 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8133ec42 mach_msg + 70
2 com.apple.CoreFoundation 0x00007fff8cbb3233 __CFRunLoopServiceMachPort + 195
3 com.apple.CoreFoundation 0x00007fff8cbb8916 __CFRunLoopRun + 1078
4 com.apple.CoreFoundation 0x00007fff8cbb80e2 CFRunLoopRunSpecific + 290
5 com.apple.Foundation 0x00007fff8c452b66 +[NSURLConnection(Loader) _resourceLoadLoop:] + 356
6 com.apple.Foundation 0x00007fff8c4b0cd2 __NSThread__main__ + 1345
7 libsystem_c.dylib 0x00007fff844f37a2 _pthread_start + 327
8 libsystem_c.dylib 0x00007fff844e01e1 thread_start + 13
Thread 8:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff81341322 __select + 10
1 com.apple.CoreFoundation 0x00007fff8cbf7f46 __CFSocketManager + 1302
2 libsystem_c.dylib 0x00007fff844f37a2 _pthread_start + 327
3 libsystem_c.dylib 0x00007fff844e01e1 thread_start + 13
Thread 9:
0 libsystem_kernel.dylib 0x00007fff813416d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff844f5f4c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff844f5d13 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff844e01d1 start_wqthread + 13
Thread 10:
0 libsystem_kernel.dylib 0x00007fff813416d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff844f5f4c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff844f5d13 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff844e01d1 start_wqthread + 13
Thread 11:
0 libsystem_kernel.dylib 0x00007fff8133f686 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8133ec42 mach_msg + 70
2 com.apple.CoreFoundation 0x00007fff8cbb3233 __CFRunLoopServiceMachPort + 195
3 com.apple.CoreFoundation 0x00007fff8cbb8916 __CFRunLoopRun + 1078
4 com.apple.CoreFoundation 0x00007fff8cbb80e2 CFRunLoopRunSpecific + 290
5 com.apple.DTDeviceKitBase 0x000000010d269f0a -[DTDKRemoteDeviceDataListener listenerThreadImplementation] + 164
6 com.apple.Foundation 0x00007fff8c4b0cd2 __NSThread__main__ + 1345
7 libsystem_c.dylib 0x00007fff844f37a2 _pthread_start + 327
8 libsystem_c.dylib 0x00007fff844e01e1 thread_start + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff5bbf5d78 rdx: 0x0000000000000000
rdi: 0x0000000000000c07 rsi: 0x0000000000000006 rbp: 0x00007fff5bbf5da0 rsp: 0x00007fff5bbf5d78
r8: 0x00007fff717de278 r9: 0x0000000000000081 r10: 0x0000000020000000 r11: 0x0000000000000206
r12: 0x00007fae2989ce00 r13: 0x00000001050c6000 r14: 0x00007fff717df180 r15: 0x0000000000000008
rip: 0x00007fff81341212 rfl: 0x0000000000000206 cr2: 0x00007fae28832200
Logical CPU: 0
Binary Images:
0x104009000 - 0x104009ff7 com.apple.dt.Xcode (5.0 - 3322.38) <5CE4EAEB-6D86-3485-8946-05F729BD3DBB> /Applications/Xcode5-DP.app/Contents/MacOS/Xcode
0x10400e000 - 0x104429fff com.apple.dt.DVTFoundation (5.0 - 3481.6) <BB2B9FCE-80FA-39D4-9FE9-F4EC12019F2D> /Applications/Xcode5-DP.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation
0x104599000 - 0x1048b0fff com.apple.dt.DVTKit (5.0 - 3502.3) <2D8CB62B-5437-3FD3-9B99-24C55AB7197E> /Applications/Xcode5-DP.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
0x104a50000 - 0x104e78ff7 com.apple.dt.IDEFoundation (5.0 - 3504.7) <8CEB5828-80F5-3C6F-BBEE-F30975A5965B> /Applications/Xcode5-DP.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation
0x1050c9000 - 0x105841fff com.apple.dt.IDEKit (5.0 - 3527.7) <27FE8EAE-A006-3556-B57E-E5F3169DDC3F> /Applications/Xcode5-DP.app/Contents/Frameworks/IDEKit.framework/Versions/A/IDEKit
0x105caa000 - 0x105d4cfff com.apple.PackageKit (3.0 - 260) <B9C3BB80-C2A3-3E9E-A9C0-EB58B5F42512> /System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/PackageKit
0x105dbc000 - 0x105dbcff7 libsysmon.dylib (2) <E029BDA7-E063-3049-95FF-BBA1AF41DFB0> /usr/lib/libsysmon.dylib
0x105e6d000 - 0x105e7cff7 libSimplifiedChineseConverter.dylib (61) <A2B475FF-667F-3B7B-A6E9-8768347F2BD6> /System/Library/CoreServices/Encodings/libSimplifiedChineseConverter.dylib
0x1066d7000 - 0x106757fff com.apple.dt.IBFoundation (1.0 - 1) <B9E81B5F-A0B9-395A-B2B4-5063A07791DC> /Applications/Xcode5-DP.app/Contents/Frameworks/IBFoundation.framework/Versions/A/IBFoundation
0x1067a6000 - 0x1067d4ff7 com.apple.CoreThemeDefinition (1.0 - 104) <BE976F3F-9085-3E00-AD9E-FC1A5458FB49> /System/Library/PrivateFrameworks/CoreThemeDefinition.framework/Versions/A/CoreThemeDefinition
0x1067f6000 - 0x10682bff7 com.apple.dt.dbg.DebuggerFoundation (5.0 - 3490.2) <8AFF3717-11FF-3B86-A78B-8E79822DC9A1> /Applications/Xcode5-DP.app/Contents/PlugIns/DebuggerFoundation.ideplugin/Contents/MacOS/DebuggerFoundation
0x106862000 - 0x107117ff7 +libclang.dylib (500.1.58) <054AB067-A22B-396F-9C48-EEC76DF12A2B> /Applications/Xcode5-DP.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib
0x107192000 - 0x1071e9fff com.apple.CSServiceClient (1.0 - 1) <BD9C72AA-FF23-324C-90ED-A4243FAD34BE> /Applications/Xcode5-DP.app/Contents/SharedFrameworks/CSServiceClient.framework/Versions/A/CSServiceClient
0x10721a000 - 0x10723cfff com.apple.DADocSetManagement (5.0 - 3338.1) <BF03D04F-3BD0-3750-B8AF-9544828510C5> /Applications/Xcode5-DP.app/Contents/SharedFrameworks/DADocSetManagement.framework/Versions/A/DADocSetManagement
0x107258000 - 0x10725aff7 com.apple.dt.DVTDeveloperModeHelper (1.0 - 1) <A3DBC1CB-A24E-3908-92A0-13EC2E56BD99> /Applications/Xcode5-DP.app/Contents/SharedFrameworks/DVTDeveloperModeHelper.framework/Versions/A/DVTDeveloperModeHelper

May be you have Xcode plugins installed.
Try to remove them.
rm ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/*

Related

NSUserDefaults integerForKey EXC_BAD_ACCESS?

I'm using NSUserDefaults in my application. I received quite a lot crash reports with code that crashes on
[[NSUserDefaults standardUserDefaults] integerForKey:MY_KEY];
with EXC_BAD_ACCESS.
Constants are defined in separate .h header files.
static NSString *const MY_KEY = #"myKey";
static NSInteger const SOME_VALUE = 0;
Part of controller method that crashes
- (void)displayData:(NSInteger)param {
NSString *string1;
NSString *string2;
NSInteger value = [[NSUserDefaults standardUserDefaults] integerForKey: MY_KEY];
}
This is the crash report in Xcode Organizer
This is the crash log
Incident Identifier: 1DD7D3CD-DE9B-4623-AB02-06D2365728DA
CrashReporter Key: 020e241bb4242d3e055b3eef0f3ab86f54af59df
Hardware Model: iPhone6,2
Process: My App [194]
Path: /private/var/mobile/Containers/Bundle/Application/31286A32-F4D3-48E1-8B05-ECE119EA96A8/MyApp.app/My App
Identifier: com.mycompany.myapp
Version: 1.0.0 (1.0.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-01-16 12:55:34.34 +0200
Launch Time: 2016-01-16 12:24:31.31 +0200
OS Version: iOS 9.2 (13C75)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000158b6560
Triggered by Thread: 0
Filtered syslog:
None found
Global Trace Buffer (reverse chronological seconds):
1.629540 CFNetwork 0x00000001851af104 TCP Conn 0x15a473640 complete. fd: 8, err: 0
1.629540 CFNetwork 0x00000001851b0630 TCP Conn 0x15a473640 event 1. err: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x00000001841b5bd0 objc_msgSend + 16
1 CoreFoundation 0x0000000184b69118 __CFBasicHashAddValue + 328
2 CoreFoundation 0x0000000184a179d8 CFBasicHashAddValue + 288
3 CoreFoundation 0x0000000184a18c90 CFDictionaryAddValue + 248
4 CoreFoundation 0x0000000184a305a8 __CFDictionaryApplyFunction_block_invoke + 24
5 CoreFoundation 0x0000000184a189bc CFBasicHashApply + 128
6 CoreFoundation 0x0000000184a21d3c CFDictionaryApplyFunction + 200
7 CoreFoundation 0x0000000184abd8a8 -[CFPrefsPlistSource mergeIntoDictionary:] + 304
8 CoreFoundation 0x0000000184ae45e0 -[CFPrefsSearchListSource alreadylocked_copyDictionary] + 828
9 CoreFoundation 0x0000000184ae33fc -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 72
10 CoreFoundation 0x0000000184b74ee4 ___CFPreferencesCopyAppValueWithContainer_block_invoke + 68
11 CoreFoundation 0x0000000184ae25b8 +[CFPrefsSearchListSource withSearchListForIdentifier:container:perform:] + 572
12 CoreFoundation 0x0000000184b74e5c _CFPreferencesCopyAppValueWithContainer + 188
13 CoreFoundation 0x0000000184b75130 _CFPreferencesGetAppIntegerValueWithContainer + 28
14 My App 0x000000010006f520 -[MyController displayData:] (MyController.m:998)
15 Foundation 0x0000000185425844 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 988
16 Foundation 0x00000001854296a0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 144
17 My App 0x000000010006cd68 -[MyController StateDidChange:] (MyController.m:307)
18 Foundation 0x00000001854f7e20 __NSThreadPerformPerform + 340
19 CoreFoundation 0x0000000184aecefc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
20 CoreFoundation 0x0000000184aec990 __CFRunLoopDoSources0 + 540
21 CoreFoundation 0x0000000184aea690 __CFRunLoopRun + 724
22 CoreFoundation 0x0000000184a19680 CFRunLoopRunSpecific + 384
23 GraphicsServices 0x0000000185f28088 GSEventRunModal + 180
24 UIKit 0x0000000189890d90 UIApplicationMain + 204
25 My App 0x000000010006b6b4 main (main.m:16)
26 libdyld.dylib 0x00000001845ba8b8 start + 4
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x00000001846d94fc kevent_qos + 8
1 libdispatch.dylib 0x000000018459c94c _dispatch_mgr_invoke + 232
2 libdispatch.dylib 0x000000018458b7bc _dispatch_source_invoke + 0
Thread 2 name: com.apple.NSURLConnectionLoader
Thread 2:
0 libsystem_kernel.dylib 0x00000001846bd4bc mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001846bd338 mach_msg + 72
2 CoreFoundation 0x0000000184aecac0 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000184aea7c4 __CFRunLoopRun + 1032
4 CoreFoundation 0x0000000184a19680 CFRunLoopRunSpecific + 384
5 CFNetwork 0x0000000185189434 +[NSURLConnection(Loader) _resourceLoadLoop:] + 412
6 Foundation 0x00000001854f7c40 __NSThread__start__ + 1000
7 libsystem_pthread.dylib 0x000000018479fb28 _pthread_body + 156
8 libsystem_pthread.dylib 0x000000018479fa8c _pthread_body + 0
9 libsystem_pthread.dylib 0x000000018479d028 thread_start + 4
Thread 3 name: com.apple.CFSocket.private
Thread 3:
0 libsystem_kernel.dylib 0x00000001846d8368 __select + 8
1 CoreFoundation 0x0000000184af3028 __CFSocketManager + 648
2 libsystem_pthread.dylib 0x000000018479fb28 _pthread_body + 156
3 libsystem_pthread.dylib 0x000000018479fa8c _pthread_body + 0
4 libsystem_pthread.dylib 0x000000018479d028 thread_start + 4
Thread 4 name: NetworkLoad
Thread 4:
0 libsystem_kernel.dylib 0x00000001846bd4bc mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001846bd338 mach_msg + 72
2 CoreFoundation 0x0000000184aecac0 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000184aea7c4 __CFRunLoopRun + 1032
4 CoreFoundation 0x0000000184a19680 CFRunLoopRunSpecific + 384
5 GeoServices 0x000000018b1e9b5c _runNetworkThread + 428
6 libsystem_pthread.dylib 0x000000018479fb28 _pthread_body + 156
7 libsystem_pthread.dylib 0x000000018479fa8c _pthread_body + 0
8 libsystem_pthread.dylib 0x000000018479d028 thread_start + 4
Thread 5:
0 libsystem_kernel.dylib 0x00000001846d8b6c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018479d530 _pthread_wqthread + 1284
2 libsystem_pthread.dylib 0x000000018479d020 start_wqthread + 4
Thread 6:
0 libsystem_kernel.dylib 0x00000001846d8b6c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018479d530 _pthread_wqthread + 1284
2 libsystem_pthread.dylib 0x000000018479d020 start_wqthread + 4
Thread 7:
0 libsystem_kernel.dylib 0x00000001846d8b6c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018479d530 _pthread_wqthread + 1284
2 libsystem_pthread.dylib 0x000000018479d020 start_wqthread + 4
Thread 8:
0 libsystem_kernel.dylib 0x00000001846d8b6c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018479d530 _pthread_wqthread + 1284
2 libsystem_pthread.dylib 0x000000018479d020 start_wqthread + 4
Thread 9:
0 libsystem_kernel.dylib 0x00000001846d7f48 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x000000018479ece8 _pthread_cond_wait + 648
2 Foundation 0x0000000185462bac -[NSCondition wait] + 240
3 Foundation 0x0000000185425780 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 792
4 Foundation 0x00000001854296a0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 144
5 My App 0x0000000100085714 -[AppStateManager HandleAsynchRequest:] (AppStateManager.m:328)
6 Foundation 0x00000001854f7c40 __NSThread__start__ + 1000
7 libsystem_pthread.dylib 0x000000018479fb28 _pthread_body + 156
8 libsystem_pthread.dylib 0x000000018479fa8c _pthread_body + 0
9 libsystem_pthread.dylib 0x000000018479d028 thread_start + 4
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000155616b10 x1: 0x000000018a206102 x2: 0x00000001556169c0 x3: 0x0000000155616b10
x4: 0x000000015680c2c0 x5: 0x0000000000000010 x6: 0x0000000000000067 x7: 0x0000000000000fd0
x8: 0x00000001a1223000 x9: 0x00000000158b6550 x10: 0x00000001a216a000 x11: 0x00000001a216a000
x12: 0x00000001556169d0 x13: 0x10000000158b6554 x14: 0x000000000000008c x15: 0x00000001556169dd
x16: 0x5000f8d3b4fb11e2 x17: 0x00000001556169dd x18: 0x0000000000000000 x19: 0x000000015680c240
x20: 0x00000001556169c0 x21: 0x0000000155616b10 x22: 0x0000000000000001 x23: 0x00000001a2165360
x24: 0x0000000184aee6c8 x25: 0x00000001a2165360 x26: 0x0000000000000003 x27: 0x0000000158ffa300
x28: 0x00000000a7baadb1 fp: 0x000000016fd99f50 lr: 0x0000000184b69118
sp: 0x000000016fd99f00 pc: 0x00000001841b5bd0 cpsr: 0x20000000
I'm getting this message with zombies enabled
[CFString retain]: message sent to deallocated instance 0x12f78f7e0
I replicated this bug once on my development iPhone. Also note that the application uses real-time TCP communication. When I receive some data a block is created to show the data in the UI.
Can NSUserDefaults produce a EXC_BAD_ACCESS?
It's an issue related to memory leaks. To solve the problem use Xcode static analysis to find potential memory leaks in the code. Also run Xcode instruments with Leaks configuration.

iOS app crash only if run from instrument (Automation)

My app do not crash on device. No leaks no memory warning. I was living happily. But recently I was doing some UI testing with Instrument(Automation). Boom Boom. App crashes after using it like 8 min. Looping around like 30 times. And it keep crashing but after different durations but all at same step. Again no leaks no memory warning. Again it do not crash on device(without instrument) doesn't matter how long use my app.
+ Every times it crashes after I pop a specific ViewController. And that view controller is loaded with stuffs (image view, playing and recording audio, take photo from album and camera)
Here is the device log. Any kind of help is highly appreciated.
Incident Identifier:
CrashReporter Key:
Hardware Model: iPhone5,2
Process: My App [15196]
Path:
Identifier: My App
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-08-16 12:48:10.814 +0200
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x1208b319
Crashed Thread: 6
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x39be3e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39be3fd0 mach_msg + 48
2 CoreFoundation 0x319da2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x319d8fd6 __CFRunLoopRun + 814
4 CoreFoundation 0x3194c238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x3194c0c4 CFRunLoopRunInMode + 100
6 GraphicsServices 0x3552b336 GSEventRunModal + 70
7 UIKit 0x338682b4 UIApplicationMain + 1116
8 MyApp 0x0000531e 0x3000 + 8990
9 MyApp 0x000052d4 0x3000 + 8916
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x39be45d0 kevent64 + 24
1 libdispatch.dylib 0x39b1fd22 _dispatch_mgr_invoke + 806
2 libdispatch.dylib 0x39b1b374 _dispatch_mgr_thread + 32
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x39be3e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39be3fd0 mach_msg + 48
2 CoreFoundation 0x319da2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x319d902c __CFRunLoopRun + 900
4 CoreFoundation 0x3194c238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x3194c0c4 CFRunLoopRunInMode + 100
6 WebCore 0x37954390 RunWebThread(void*) + 440
7 libsystem_c.dylib 0x39b4d0de _pthread_start + 306
8 libsystem_c.dylib 0x39b4cfa4 thread_start + 4
Thread 3:
0 libsystem_kernel.dylib 0x39be3e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39be3fd0 mach_msg + 48
2 CoreFoundation 0x319da2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x319d902c __CFRunLoopRun + 900
4 CoreFoundation 0x3194c238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x3194c0c4 CFRunLoopRunInMode + 100
6 Foundation 0x322705be -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 MyApp 0x00020b0a 0x3000 + 121610
8 Foundation 0x3231d22c __NSThread__main__ + 968
9 libsystem_c.dylib 0x39b4d0de _pthread_start + 306
10 libsystem_c.dylib 0x39b4cfa4 thread_start + 4
Thread 4 name: com.apple.NSURLConnectionLoader
Thread 4:
0 libsystem_kernel.dylib 0x39be3e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39be3fd0 mach_msg + 48
2 CoreFoundation 0x319da2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x319d902c __CFRunLoopRun + 900
4 CoreFoundation 0x3194c238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x3194c0c4 CFRunLoopRunInMode + 100
6 Foundation 0x32299888 +[NSURLConnection(Loader) _resourceLoadLoop:] + 304
7 Foundation 0x3231d22c __NSThread__main__ + 968
8 libsystem_c.dylib 0x39b4d0de _pthread_start + 306
9 libsystem_c.dylib 0x39b4cfa4 thread_start + 4
Thread 5 name: com.apple.CFSocket.private
Thread 5:
0 libsystem_kernel.dylib 0x39bf4594 __select + 20
1 CoreFoundation 0x319de474 __CFSocketManager + 676
2 libsystem_c.dylib 0x39b4d0de _pthread_start + 306
3 libsystem_c.dylib 0x39b4cfa4 thread_start + 4
Thread 6 Crashed:
0 Foundation 0x3231d692 __NSFinalizeThreadData + 122
1 CoreFoundation 0x319d6212 __CFTSDFinalize + 62
2 libsystem_c.dylib 0x39b3feb8 _pthread_tsd_cleanup + 172
3 libsystem_c.dylib 0x39b3fb8e _pthread_exit + 114
4 libsystem_c.dylib 0x39b42ade _pthread_workq_return + 22
5 libsystem_c.dylib 0x39b427f2 _pthread_wqthread + 362
6 libsystem_c.dylib 0x39b42680 start_wqthread + 4
Thread 7:
0 libsystem_kernel.dylib 0x39bf4d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39b42ad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x39b427f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x39b42680 start_wqthread + 4
Thread 8:
0 libsystem_kernel.dylib 0x39bf4d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39b42ad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x39b427f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x39b42680 start_wqthread + 4
Thread 9 name: AURemoteIO::IOThread
Thread 9:
0 libsystem_kernel.dylib 0x39be3e30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x39be3fd0 mach_msg + 48
2 AudioToolbox 0x314cdc80 AURemoteIO::IOThread::Run() + 104
3 AudioToolbox 0x314d000c AURemoteIO::IOThread::Entry(void*) + 4
4 AudioToolbox 0x3140d9f2 CAPThread::Entry(CAPThread*) + 294
5 libsystem_c.dylib 0x39b4d0de _pthread_start + 306
6 libsystem_c.dylib 0x39b4cfa4 thread_start + 4
Thread 6 crashed with ARM Thread State (32-bit):
r0: 0x0010f522 r1: 0x39700941 r2: 0x39e57e88 r3: 0x1f8dc028
r4: 0x1208b2fd r5: 0x0000001c r6: 0x00000000 r7: 0x04af9f18
r8: 0x1f8dc028 r9: 0x007f8014 r10: 0x00000004 r11: 0x00000037
ip: 0x39d4db30 sp: 0x04af9d50 lr: 0x31946eb7 pc: 0x3231d692
cpsr: 0x20000030
EXC_BAD_ACCESS generally means that you are sending a objective c message to an invalid memory address. This happens because an object that you are using has been deallocated.
Use NSZombieEnabled to get more information.
Start commenting out stuff. It's a memory issue, find the offending line of code.

Cocos2D 2 OSX EXC_BAD_ACCESS (SIGSEGV)

I'm updating a Game I have for the Mac and the update works fine while running through XCode.
I try to Distribute through Developer ID-signed Application so I can have a friend test it and when I run the app and also give them the app it crashes just after the Main Menu. Am I exporting it wrong? Why would it run fine through XCode and then I try to export it and it crashes every time?
Here is my error log:
Crashed Thread: 6 CVDisplayLink
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000121028021
VM Regions Near 0x121028021:
CG shared images 000000011f294000-000000011f29c000 [ 32K] r--/r-- SM=SHM
-->
CG shared images 00000001c0001000-00000001c0009000 [ 32K] rw-/rw- SM=SHM
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff91ef6686 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff91ef5c42 mach_msg + 70
2 com.apple.CoreFoundation 0x00007fff8bf01803 __CFRunLoopServiceMachPort + 195
3 com.apple.CoreFoundation 0x00007fff8bf06ee6 __CFRunLoopRun + 1078
4 com.apple.CoreFoundation 0x00007fff8bf066b2 CFRunLoopRunSpecific + 290
5 com.apple.HIToolbox 0x00007fff943620a4 RunCurrentEventLoopInMode + 209
6 com.apple.HIToolbox 0x00007fff94361e42 ReceiveNextEventCommon + 356
7 com.apple.HIToolbox 0x00007fff94361cd3 BlockUntilNextEventMatchingListInMode + 62
8 com.apple.AppKit 0x00007fff961c8613 _DPSNextEvent + 685
9 com.apple.AppKit 0x00007fff961c7ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
10 com.apple.AppKit 0x00007fff961bf283 -[NSApplication run] + 517
11 com.apple.AppKit 0x00007fff96163cb6 NSApplicationMain + 869
12 libdyld.dylib 0x00007fff916837e1 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fff91ef86d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8ce15eec _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff8ce15cb3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff8ce00171 start_wqthread + 13
Thread 2:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff91ef8d16 kevent + 10
1 libdispatch.dylib 0x00007fff91fbfdea _dispatch_mgr_invoke + 883
2 libdispatch.dylib 0x00007fff91fbf9ee _dispatch_mgr_thread + 54
Thread 3:
0 libsystem_kernel.dylib 0x00007fff91ef86d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8ce15eec _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff8ce15cb3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff8ce00171 start_wqthread + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff91ef86d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8ce15eec _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff8ce15cb3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff8ce00171 start_wqthread + 13
Thread 5:
0 libsystem_kernel.dylib 0x00007fff91ef86d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8ce15eec _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff8ce15cb3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff8ce00171 start_wqthread + 13
Thread 6 Crashed:: CVDisplayLink
0 com.lasthaven.wordshufflemac 0x000000010bacc52a -[GameScene scrambleWord:] + 158 (GameScene.m:322)
1 com.lasthaven.wordshufflemac 0x000000010baced36 -[GameScene setupNewWord] + 373 (GameScene.m:878)
2 com.lasthaven.wordshufflemac 0x000000010bacb6c1 -[GameScene initializeGame] + 941 (GameScene.m:112)
3 com.lasthaven.wordshufflemac 0x000000010bacb2fc -[GameScene init] + 428 (GameScene.m:56)
4 com.lasthaven.wordshufflemac 0x000000010baf30c1 +[CCNode node] + 33
5 com.lasthaven.wordshufflemac 0x000000010bacb11b +[GameScene scene] + 62 (GameScene.m:32)
6 com.lasthaven.wordshufflemac 0x000000010bac9f90 -[MenuScene playGame:] + 363 (MenuScene.m:301)
7 com.lasthaven.wordshufflemac 0x000000010baee7e3 -[CCMenu ccMouseUp:] + 112
8 com.lasthaven.wordshufflemac 0x000000010bb177fb -[CCEventDispatcher mouseUp:] + 101
9 com.apple.Foundation 0x00007fff97fa5220 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 212
10 com.apple.Foundation 0x00007fff97fdf8b9 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:] + 122
11 com.lasthaven.wordshufflemac 0x000000010bb17f25 -[CCEventDispatcher dispatchEvent:] + 140
12 com.apple.Foundation 0x00007fff97fab677 __NSThreadPerformPerform + 225
13 com.apple.CoreFoundation 0x00007fff8bee4101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
14 com.apple.CoreFoundation 0x00007fff8bee3a25 __CFRunLoopDoSources0 + 245
15 com.apple.CoreFoundation 0x00007fff8bf06dc5 __CFRunLoopRun + 789
16 com.apple.CoreFoundation 0x00007fff8bf066b2 CFRunLoopRunSpecific + 290
17 com.apple.Foundation 0x00007fff97fb389e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 268
18 com.lasthaven.wordshufflemac 0x000000010bb16888 -[CCDirectorDisplayLink getFrameForTime:] + 162
19 com.apple.CoreVideo 0x00007fff8c0c603d CVDisplayLink::performIO(CVTimeStamp*) + 203
20 com.apple.CoreVideo 0x00007fff8c0c52a4 CVDisplayLink::runIOThread() + 632
21 com.apple.CoreVideo 0x00007fff8c0c5013 startIOThread(void*) + 148
22 libsystem_c.dylib 0x00007fff8ce13742 _pthread_start + 327
23 libsystem_c.dylib 0x00007fff8ce00181 thread_start + 13
scratch that.
after staring at this line for hours:
0 com.lasthaven.wordshufflemac 0x000000010bacc52a -[GameScene scrambleWord:] + 158 (GameScene.m:322)
I realized that the code consisted of a for loop and I couldn't figure out what was wrong with it! So in the end I forgot to initialize the int i in beginning of the for loop.
for(int i = 0; i < [word length]; i++ {
}
So for something so simple that caused a crash outside of XCode but not within it drove me nuts!
Thanks for reading!

Cocoa App crash calling a 3rd party API

My Cocoa Objective-C app (in XCode) occasionally crashes in the part where it calls a 3rd party API. I believe that it's a memory leak or something. I attach the part where my program will, the 3rd party API and the crash log.
Please help to give me pointers on how I can solve this. Thanks a lot!
My code:
.
.
.
uint8_t InfoProg[4];//10
uint8_t nInfoProg = 4;//10
uint8_t ret;
NSString *result;
NSLog(#"***Calling GetConnectedProgramers***");
ret = GetConnectedProgrammers(InfoProg, nInfoProg); // The part where it crashes sometimes
.
.
.
3rd party API function:
/**
GET INFO ON CONNECTED USB PROGRAMMERS
reports back the number of connected USB programmer devices on the host
#param InfoProg
points to the memory that will be filled with the info on the connected
USB programmers;
it is the responsibility of the application to allocate this memory
and to size it sufficiently. This should be an buffer with at least 8 bytes.
InfoProg[x] = 0; no USB programmer allocated to that number
InfoProg[x] = 1; USB programmer allocated to that number = USB programmer available
#param nInfoProg
is the number of requested data structures
#return
is the number of programmers connected
*/
uint8_t GetConnectedProgrammers (uint8_t *InfoProg, uint8_t nInfoProg);
Crash Report:
Process: FCT_MACOS [575]
Path: /Virgo_FG2_EVT/FCT_MACOS3p55c.app/Contents/MacOS/FCT_MACOS
Identifier: com.TopTest.FCTMACOS
Version: 3.55c (3.55c)
Code Type: X86 (Native)
Parent Process: launchd [132]
Date/Time: 2012-08-03 10:34:35.151 +0800
OS Version: Mac OS X 10.7.3 (11D2001)
Report Version: 9
Interval Since Last Report: 16921 sec
Crashes Since Last Report: 3
Per-App Interval Since Last Report: 5164 sec
Per-App Crashes Since Last Report: 3
Anonymous UUID: 22314E10-99B9-4989-A2E8-53631295027B
Crashed Thread: 4
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000000005a5
VM Regions Near 0x5a5:
--> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] ---/--- SM=NUL /Virgo_FG2_EVT/FCT_MACOS3p55c.app/Contents/MacOS/FCT_MACOS
VM_ALLOCATE 0000000000001000-0000000000013000 [ 72K] ---/--- SM=NUL
Application Specific Information:
objc_msgSend() selector name: isEqual:
objc[575]: garbage collection is OFF
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x964edc22 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x964ed1f6 mach_msg + 70
2 com.apple.CoreFoundation 0x9677ec7a __CFRunLoopServiceMachPort + 170
3 com.apple.CoreFoundation 0x96787da4 __CFRunLoopRun + 1428
4 com.apple.CoreFoundation 0x9678747c CFRunLoopRunSpecific + 332
5 com.apple.CoreFoundation 0x96787328 CFRunLoopRunInMode + 120
6 com.apple.HIToolbox 0x9973417f RunCurrentEventLoopInMode + 318
7 com.apple.HIToolbox 0x9973b4e7 ReceiveNextEventCommon + 381
8 com.apple.HIToolbox 0x9973b356 BlockUntilNextEventMatchingListInMode + 88
9 com.apple.AppKit 0x957dfa9c _DPSNextEvent + 678
10 com.apple.AppKit 0x957df306 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
11 com.apple.AppKit 0x957db675 -[NSApplication run] + 911
12 com.apple.AppKit 0x95a6f261 NSApplicationMain + 1054
13 com.TopTest.FCTMACOS 0x00014055 start + 53
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x964f090a kevent + 10
1 libdispatch.dylib 0x97c1dc58 _dispatch_mgr_invoke + 969
2 libdispatch.dylib 0x97c1c6a7 _dispatch_mgr_thread + 53
Thread 2:
0 libsystem_kernel.dylib 0x964f0ef2 __sem_wait + 10
1 com.ni.framework.nipalu 0x001ebd0b tTimerTimeWasterSleep::sleep(u64, tTimerTimeUnit, long*) const + 3019
2 com.ni.framework.NI4882 0x06cad33c WaitSRQ + 99996
3 com.ni.framework.nipalu 0x001edc78 tThreadUtility::getCurrentThreadId() + 104
4 libsystem_c.dylib 0x918aeed9 _pthread_start + 335
5 libsystem_c.dylib 0x918b26de thread_start + 34
Thread 3:
0 libsystem_kernel.dylib 0x964edc22 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x964ed1f6 mach_msg + 70
2 com.apple.framework.IOKit 0x982f92df io_connect_method + 465
3 com.apple.framework.IOKit 0x982a9f21 IOConnectCallMethod + 559
4 com.apple.framework.IOKit 0x982aa21b IOConnectCallStructMethod + 84
5 com.ni.framework.nipalu 0x001f11f1 tThreadUtility::yield(iThreadController*, long*) + 12993
6 com.ni.framework.nipalu 0x001ec4b3 tTimerTimeWasterSleep::sleep(u64, tTimerTimeUnit, long*) const + 4979
7 com.ni.framework.NI4882 0x06c9940a WaitSRQ + 18282
8 com.ni.framework.nipalu 0x001edc78 tThreadUtility::getCurrentThreadId() + 104
9 libsystem_c.dylib 0x918aeed9 _pthread_start + 335
10 libsystem_c.dylib 0x918b26de thread_start + 34
Thread 4 Crashed:
0 libobjc.A.dylib 0x915bcd47 objc_msgSend + 23
1 com.apple.CoreFoundation 0x9675b57a CFEqual + 154
2 com.apple.framework.IOKit 0x982cbc80 IOHIDDeviceUnscheduleFromRunLoop + 29
3 com.TopTest.FCTMACOS 0x0008dee2 closeAll + 66
4 com.apple.CoreFoundation 0x967ea298 -[NSObject performSelector:withObject:withObject:] + 72
5 com.TopTest.FCTMACOS 0x000213ff -[TestViewController threadRunTest:] + 2593
6 com.apple.Foundation 0x97ddbe59 -[NSThread main] + 45
7 com.apple.Foundation 0x97ddbe09 __NSThread__main__ + 1582
8 libsystem_c.dylib 0x918aeed9 _pthread_start + 335
9 libsystem_c.dylib 0x918b26de thread_start + 34
Thread 5:
0 libsystem_kernel.dylib 0x964f002e __workq_kernreturn + 10
1 libsystem_c.dylib 0x918b0ccf _pthread_wqthread + 773
2 libsystem_c.dylib 0x918b26fe start_wqthread + 30
Thread 6:
0 libsystem_kernel.dylib 0x964f002e __workq_kernreturn + 10
1 libsystem_c.dylib 0x918b0ccf _pthread_wqthread + 773
2 libsystem_c.dylib 0x918b26fe start_wqthread + 30
Thread 7:
0 libsystem_kernel.dylib 0x964f002e __workq_kernreturn + 10
1 libsystem_c.dylib 0x918b0ccf _pthread_wqthread + 773
2 libsystem_c.dylib 0x918b26fe start_wqthread + 30
Thread 8:
0 libsystem_kernel.dylib 0x964f002e __workq_kernreturn + 10
1 libsystem_c.dylib 0x918b0ccf _pthread_wqthread + 773
2 libsystem_c.dylib 0x918b26fe start_wqthread + 30
Thread 9:
0 libsystem_kernel.dylib 0x964f002e __workq_kernreturn + 10
1 libsystem_c.dylib 0x918b0ccf _pthread_wqthread + 773
2 libsystem_c.dylib 0x918b26fe start_wqthread + 30
Thread 10:
0 libsystem_kernel.dylib 0x964efbb2 __semwait_signal + 10
1 libsystem_c.dylib 0x918637b9 nanosleep$UNIX2003 + 187
2 com.apple.Foundation 0x97e1c05f +[NSThread sleepForTimeInterval:] + 170
3 com.TopTest.FCTMACOS 0x0006cbd7 -[RS232 threadB139RS232Read:] + 223
4 com.apple.Foundation 0x97ddbe59 -[NSThread main] + 45
5 com.apple.Foundation 0x97ddbe09 __NSThread__main__ + 1582
6 libsystem_c.dylib 0x918aeed9 _pthread_start + 335
7 libsystem_c.dylib 0x918b26de thread_start + 34
Thread 4 crashed with X86 Thread State (32-bit):
eax: 0x78690d00 ebx: 0xac7d8724 ecx: 0x96128a48 edx: 0x00000585
edi: 0x7868cc80 esi: 0x78615800 ebp: 0xb0102c18 esp: 0xb0102bf8
ss: 0x00000023 efl: 0x00010206 eip: 0x915bcd47 cs: 0x0000001b
ds: 0x00000023 es: 0x00000023 fs: 0x00000023 gs: 0x0000000f
cr2: 0x000005a5
Logical CPU: 2
...
From the docs;
#param InfoProg
This should be an buffer with at least 8 bytes.
but
uint8_t InfoProg[4];
only consists of 4 uint8_t (bytes). Try increasing your buffer.

What's going wrong in this crash log

So i have this crash log from my application. I don't have much experience in reading such logs :( Could someone please help me?
Thanks
CrashLog:
Process: SoundCloud Downloader [15495]
Path: /Applications/SoundCloud Downloader.app/Contents/MacOS/SoundCloud Downloader
Identifier: com.BirdiCode.SoundCloud_Downloader
Version: 2.1.1 (b7)
Code Type: X86-64 (Native)
Parent Process: launchd [227]
Date/Time: 2012-01-08 15:16:21.614 +0100
OS Version: Mac OS X 10.7.2 (11C74)
Report Version: 9
Crashed Thread: 7
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
VM Regions Near 0:
-->
__TEXT 0000000100000000-0000000100053000 [ 332K] r-x/rwx SM=COW /Applications/SoundCloud Downloader.app/Contents/MacOS/SoundCloud Downloader
Application Specific Information:
objc_msgSend() selector name: _cfTypeID
objc[15495]: garbage collection is OFF
Thread 0:: Dispatch queue: com.apple.main-thread
0 libunwind.dylib 0x00007fff8bf97239 libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncodingRBPFrame(unsigned int, unsigned long long, libunwind::LocalAddressSpace&, libunwind::Registers_x86_64&) + 1
1 libunwind.dylib 0x00007fff8bf971fd libunwind::CompactUnwinder_x86_64<libunwind::LocalAddressSpace>::stepWithCompactEncoding(unsigned int, unsigned long long, libunwind::LocalAddressSpace&, libunwind::Registers_x86_64&) + 37
2 libunwind.dylib 0x00007fff8bf97171 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step() + 69
3 libobjc.A.dylib 0x00007fff91442294 objc_addExceptionHandler + 82
4 com.apple.CoreFoundation 0x00007fff94d27d44 _CFDoExceptionOperation + 308
5 com.apple.AppKit 0x00007fff8ffd3309 _NSAppKitLock + 73
6 com.apple.AppKit 0x00007fff9009acb2 -[NSCGSContext _invalidate] + 57
7 com.apple.AppKit 0x00007fff9009ac53 -[NSCGSContext dealloc] + 27
8 com.apple.AppKit 0x00007fff9009ac31 -[NSWindowGraphicsContext dealloc] + 67
9 com.apple.AppKit 0x00007fff9009abe5 -[NSBitmapGraphicsContext dealloc] + 92
10 libobjc.A.dylib 0x00007fff9144003c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 434
11 com.apple.CoreFoundation 0x00007fff94cc5f75 _CFAutoreleasePoolPop + 37
12 com.apple.Foundation 0x00007fff8a83c2a6 __NSFireDelayedPerform + 468
13 com.apple.CoreFoundation 0x00007fff94cecf84 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
14 com.apple.CoreFoundation 0x00007fff94cecad6 __CFRunLoopDoTimer + 534
15 com.apple.CoreFoundation 0x00007fff94ccd471 __CFRunLoopRun + 1617
16 com.apple.CoreFoundation 0x00007fff94cccae6 CFRunLoopRunSpecific + 230
17 com.apple.HIToolbox 0x00007fff8c02a3d3 RunCurrentEventLoopInMode + 277
18 com.apple.HIToolbox 0x00007fff8c03163d ReceiveNextEventCommon + 355
19 com.apple.HIToolbox 0x00007fff8c0314ca BlockUntilNextEventMatchingListInMode + 62
20 com.apple.AppKit 0x00007fff8ffd83f1 _DPSNextEvent + 659
21 com.apple.AppKit 0x00007fff8ffd7cf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
22 com.apple.AppKit 0x00007fff8ffd462d -[NSApplication run] + 470
23 com.apple.AppKit 0x00007fff9025380c NSApplicationMain + 867
24 com.BirdiCode.SoundCloud_Downloader 0x0000000100001e50 start + 52
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff8c7c97e6 kevent + 10
1 libdispatch.dylib 0x00007fff8f5cb5be _dispatch_mgr_invoke + 923
2 libdispatch.dylib 0x00007fff8f5ca14e _dispatch_mgr_thread + 54
Thread 2:: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x00007fff8c7c767a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8c7c6d71 mach_msg + 73
2 com.apple.CoreFoundation 0x00007fff94cc4b6c __CFRunLoopServiceMachPort + 188
3 com.apple.CoreFoundation 0x00007fff94ccd2d4 __CFRunLoopRun + 1204
4 com.apple.CoreFoundation 0x00007fff94cccae6 CFRunLoopRunSpecific + 230
5 com.apple.Foundation 0x00007fff8a8960ab +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 335
6 com.apple.Foundation 0x00007fff8a88a7fe -[NSThread main] + 68
7 com.apple.Foundation 0x00007fff8a88a776 __NSThread__main__ + 1575
8 libsystem_c.dylib 0x00007fff8a60e8bf _pthread_start + 335
9 libsystem_c.dylib 0x00007fff8a611b75 thread_start + 13
Thread 3:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff8c7c8df2 __select + 10
1 com.apple.CoreFoundation 0x00007fff94d15f9b __CFSocketManager + 1355
2 libsystem_c.dylib 0x00007fff8a60e8bf _pthread_start + 335
3 libsystem_c.dylib 0x00007fff8a611b75 thread_start + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff8c7c9192 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8a610594 _pthread_wqthread + 758
2 libsystem_c.dylib 0x00007fff8a611b85 start_wqthread + 13
Thread 5:
0 libsystem_kernel.dylib 0x00007fff8c7c9192 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8a610594 _pthread_wqthread + 758
2 libsystem_c.dylib 0x00007fff8a611b85 start_wqthread + 13
Thread 6:
0 libsystem_kernel.dylib 0x00007fff8c7c9192 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8a610594 _pthread_wqthread + 758
2 libsystem_c.dylib 0x00007fff8a611b85 start_wqthread + 13
Thread 7 Crashed:
0 libobjc.A.dylib 0x00007fff9143ae90 objc_msgSend + 16
1 com.apple.CoreFoundation 0x00007fff94ca6ae0 CFGetTypeID + 240
2 com.apple.CoreGraphics 0x00007fff8b1a31f0 CGSReleaseRegion + 23
3 com.apple.AppKit 0x00007fff9001ac0d -[NSRegion dealloc] + 33
4 com.apple.AppKit 0x00007fff900a23fc +[_NSAutomaticFocusRing showForView:] + 2655
5 com.apple.AppKit 0x00007fff9001acbe -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 136
6 com.apple.AppKit 0x00007fff9001493e -[NSView displayIfNeeded] + 1676
7 com.apple.AppKit 0x00007fff9016ca18 -[NSWindow setFrame:display:animate:] + 1320
8 com.BirdiCode.SoundCloud_Downloader 0x0000000100015682 -[SoundCloud_DownloaderAppDelegate expandTheWindowForDownload] + 654
9 com.BirdiCode.SoundCloud_Downloader 0x0000000100016374 -[SoundCloud_DownloaderAppDelegate addToDownloadsQue:title:artist:buy:] + 2900
10 com.BirdiCode.SoundCloud_Downloader 0x00000001000126f9 -[SoundCloud_DownloaderAppDelegate prepareForDownloadThread:] + 727
11 com.BirdiCode.SoundCloud_Downloader 0x00000001000129c6 -[SoundCloud_DownloaderAppDelegate prepareThread1] + 70
12 com.apple.Foundation 0x00007fff8a88a7fe -[NSThread main] + 68
13 com.apple.Foundation 0x00007fff8a88a776 __NSThread__main__ + 1575
14 libsystem_c.dylib 0x00007fff8a60e8bf _pthread_start + 335
15 libsystem_c.dylib 0x00007fff8a611b75 thread_start + 13
Thread 8:
0 libsystem_kernel.dylib 0x00007fff8c7c9192 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff8a610594 _pthread_wqthread + 758
2 libsystem_c.dylib 0x00007fff8a611b85 start_wqthread + 13
Thread 9:
0 libsystem_kernel.dylib 0x00007fff8c7c767a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8c7c6d71 mach_msg + 73
2 com.apple.CoreFoundation 0x00007fff94cc4b6c __CFRunLoopServiceMachPort + 188
3 com.apple.CoreFoundation 0x00007fff94ccd2d4 __CFRunLoopRun + 1204
4 com.apple.CoreFoundation 0x00007fff94cccae6 CFRunLoopRunSpecific + 230
5 com.apple.Foundation 0x00007fff8a83c04f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 267
6 com.BirdiCode.SoundCloud_Downloader 0x0000000100029601 -[ASIHTTPRequest startSynchronous] + 229
7 com.BirdiCode.SoundCloud_Downloader 0x0000000100013849 -[SoundCloud_DownloaderAppDelegate downloadThisFromThread:] + 952
8 com.BirdiCode.SoundCloud_Downloader 0x0000000100014db2 -[SoundCloud_DownloaderAppDelegate downloadT1] + 70
9 com.apple.Foundation 0x00007fff8a88a7fe -[NSThread main] + 68
10 com.apple.Foundation 0x00007fff8a88a776 __NSThread__main__ + 1575
11 libsystem_c.dylib 0x00007fff8a60e8bf _pthread_start + 335
12 libsystem_c.dylib 0x00007fff8a611b75 thread_start + 13
Thread 10:
0 libsystem_kernel.dylib 0x00007fff8c7c767a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8c7c6d71 mach_msg + 73
2 com.apple.CoreFoundation 0x00007fff94cc4b6c __CFRunLoopServiceMachPort + 188
3 com.apple.CoreFoundation 0x00007fff94ccd2d4 __CFRunLoopRun + 1204
4 com.apple.CoreFoundation 0x00007fff94cccae6 CFRunLoopRunSpecific + 230
5 com.apple.Foundation 0x00007fff8a83c04f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 267
6 com.BirdiCode.SoundCloud_Downloader 0x0000000100029601 -[ASIHTTPRequest startSynchronous] + 229
7 com.BirdiCode.SoundCloud_Downloader 0x00000001000139c3 -[SoundCloud_DownloaderAppDelegate downloadThisFromThread:] + 1330
8 com.BirdiCode.SoundCloud_Downloader 0x0000000100014ccb -[SoundCloud_DownloaderAppDelegate downloadT2] + 70
9 com.apple.Foundation 0x00007fff8a88a7fe -[NSThread main] + 68
10 com.apple.Foundation 0x00007fff8a88a776 __NSThread__main__ + 1575
11 libsystem_c.dylib 0x00007fff8a60e8bf _pthread_start + 335
12 libsystem_c.dylib 0x00007fff8a611b75 thread_start + 13
Thread 11:
0 libsystem_kernel.dylib 0x00007fff8c7c767a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8c7c6d71 mach_msg + 73
2 com.apple.CoreFoundation 0x00007fff94cc4b6c __CFRunLoopServiceMachPort + 188
3 com.apple.CoreFoundation 0x00007fff94ccd2d4 __CFRunLoopRun + 1204
4 com.apple.CoreFoundation 0x00007fff94cccae6 CFRunLoopRunSpecific + 230
5 com.apple.Foundation 0x00007fff8a83c04f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 267
6 com.BirdiCode.SoundCloud_Downloader 0x0000000100029601 -[ASIHTTPRequest startSynchronous] + 229
7 com.BirdiCode.SoundCloud_Downloader 0x0000000100013b3d -[SoundCloud_DownloaderAppDelegate downloadThisFromThread:] + 1708
8 com.BirdiCode.SoundCloud_Downloader 0x0000000100014be4 -[SoundCloud_DownloaderAppDelegate downloadT3] + 70
9 com.apple.Foundation 0x00007fff8a88a7fe -[NSThread main] + 68
10 com.apple.Foundation 0x00007fff8a88a776 __NSThread__main__ + 1575
11 libsystem_c.dylib 0x00007fff8a60e8bf _pthread_start + 335
12 libsystem_c.dylib 0x00007fff8a611b75 thread_start + 13
Thread 7 crashed with X86 Thread State (64-bit):
rax: 0x00007fff7a7a5b00 rbx: 0x0000000101aad400 rcx: 0xf000000000000000 rdx: 0x00007fff7a7d56c0
rdi: 0x0000000101aad400 rsi: 0x00007fff9089fb17 rbp: 0x000000010a1da1d0 rsp: 0x000000010a1da1b0
r8: 0x0000000000000080 r9: 0x0000000000000180 r10: 0x000000010035ec80 r11: 0xf000000000000000
r12: 0x000000010a5263b0 r13: 0x00000000000000e0 r14: 0x000000010a527250 r15: 0x000000010a526500
rip: 0x00007fff9143ae90 rfl: 0x0000000000010246 cr2: 0x000000010a527000
Logical CPU: 0
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 7
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 167922
thread_create: 2
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=162.9M resident=115.1M(71%) swapped_out_or_unallocated=47.8M(29%)
Writable regions: Total=122.9M written=12.7M(10%) resident=21.4M(17%) swapped_out=860K(1%) unallocated=101.4M(83%)
REGION TYPE VIRTUAL
=========== =======
CG backing stores 1496K
CG image 1872K
CG raster data 1988K
CG shared images 3512K
CoreGraphics 16K
CoreImage 4K
CoreServices 2888K
MALLOC 86.6M
MALLOC guard page 32K
Memory tag=240 4K
Memory tag=242 12K
Memory tag=243 12K
Memory tag=251 8K
OpenCL 8K
STACK GUARD 56.0M
Stack 13.1M
VM_ALLOCATE 16.2M
__CI_BITMAP 80K
__DATA 15.3M
__IMAGE 1256K
__LINKEDIT 48.2M
__RC_CAMERAS 236K
__TEXT 114.7M
__UNICODE 544K
mapped file 45.3M
shared memory 17.7M
=========== =======
TOTAL 426.9M
Also, ist there a book or some website where i could learn how to read crash logs?
Update:
Here is the code for expandWindowForDownload
- (void)expandTheWindowForDownload
{
// Get the window size
NSRect frame = [window frame];
frame.origin.y += frame.size.height - 201;
frame.size.height = 201;
// Apply it
[window setFrame:frame display:YES animate:YES];
}
Here are the things I normally look for:
Exception type
This normally helps you to understand what the basic problem is. In your case, the exception type is EXC_BAD_ACCESS:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
As Google, Stack Overflow or Apple will tell you, these kind of errors occur when you try to access an object after you've released it. (One common root cause of this is if you "over-release" an object - i.e. you call the release method on an object more often than it had been retained.)
Xcode can often find the source of these kind of errors when you run "Analyze" from the Product menu. (In Xcode 3 it's "Build and Analyze" from the Build menu if I recall correctly.) So give that a try, it might save you some time. Otherwise...
Crashed Thread
You'll find this at the top of the crash log, right above the exception type. In your case you've got:
Crashed Thread: 7
This allows you to discard most of the content of the crash log and concentrate on just the thread that caused the crash. So the bit you're interested in is this:
Thread 7 Crashed:
0 libobjc.A.dylib 0x00007fff9143ae90 objc_msgSend + 16
1 com.apple.CoreFoundation 0x00007fff94ca6ae0 CFGetTypeID + 240
2 com.apple.CoreGraphics 0x00007fff8b1a31f0 CGSReleaseRegion + 23
3 com.apple.AppKit 0x00007fff9001ac0d -[NSRegion dealloc] + 33
4 com.apple.AppKit 0x00007fff900a23fc +[_NSAutomaticFocusRing showForView:] + 2655
5 com.apple.AppKit 0x00007fff9001acbe -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 136
6 com.apple.AppKit 0x00007fff9001493e -[NSView displayIfNeeded] + 1676
7 com.apple.AppKit 0x00007fff9016ca18 -[NSWindow setFrame:display:animate:] + 1320
8 com.BirdiCode.SoundCloud_Downloader 0x0000000100015682 -[SoundCloud_DownloaderAppDelegate expandTheWindowForDownload] + 654
9 com.BirdiCode.SoundCloud_Downloader 0x0000000100016374 -[SoundCloud_DownloaderAppDelegate addToDownloadsQue:title:artist:buy:] + 2900
10 com.BirdiCode.SoundCloud_Downloader 0x00000001000126f9 -[SoundCloud_DownloaderAppDelegate prepareForDownloadThread:] + 727
11 com.BirdiCode.SoundCloud_Downloader 0x00000001000129c6 -[SoundCloud_DownloaderAppDelegate prepareThread1] + 70
12 com.apple.Foundation 0x00007fff8a88a7fe -[NSThread main] + 68
13 com.apple.Foundation 0x00007fff8a88a776 __NSThread__main__ + 1575
14 libsystem_c.dylib 0x00007fff8a60e8bf _pthread_start + 335
15 libsystem_c.dylib 0x00007fff8a611b75 thread_start + 13
Now you can work down this stack trace from top to bottom until you reach the first call from your own code. (In theory it's possible that the crash is being caused by an error in Apple's code, but in practice it's almost always our code, not theirs.)
So for you the line of code where things have started to go wrong is:
8 com.BirdiCode.SoundCloud_Downloader 0x0000000100015682 -[SoundCloud_DownloaderAppDelegate expandTheWindowForDownload] + 654
Have a look through the expandTheWindowForDownload method and see if you can spot where you're accessing a released object. If you can't spot it, post the code for that method here and we should be able to find the answer and help you understand what's gone wrong.
Ok, so for anyone viewing this I found the solution to the problem.
It seems to be if you resize the window and the user has "Focused" on a NSTextField while the window is resizing it may cause the crash. This happens on all text input except the NSForm.
This problem occurs on 10.7.2 & 10.7.3. I haven't tried it on any other versions of mac os x.
To solve this problem I just called [textField setEditable:NO]; before and [textField setEditable:YES]; after the window resizing call.
Anyway, thanks for helping!