One of our users confronted us with the problem, that the App crashes directly after the app start. Now we only got two Crash Reports, but couldn't reproduce the Crash on any of our devices. The Build is an Enterprise Distribution Build.
The Device is an iPhone 4, with iOS 6.
Any idea would be much appreciated.
Date/Time: 2012-10-30 17:41:11.762 +0100
OS Version: iOS 6.0 (10A403)
Report Version: 104
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_c.dylib 0x38edad8e memmove$VARIANT$CortexA8 + 654
1 QuartzCore 0x3401c81c CA::Render::Encoder::encode_bytes(void const*, unsigned long) + 24
2 QuartzCore 0x3401d494 CA::Render::Layer::Ext::encode(CA::Render::Encoder*) const + 152
3 QuartzCore 0x3401c706 CA::Render::encode_set_object(CA::Render::Encoder*, unsigned long, unsigned int, CA::Render::Object*, unsigned int) + 42
4 QuartzCore 0x3401b3e2 CA::Context::commit_layer(CA::Layer*, unsigned int, unsigned int, void*) + 114
5 QuartzCore 0x34011076 CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 310
6 QuartzCore 0x3401101c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 220
7 QuartzCore 0x3401101c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 220
8 QuartzCore 0x3401052c CA::Context::commit_transaction(CA::Transaction*) + 1024
9 QuartzCore 0x34010024 CA::Transaction::commit() + 312
10 QuartzCore 0x3400fe84 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
11 CoreFoundation 0x34e326ca __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
12 CoreFoundation 0x34e309bc __CFRunLoopDoObservers + 272
13 CoreFoundation 0x34e30d12 __CFRunLoopRun + 738
14 CoreFoundation 0x34da3eb8 CFRunLoopRunSpecific + 352
15 CoreFoundation 0x34da3d44 CFRunLoopRunInMode + 100
16 GraphicsServices 0x35b0c2e6 GSEventRunModal + 70
17 UIKit 0x379e92fc UIApplicationMain + 1116
18 MyApp 0x000ceb90 main (main.m:16)
19 MyApp 0x000ceb2c start + 36
Here's the second one:
Date/Time: 2012-10-29 15:54:48.926 +0100
OS Version: iOS 6.0 (10A403)
Report Version: 104
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x33b1beb4 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x33b1c048 mach_msg + 36
2 CoreFoundation 0x34e32040 __CFRunLoopServiceMachPort + 124
3 CoreFoundation 0x34e30d5a __CFRunLoopRun + 810
4 CoreFoundation 0x34da3eb8 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x34da3d44 CFRunLoopRunInMode + 100
6 GraphicsServices 0x35b0c2e6 GSEventRunModal + 70
7 UIKit 0x379e92fc UIApplicationMain + 1116
8 MyApp 0x00024b90 main (main.m:16)
9 MyApp 0x00024b2c start + 36
The first one I would suspect that you're animating things while they're being put onto the screen (since it happens during launch). Perhaps something UI-related you're doing in your application delegate, or otherwise doing from a view controller that isn't on the screen yet. That said, the Core Animation calls may be a red herring (see below).
The second one is unlikely the actual crash point. iOS cannot always determine which thread actually crashed, and sometimes will blame the wrong one (and most often thread 0 will be incorrectly blamed). Crashing in a _trap function is really unlikely. The thread is generally suspended at this point. I would study the other threads and see if one of them was doing something suspicious. If you find it elsewhere, then this could also be the cause of the first crash.
Related
The issue started happening randomly after iOS 16 update. For video exporting AVFoundation's AVAssetExportSession is used. The issue happens only when AVVideoComposition's animationTool property is applied. The ui freezes when the export process finishes. Main thread's call stack is attached below.
Thread 0 - com.apple.main-thread - (TH_STATE_WAITING)
0 libsystem_kernel.dylib +0x13004 _mach_msg2_internal
1 libsystem_kernel.dylib +0x13244 _mach_msg_overwrite
2 libsystem_kernel.dylib +0x1088 _mach_msg
3 QuartzCore +0x8a6ac CA::Render::Message::send_message()
4 QuartzCore +0x2612a8 CA::Render::Encoder::send_message(unsigned int, unsigned int, unsigned int*, unsigned long)
5 QuartzCore +0x31168 CA::Context::commit_transaction(CA::Transaction*, double, double*)
6 QuartzCore +0x663c0 CA::Transaction::commit()
7 UIKitCore +0x504fcc __UIApplicationFlushCATransaction
8 UIKitCore +0x651674 __UIUpdateSequenceRun
9 UIKitCore +0xc90900 _schedulerStepScheduledMainSection
10 UIKitCore +0xc8facc _runloopSourceCallback
11 CoreFoundation +0xd6228 ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
12 CoreFoundation +0xe2610 ___CFRunLoopDoSource0
13 CoreFoundation +0x66578 ___CFRunLoopDoSources0
14 CoreFoundation +0x7beb4 ___CFRunLoopRun
15 CoreFoundation +0x811e0 _CFRunLoopRunSpecific
16 GraphicsServices +0x1364 _GSEventRunModal
17 UIKitCore +0x3a2d84 -[UIApplication _run]
18 UIKitCore +0x3a29e8 _UIApplicationMain
19 PicsArt +0x4998b0 main (main.m:29:16)
20 dyld +0x15944 start
I tried to call AVAssetExportSession's exportAsynchronously and cancelExport functions on background queue, as a result the number of crashes decreased, but big number of users still get this app hang. I expect to find some workaround solution for this.
I'm having a strange issue with an iOS app of mine. When it is run via Xcode (Build & Run), all works well. The app launches and everything works as expected.
However, if I try to open the app by tapping its icon as the user would (via Springboard), the app crashes immediately with the crashlog below. It seems to point to some kind of an image-releated issue, but I don't understand how it doesn't occur when debugging using Xcode.
Can anyone shed some light?
Date/Time: 2012-06-15 16:13:29.035 +0100
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 dyld 0x2fe76464 strcmp + 0
1 dyld 0x2fe6a6e2 ImageLoaderMachO::parseLoadCmds() + 54
2 dyld 0x2fe72058 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, ImageLoader::LinkContext const&) + 296
3 dyld 0x2fe6b23a ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 302
4 dyld 0x2fe622f6 _ZN4dyldL10loadPhase6EiRK4statPKcRKNS_11LoadContextE + 478
5 dyld 0x2fe6255e _ZN4dyldL14loadPhase5statEPKcRKNS_11LoadContextEP4statPiPbPSt6vectorIS1_SaIS1_EE + 386
6 dyld 0x2fe62716 _ZN4dyldL10loadPhase5EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 278
7 dyld 0x2fe628fe _ZN4dyldL10loadPhase4EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 218
8 dyld 0x2fe630dc _ZN4dyldL10loadPhase3EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 1144
9 dyld 0x2fe63240 _ZN4dyldL10loadPhase1EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 108
10 dyld 0x2fe63392 _ZN4dyldL10loadPhase0EPKcS1_RKNS_11LoadContextEPSt6vectorIS1_SaIS1_EE + 262
11 dyld 0x2fe634c4 dyld::load(char const*, dyld::LoadContext const&) + 224
12 dyld 0x2fe650f2 dlopen + 742
13 libdyld.dylib 0x360d55a2 dlopen + 42
14 CoreFoundation 0x37256092 _CFBundleDlfcnLoadBundle + 106
15 CoreFoundation 0x37255f36 _CFBundleLoadExecutableAndReturnError + 370
16 Foundation 0x32d7bf40 -[NSBundle loadAndReturnError:] + 904
17 SomeApp 0x000bcb3a 0x5e000 + 387898
18 SomeApp 0x000c56d0 0x5e000 + 423632
19 SomeApp 0x000c539a 0x5e000 + 422810
20 SomeApp 0x00062f86 0x5e000 + 20358
21 UIKit 0x30438c84 -[UIViewController view] + 160
22 SomeApp 0x000622a6 0x5e000 + 17062
23 SomeApp 0x0005fcc4 0x5e000 + 7364
24 UIKit 0x30437ca4 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1176
25 UIKit 0x304317d6 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 402
26 UIKit 0x303ffabc -[UIApplication handleEvent:withNewEvent:] + 1004
27 UIKit 0x303ff560 -[UIApplication sendEvent:] + 48
28 UIKit 0x303fef34 _UIApplicationHandleEvent + 5820
29 GraphicsServices 0x3741b224 PurpleEventCallback + 876
30 CoreFoundation 0x3729f51c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
31 CoreFoundation 0x3729f4be __CFRunLoopDoSource1 + 134
32 CoreFoundation 0x3729e30c __CFRunLoopRun + 1364
33 CoreFoundation 0x3722149e CFRunLoopRunSpecific + 294
34 CoreFoundation 0x37221366 CFRunLoopRunInMode + 98
35 UIKit 0x30430864 -[UIApplication _run] + 544
36 UIKit 0x3042dcce UIApplicationMain + 1074
37 SomeApp 0x0005fb00 0x5e000 + 6912
38 SomeApp 0x0005fac0 0x5e000 + 6848
Edit: Talked this through with the Apple Developer Team. The issue is that I used a self-made plugin in my app that wasn't codesigned (even though I told Xcode to do so). However, Xcode 4.3.3 has a bug that breaks codesigning for bundles, so we'll see how this works out soon.
It looks like this is still a problem as of Xcode 4.5. As a workaround, it seems that you can force the build to sign the bundle.
Adding the following as a final "Run Script" build phase for the bundle fixed it for me:
codesign -fs "iPhone Developer" ${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}
Your application may be taking too long to launch. It is given unlimited time when launching from Xcode, but is not afforded this luxury when launching from SpringBoard.
Take a look at this for reference: https://developer.apple.com/library/ios/#qa/qa2009/qa1592.html
edit: Oh, how did I get here... this is two weeks old.
I don't have much information when did it happened, because it didn't happened on my watch.
Anyone understand what was the reason?
Crash Log:
OS Version: iPhone OS 5.0 (9A334)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x80624913
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x37c38fbc objc_msgSend + 16
1 UIKit 0x32bc8cec -[UIScrollView(UIScrollViewInternal) _scrollViewAnimationEnded] + 128
2 UIKit 0x0061d7ee -[UIScrollViewAccessibility(SafeCategory) _scrollViewAnimationEnded] + 358
3 CoreFoundation 0x309f8224 -[NSObject performSelector:withObject:] + 36
4 UIKit 0x32b84c2a -[UIAnimator stopAnimation:] + 606
5 UIKit 0x32b845d4 -[UIAnimator(Static) _advance:withTimestamp:] + 260
6 UIKit 0x32b844c6 -[UIAnimator(Static) _LCDHeartbeatCallback:] + 46
7 QuartzCore 0x3219a41c CA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 160
8 QuartzCore 0x3219a372 CA::Display::IOMFBDisplayLink::callback(__IOMobileFramebuffer*, unsigned long long, unsigned long long, unsigned long long, void*) + 54
9 IOMobileFramebuffer 0x3577ff8c IOMobileFramebufferVsyncNotifyFunc + 76
10 IOKit 0x31d2d88a IODispatchCalloutFromCFMessage + 182
11 CoreFoundation 0x30a62f3c __CFMachPortPerform + 356
12 CoreFoundation 0x30a6d54c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
13 CoreFoundation 0x30a6d4ee __CFRunLoopDoSource1 + 134
14 CoreFoundation 0x30a6c33c __CFRunLoopRun + 1364
15 CoreFoundation 0x309ef4d6 CFRunLoopRunSpecific + 294
16 CoreFoundation 0x309ef39e CFRunLoopRunInMode + 98
17 GraphicsServices 0x3361dfe6 GSEventRunModal + 150
18 UIKit 0x32a6173c UIApplicationMain + 1084
19 MyApp 0x00002304 0x1000 + 4868
20 MyApp 0x00002298 0x1000 + 4760
Looks like a segmentation fault. It seems like (just by observing the trace) there's some memory issue going on when the UIScrollView finishes a scroll animation. Have you tried enabling NSZombies or putting a breakpoint that catches any kind of exception? I know you said it didn't happen on your watch, but if you could get a brief description of where it happened, maybe you can attempt to replicate it while debugging it in Xcode.
Hullo,
I am experimenting a very vicious crash that shows up in the following way in the device logs:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x50000008
Crashed Thread: 0`
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x33b24c98 objc_msgSend + 16
1 Foundation 0x3429465a _NSURLConnectionReleaseClient + 30
2 CFNetwork 0x355ac608 ClientContextHolder<CFURLConnectionClient_V4>::forget() + 20
3 CFNetwork 0x355ac5ea URLConnectionClient::releaseClientLocked() + 34
4 CFNetwork 0x355a0e9a URLConnectionClient::processEvents() + 170
5 CFNetwork 0x355a0de2 URLConnection::multiplexerClientPerform(RunLoopMultiplexer*) + 30
6 CFNetwork 0x355a0d54 MultiplexerSource::perform() + 120
7 CFNetwork 0x355a0cd2 MultiplexerSource::_perform(void*) + 2
8 CoreFoundation 0x3039ca72 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
9 CoreFoundation 0x3039e758 __CFRunLoopDoSources0 + 376
10 CoreFoundation 0x3039f4e4 __CFRunLoopRun + 224
11 CoreFoundation 0x3032febc CFRunLoopRunSpecific + 224
12 CoreFoundation 0x3032fdc4 CFRunLoopRunInMode + 52
13 GraphicsServices 0x35571418 GSEventRunModal + 108
14 GraphicsServices 0x355714c4 GSEventRun + 56
15 UIKit 0x358c7d62 -[UIApplication _run] + 398
16 UIKit 0x358c5800 UIApplicationMain + 664
17 inArrivo 0x000023ca main (main.m:14)
18 inArrivo 0x00002394 start + 32
After having enabled NSZombie I also have a crash on the compiler log of the following form:
2011-05-09 16:12:24.400 inArrivo[5019:707] * -[NSURLConnection releaseDelegate]: message sent to deallocated instance 0x5d61670
appearing on the app main with the last NSLog comeing from a function with no url connections. Also if I remove some pieces of very innocent code from that function, no crash occurs, and the same happens when I run the complete application on the simulator.
Could someone give me some hints about what I may do to locate the piece of code producing the crash? Normal debugging of course is of little help here.
Thanks,
Fabrizio Bartolomucci
The message indicates that the delegate for NSURLConnection was deallocated. I would suggest you check the delegate object to see if you are doing an extra release on it.
I received the following crash report from a user.
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xf0012e8d
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3601cc98 objc_msgSend + 16
1 CoreFoundation 0x312bdc30 CFGetRetainCount
2 QuartzCore 0x30605c08 CA::release_root_if_unused(_CALayer*, _CALayer*, void*)
3 QuartzCore 0x30605bb4 x_hash_table_remove_if
4 QuartzCore 0x305e4f96 CA::Transaction::commit()
5 QuartzCore 0x305de04e CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
6 CoreFoundation 0x312fca2e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
7 CoreFoundation 0x312fe45e __CFRunLoopDoObservers
8 CoreFoundation 0x312ff754 __CFRunLoopRun
9 CoreFoundation 0x3128febc CFRunLoopRunSpecific
10 CoreFoundation 0x3128fdc4 CFRunLoopRunInMode
11 GraphicsServices 0x32478418 GSEventRunModal
12 GraphicsServices 0x324784c4 GSEventRun
13 UIKit 0x329f8d62 -[UIApplication _run]
14 UIKit 0x329f6800 UIApplicationMain
15 IW Select 0x00002b60 main + 44
16 IW Select 0x00002b28 start + 32
I'm having trouble debugging it since it doesn't look like the crash was even caused by something in my app. Does anyone know what could cause a crash like this?
If we observe the crash log, we will notice that, it was expecting some object but it was already released.(see it was calling CFGetRetainCount on the needed object to acertain that object is still alive, but it is not). Also, if we notice the frameworks then it indicates that crash could be because of some view is released or something related to it.(as it says its crashing during animation.)
0 libobjc.A.dylib 0x3601cc98 objc_msgSend + 16
1 CoreFoundation 0x312bdc30 CFGetRetainCount
2 QuartzCore 0x30605c08 CA::release_root_if_unused(_CALayer*, _CALayer*, void*)
3 QuartzCore 0x30605bb4 x_hash_table_remove_if
4 QuartzCore 0x305e4f96 CA::Transaction::commit()
5 QuartzCore 0x305de04e CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
6 CoreFoundation 0x312fca2e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
Thanks,
This might be able to help you out or at least get you started.
Debugging EXC_BAD_ACCESS Errors
Check your localization settings. Specifically, change your language settings to something other than English/your default language and see if you can reproduce the crash.