My iOS App is getting crash developed using React Native. Below is the stack trace of crash.
Crashed: com.apple.root.default-qos
0 libsystem_kernel.dylib 0x7b78 __pthread_kill + 8
1 libsystem_pthread.dylib 0x73bc pthread_kill + 268
2 libsystem_c.dylib 0x2051c abort + 168
3 RCTImage 0x5d44 RCTBlurredImageWithRadius + 914
4 RCTImage 0x145d4 __68-[RCTImageView imageLoaderLoadedImage:error:forImageSource:partial:]_block_invoke.109 + 44
5 libdispatch.dylib 0x1e68 _dispatch_call_block_and_release + 32
6 libdispatch.dylib 0x3a2c _dispatch_client_callout + 20
7 libdispatch.dylib 0x6b44 _dispatch_queue_override_invoke + 784
8 libdispatch.dylib 0x15164 _dispatch_root_queue_drain + 396
9 libdispatch.dylib 0x1596c _dispatch_worker_thread2 + 164
10 libsystem_pthread.dylib 0x1080 _pthread_wqthread + 228
11 libsystem_pthread.dylib 0xe5c start_wqthread + 8
Any idea what is the reason for this issue.
We're getting a random crash in iOS6, here's the crash stack we're getting:
0 libobjc.A.dylib 0x399d75b0 objc_msgSend + 15
1 CoreFoundation 0x31c945de ___CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
2 CoreFoundation 0x31c94290 ___CFRunLoopDoTimer + 272
3 CoreFoundation 0x31c92f00 ___CFRunLoopRun + 1232
4 CoreFoundation 0x31c05ebc CFRunLoopRunSpecific + 351
5 CoreFoundation 0x31c05d48 CFRunLoopRunInMode + 103
6 GraphicsServices 0x357dc2ea GSEventRunModal + 71
7 UIKit 0x33b1b300 UIApplicationMain + 1119
8 21 0x00224e96 _main(main.m:27)
9 libdyld.dylib 0x39e13b20 _start
SEGV_ACCERR
We checked the corresponding logs, the crash just happened quite after app launched.
The code is a little complicated. Briefly, here just start a timer for net task when app not launched over.
(void)startTimeOutDetect{
execOnMainThread(^{
#synchronized(self){
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:#selector(handleSyncTimeOut) object:nil];
[self performSelector:#selector(handleSyncTimeOut) withObject:nil afterDelay:70.f];
}
});
}
(void)cancelTimeOutDetect{
execOnMainThread(^{
#synchronized(self){
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:#selector(handleSyncTimeOut) object:nil];
}
});
}
this is about an AngularJS app crashing Safari.The app crashes Safari on randomly on desktop and iPad. I understand that something is calling a non-existing record in memory. How can I trace that log to JavaScript / HTML / CSS actions?
Below is the output from Safari error report. I found that calls 22 and 44 in the thread that crashed look somewhat different than the others. I removed the reports for the threads that didn't crash. I also removed the thread state (it exceeded the character limit).
Process: WebProcess [44604]
Path: /System/Library/PrivateFrameworks/WebKit2.framework/WebProcess.app/Contents/MacOS/WebProcess
Identifier: com.apple.WebProcess
Version: 8536 (8536.30.1)
Build Info: WebKit2-7536030001000000~9
Code Type: X86-64 (Native)
Parent Process: ??? [1]
User ID: 502
Date/Time: 2014-10-07 11:20:38.251 +0100
OS Version: Mac OS X 10.8.5 (12F45)
Report Version: 10
Interval Since Last Report: 5675572 sec
Crashes Since Last Report: 18
Per-App Interval Since Last Report: 412893 sec
Per-App Crashes Since Last Report: 8
Anonymous UUID: [xxx removed]
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Regions Near 0:
-->
__TEXT 0000000100a14000-0000000100a15000 [ 4K] r-x/rwx SM=COW /System/Library/PrivateFrameworks/WebKit2.framework/WebProcess.app/Contents/MacOS/WebProcess
Application Specific Information:
Bundle controller class:
BrowserBundleController
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.WebCore 0x00007fff83c98a19 WebCore::Length::incrementCalculatedRef() const + 25
1 com.apple.WebCore 0x00007fff838ec186 bool compareEqual<WebCore::Length, WebCore::Length>(WebCore::Length const&, WebCore::Length const&) + 70
2 com.apple.WebCore 0x00007fff8339aa01 WebCore::RenderStyle::setPaddingLeft(WebCore::Length) + 33
3 com.apple.WebCore 0x00007fff8347242b WebCore::PropertyWrapper<WebCore::Length>::blend(WebCore::AnimationBase const*, WebCore::RenderStyle*, WebCore::RenderStyle const*, WebCore::RenderStyle const*, double) const + 155
4 com.apple.WebCore 0x00007fff83ef8b2b WebCore::CSSPropertyAnimation::blendProperties(WebCore::AnimationBase const*, WebCore::CSSPropertyID, WebCore::RenderStyle*, WebCore::RenderStyle const*, WebCore::RenderStyle const*, double) + 123
5 com.apple.WebCore 0x00007fff83473079 WebCore::ImplicitAnimation::animate(WebCore::CompositeAnimation*, WebCore::RenderObject*, WebCore::RenderStyle const*, WebCore::RenderStyle*, WTF::RefPtr<WebCore::RenderStyle>&) + 233
6 com.apple.WebCore 0x00007fff8346bfe0 WebCore::CompositeAnimation::animate(WebCore::RenderObject*, WebCore::RenderStyle*, WebCore::RenderStyle*) + 208
7 com.apple.WebCore 0x00007fff8333b7df WebCore::AnimationController::updateAnimations(WebCore::RenderObject*, WebCore::RenderStyle*) + 239
8 com.apple.WebCore 0x00007fff8333b6d0 WebCore::RenderObject::setAnimatableStyle(WTF::PassRefPtr<WebCore::RenderStyle>) + 144
9 com.apple.WebCore 0x00007fff83348d16 WebCore::Node::setRenderStyle(WTF::PassRefPtr<WebCore::RenderStyle>) + 38
10 com.apple.WebCore 0x00007fff83348606 WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 854
11 com.apple.WebCore 0x00007fff833489a2 WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 1778
12 com.apple.WebCore 0x00007fff833489a2 WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 1778
13 com.apple.WebCore 0x00007fff833489a2 WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 1778
14 com.apple.WebCore 0x00007fff8331805f WebCore::Document::recalcStyle(WebCore::Node::StyleChange) + 559
15 com.apple.WebCore 0x00007fff833420c3 WebCore::Document::updateStyleIfNeeded() + 67
16 com.apple.WebCore 0x00007fff8334dcb7 WebCore::Document::updateLayout() + 55
17 com.apple.WebCore 0x00007fff8334dc65 WebCore::Document::updateLayoutIgnorePendingStylesheets() + 133
18 com.apple.WebCore 0x00007fff838851d7 WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue(WebCore::CSSPropertyID, WebCore::EUpdateLayout) const + 71
19 com.apple.WebCore 0x00007fff83898a56 WebCore::CSSComputedStyleDeclaration::getPropertyCSSValueInternal(WebCore::CSSPropertyID) + 22
20 com.apple.WebCore 0x00007fff83b3400c WebCore::cssPropertyGetter(JSC::ExecState*, WebCore::JSCSSStyleDeclaration*, unsigned int) + 44
21 com.apple.JavaScriptCore 0x00007fff8ce06cbe cti_op_get_by_val + 942
22 ??? 0x0000000100ef9d7f 0 + 4310670719
23 com.apple.JavaScriptCore 0x00007fff8cde1d70 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 912
24 com.apple.JavaScriptCore 0x00007fff8cde19d4 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 52
25 com.apple.WebCore 0x00007fff83b240a1 WebCore::JSCallbackData::invokeCallback(JSC::JSValue, JSC::MarkedArgumentBuffer&, bool*) + 593
26 com.apple.WebCore 0x00007fff83be0383 WebCore::JSRequestAnimationFrameCallback::handleEvent(unsigned long long) + 275
27 com.apple.WebCore 0x00007fff83d8270b WebCore::ScriptedAnimationController::serviceScriptedAnimations(unsigned long long) + 203
28 com.apple.WebCore 0x00007fff838e1d9d WebCore::DisplayRefreshMonitor::notifyClients() + 93
29 com.apple.JavaScriptCore 0x00007fff8cdcba3a WTF::dispatchFunctionsFromMainThread() + 266
30 com.apple.Foundation 0x00007fff8939d5ca __NSThreadPerformPerform + 225
31 com.apple.CoreFoundation 0x00007fff8a882b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
32 com.apple.CoreFoundation 0x00007fff8a88251d __CFRunLoopDoSources0 + 445
33 com.apple.CoreFoundation 0x00007fff8a8a57f5 __CFRunLoopRun + 789
34 com.apple.CoreFoundation 0x00007fff8a8a50e2 CFRunLoopRunSpecific + 290
35 com.apple.HIToolbox 0x00007fff8c823eb4 RunCurrentEventLoopInMode + 209
36 com.apple.HIToolbox 0x00007fff8c823c52 ReceiveNextEventCommon + 356
37 com.apple.HIToolbox 0x00007fff8c823ae3 BlockUntilNextEventMatchingListInMode + 62
38 com.apple.AppKit 0x00007fff8d4ce533 _DPSNextEvent + 685
39 com.apple.AppKit 0x00007fff8d4cddf2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
40 com.apple.AppKit 0x00007fff8d4c51a3 -[NSApplication run] + 517
41 com.apple.WebCore 0x00007fff83d7a4ff WebCore::RunLoop::run() + 63
42 com.apple.WebKit2 0x00007fff89fe1462 WebKit::WebProcessMain(WebKit::CommandLine const&) + 2586
43 com.apple.WebKit2 0x00007fff89fa7bfd WebKitMain + 285
44 com.apple.WebProcess 0x0000000100a14e7b 0x100a14000 + 3707
45 libdyld.dylib 0x00007fff853717e1 start + 1
What version of Safari are you seeing this on? And does it happen with Dev tools open or closed?
Safari 7.0.1 is buggy, I'm betting upgrading to a later version will fix it.
See: https://github.com/angular/angularjs.org/issues/70
I am using NSException's callStackSymbol to log the stack trace of my crash and send it to my server.
I am getting this kind of stack trace from my release ipa file and/or the original released app on iTunes.
0 CoreFoundation 0x35d048a7 __exceptionPreprocess + 186
1 libobjc.A.dylib 0x33928259 objc_exception_throw + 32
2 CoreFoundation 0x35c591d7 -[__NSArrayM insertObject:atIndex:] + 186
3 MyApp 0x00125443 _mh_execute_header + 300099
4 Foundation 0x3512a933 __NSFireDelayedPerform + 414
5 CoreFoundation 0x35cd8a33 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
6 CoreFoundation 0x35cd8699 __CFRunLoopDoTimer + 364
7 CoreFoundation 0x35cd726f __CFRunLoopRun + 1206
8 CoreFoundation 0x35c5a4a5 CFRunLoopRunSpecific + 300
9 CoreFoundation 0x35c5a36d CFRunLoopRunInMode + 104
10 GraphicsServices 0x339f5439 GSEventRunModal + 136
11 UIKit 0x33432cd5 UIApplicationMain + 1080
12 MyApp 0x00124b07 _mh_execute_header + 297735
13 MyApp 0x000deaf0 _mh_execute_header + 10992
And I'm getting this on debug/release via Simulator (I was getting this kind of stack trace before supporting iOS 6.0):
0 CoreFoundation 0x35d048a7 __exceptionPreprocess + 186
1 libobjc.A.dylib 0x33928259 objc_exception_throw + 32
2 CoreFoundation 0x35c591d7 -[__NSArrayM insertObject:atIndex:] + 186
3 MyApp 0x00125443 [MyApp didAppLoad] + 300099
4 Foundation 0x3512a933 __NSFireDelayedPerform + 414
5 CoreFoundation 0x35cd8a33 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
6 CoreFoundation 0x35cd8699 __CFRunLoopDoTimer + 364
7 CoreFoundation 0x35cd726f __CFRunLoopRun + 1206
8 CoreFoundation 0x35c5a4a5 CFRunLoopRunSpecific + 300
9 CoreFoundation 0x35c5a36d CFRunLoopRunInMode + 104
10 GraphicsServices 0x339f5439 GSEventRunModal + 136
11 UIKit 0x33432cd5 UIApplicationMain + 1080
12 MyApp 0x00124b07 [MyApp appLoad] + 297735
13 MyApp 0x000deaf0 [MyApp start] + 10992
My question is, what should I do to make it symbolicated (do not offer me of using symbolicating tools because it was working on the previous releases and supporting iOS 6 using Xcode 4.5, it became like this, and it is not iTunes.crash file).
If there's any chance of getting the reason of the crash from iTunes.crash, can you teach me how to do it? I searched for about 6 hours and I still didn't find any clue.
Thanks in advance!
I must say I've been seeing that your support team is terrific, batting many, many problems successfully. Kudos on heroic support.
Here's my little one.
I installed everything by the book, and ran the code on my iPhone 5, firmware 6.0.1. It's giving the following error: ERROR Creating data store. Datastore for richnotification db is nil. Below is the log. Also below is the last exception backtrace.
-[XLappMgr registerForPush] [Line 325] Attempt to register for push notifications...
Reachability Flag Status: WR t------ networkStatusForFlags
Succeeded registering for push notifications. Device token: <left out for security purposes, but valid.>
ERROR Creating data store. Datastore for richnotification db is nil
Last Exception Backtrace:
0 CoreFoundation 0x3972a3e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x385b695e objc_exception_throw + 26
2 CoreFoundation 0x3972a302 +[NSException raise:format:] + 102
3 Foundation 0x39964f14 -[NSURL(NSURL) initFileURLWithPath:] + 72
4 Foundation 0x39964e3e +[NSURL(NSURL) fileURLWithPath:] + 38
5 Rabbit 0x00108acc -[XLDbMgr managedObjectModel] (XLDbMgr.m:74)
6 Rabbit 0x00108caa -[XLDbMgr createNewDatabase] (XLDbMgr.m:101)
7 Rabbit 0x00108b4c -[XLDbMgr persistentStoreCoordinator] (XLDbMgr.m:89)
8 Rabbit 0x001088f0 -[XLDbMgr managedObjectContext] (XLDbMgr.m:47)
9 Rabbit 0x0010883c +[XLDbMgr getDBMgr] (XLDbMgr.m:23)
10 Rabbit 0x000fba10 -[AppDetailsMgr init] (AppDetailsMgr.m:33)
11 Rabbit 0x000fb97c +[AppDetailsMgr get] (AppDetailsMgr.m:26)
12 Rabbit 0x00110fd2 -[XLServerMgr sendProviderDeviceToken] (XLServerMgr.m:94)
13 Rabbit 0x00110d0c -[XLServerMgr initWithReg:] (XLServerMgr.m:64)
14 Rabbit 0x001000d6 -[XLappMgr registerWithXtify:] (XLappMgr.m:118)
15 Rabbit 0x0008073e -[AppDelegate application:didRegisterForRemoteNotificationsWithDeviceToken:] (AppDelegate.m:54)
16 UIKit 0x38c5f7ee _UIXXRemoteNotificationRegistrationSucceeded + 146
17 UIKit 0x38c60278 _XRemoteNotificationRegistrationSucceeded + 112
18 AppSupport 0x36a9940c migHelperRecievePortCallout + 188
19 CoreFoundation 0x396ff3e2 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
20 CoreFoundation 0x396ff386 __CFRunLoopDoSource1 + 134
21 CoreFoundation 0x396fe20a __CFRunLoopRun + 1378
22 CoreFoundation 0x39671238 CFRunLoopRunSpecific + 352
23 CoreFoundation 0x396710c4 CFRunLoopRunInMode + 100
24 GraphicsServices 0x369aa336 GSEventRunModal + 70
25 UIKit 0x38a6128c UIApplicationMain + 1116
26 Rabbit 0x0008055a main (main.m:16)
27 Rabbit 0x000804fc start + 36
I did ANE for Adobe AIR App and I had to solve this problem for a long time, but finally I realized the reason: The resource files that are in the XtifyLib / XtifyPush.embeddedframework / XtifyPush.framework / Versions / A / Resources / must always be added to the project in my case, with ANE it should be in the folder iPhone-ARM, because ADT moves them to the top-level directory - it is there where it is necessary