Unity Game crashing on some devices - ios

In my testing, the game works good on my android 5.1 and ios 10.3.2 (iPhone 6S) devices.
But on my Apple reviewer's iPad Air 2 and iPhone 7 Plus, I get crash on game launch. I got the crashlogs and did symbolicate them, the crash log is:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000018ad39014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000018ae03264 pthread_kill + 112
2 libsystem_c.dylib 0x000000018acad9c4 abort + 140
3 truck 0x000000010059afc0 _GLOBAL__I_a (VerifyiPhoneSplashScreen.cpp:0)
4 truck 0x000000010059a2f4 VerifyiPhoneSplashScreen(std::string const&) (basic_string.h:238)
5 truck 0x00000001005788a8 UnityInitApplicationNoGraphics (basic_string.h:280)
6 truck 0x000000010003f718 -[UnityAppController application:didFinishLaunchingWithOptions:] (UnityAppController.mm:226)
7 UIKit 0x0000000191eda204 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 380
8 UIKit 0x00000001920e6738 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3452
9 UIKit 0x00000001920ec1e0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1684
10 UIKit 0x0000000192100d18 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3151 + 48
11 UIKit 0x00000001920e9474 -[UIApplication workspaceDidEndTransaction:] + 168
12 FrontBoardServices 0x000000018d8e7884 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
13 FrontBoardServices 0x000000018d8e76f0 -[FBSSerialQueue _performNext] + 176
14 FrontBoardServices 0x000000018d8e7aa0 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
15 CoreFoundation 0x000000018bced42c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
16 CoreFoundation 0x000000018bcecd9c __CFRunLoopDoSources0 + 540
17 CoreFoundation 0x000000018bcea9a8 __CFRunLoopRun + 744
18 CoreFoundation 0x000000018bc1ada4 CFRunLoopRunSpecific + 424
19 UIKit 0x0000000191ed3384 -[UIApplication _run] + 652
20 UIKit 0x0000000191ece058 UIApplicationMain + 208
21 truck 0x00000001000322b4 main (main.mm:39)
22 libdyld.dylib 0x000000018ac2959c start + 4
Please see and let me know if any way to find out the root cause of crash. To me it looks like game doesn't go beyond the splash screen but what is the cause of it not failing on my end.

Related

How can I fix a EXC_BAD_ACCESS crash in QuartzCore CALayerGetLayer, on iOS 9.3.1?

I'm looking into a crash report in Fabric, and I have no idea what might have caused it. The stack trace is not particularly helpful, however it looks the app was preparing to be suspended in the background. Here is the crash message:
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x444444444444445
Here's the stack trace:
Crashed: com.apple.main-thread
0 QuartzCore 0x18680fdf0 CALayerGetLayer + 12
1 QuartzCore 0x186810540 CA::Context::invalidate() + 68
2 QuartzCore 0x1868104cc -[CAContextImpl dealloc] + 64
3 UIKit 0x188f04bc4 -[UIWindow _destroyContext] + 324
4 UIKit 0x188f049e4 +[UIWindow _prepareWindowsForAppSuspend] + 172
5 UIKit 0x188f0491c -[UIApplication _destroyContextsAndNotifySpringBoard] + 28
6 UIKit 0x189124244 __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke_2 + 240
7 UIKit 0x1891280f0 __65-[UIApplication _performSnapshotsWithAction:forScene:completion:]_block_invoke2283 + 148
8 FrontBoardServices 0x1856c9fc0 -[FBSSceneSnapshotAction _finishAllRequests] + 80
9 FrontBoardServices 0x1856c9d38 -[FBSSceneSnapshotAction executeRequestsWithHandler:completionHandler:expirationHandler:] + 224
10 UIKit 0x189127ee0 __65-[UIApplication _performSnapshotsWithAction:forScene:completion:]_block_invoke + 272
11 UIKit 0x1891274e0 -[UIApplication _beginSnapshotSessionForScene:withSnapshotBlock:] + 900
12 UIKit 0x189127d7c -[UIApplication _performSnapshotsWithAction:forScene:completion:] + 560
13 UIKit 0x189127ad0 -[UIApplication _handleSnapshotAction:forScene:completion:] + 156
14 UIKit 0x1891243dc __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke2031 + 272
15 UIKit 0x189123ffc __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke2017 + 1040
16 UIKit 0x189126fd8 _runAfterCACommitDeferredBlocks + 292
17 UIKit 0x189134990 _cleanUpAfterCAFlushAndRunDeferredBlocks + 92
18 UIKit 0x188e664a4 _afterCACommitHandler + 96
19 CoreFoundation 0x183ce07b0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
20 CoreFoundation 0x183cde554 __CFRunLoopDoObservers + 372
21 CoreFoundation 0x183cde984 __CFRunLoopRun + 928
22 CoreFoundation 0x183c08d10 CFRunLoopRunSpecific + 384
23 GraphicsServices 0x1854f0088 GSEventRunModal + 180
24 UIKit 0x188eddf70 UIApplicationMain + 204
25 HDWR 0x1000706dc main (AppDelegate.swift:37)
26 libdispatch.dylib 0x1837a68b8 (Missing)
Any idea how I can get to the bottom of this?
Does this seem like it might be a bug in UIKit or QuartzCore, or is it more likely to be a bug in our own code?
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x444444444444445
i think you are using nil object which is not insalized

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x000000008346beb8

I get the following crash log from Crashlytics for my app. My code do not call msgpack_zone_free or msgpack parse method at all and so I'm confused how that happened. I'm unable to reproduce this crash myself so I'm left to analyze the issue from the crash report itself. Any pointers to what I need to check will be very helpful.
This is not a case of low memory as I see free memory from Crashlytics.
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x0000000192953bd0 objc_msgSend + 16
1 CoreFoundation 0x00000001820d5228 CFRelease + 524
2 CoreFoundation 0x00000001821e62ac -[__NSArrayM removeAllObjects] + 284
3 MyApp 0x00000001004a69e0 msgpack_zone_free
4 MyApp 0x00000001004a4afc msgpack_zone_free
5 CoreFoundation 0x000000018219cae4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
6 CoreFoundation 0x00000001820db220 _CFXNotificationPost + 2060
7 Foundation 0x0000000182fdac60 -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
8 UIKit 0x0000000186c32e98 -[UIApplication _handleApplicationDectivationWithScene:shouldForceExit:transitionContext:completion:] + 1132
9 UIKit 0x0000000186c3b370 __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 92
10 UIKit 0x0000000186c3b2f8 -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 380
11 UIKit 0x0000000186c2ec2c -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 512
12 FrontBoardServices 0x000000018a45d62c __31-[FBSSerialQueue performAsync:]_block_invoke + 28
13 CoreFoundation 0x00000001821aea28 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
14 CoreFoundation 0x00000001821adb30 __CFRunLoopDoBlocks + 312
15 CoreFoundation 0x00000001821ac154 __CFRunLoopRun + 1756
16 CoreFoundation 0x00000001820d90a4 CFRunLoopRunSpecific + 396
17 GraphicsServices 0x000000018b2735a4 GSEventRunModal + 168
18 UIKit 0x0000000186a0aaa4 UIApplicationMain + 1488
19 MyApp 0x00000001000cce40 main (main.m:16)
20 libdyld.dylib 0x0000000192faea08 start + 4
Thanks.

iOS App Crash in unknown module-mdDoRequest mdlExchange mdlRemoteExec

The crash tools report a weird crash of my app.
It crashed at MDOSWebViewDelegate.
After listed all the symbols of binary with command nm -a myApp,
and still can't locate it from the crash stack.
I don't even know what features of these modules, it seems this module is from an System framework.
(mdDoRequest mdlExchange mdlRemoteExec)
Following is the crash stack.
crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x6e2e6483
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x37305f46 objc_msgSend + 5
1 MyApp 0x00d59ca3 mdDoRequest (MDOSWebViewDelegate.m:129)
2 MyApp 0x00d5dafb mdlExchange (lang.c:57)
3 MyApp 0x00d5df4f mdlRemoteExec (lang.c:110)
4 MyApp 0x00d592e5 forwardInvocation (MDOSProxy.m:213)
5 CoreFoundation 0x2943d62f ___forwarding___ + 354
6 CoreFoundation 0x2936f008 _CF_forwarding_prep_0 + 24
7 CoreFoundation 0x293f2e31 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
8 CoreFoundation 0x2934e6cd _CFXNotificationPost + 1784
9 Foundation 0x2a0a4dd9 -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
10 UIKit 0x2cbbba65 -[UIApplication _handleApplicationDectivationWithScene:shouldForceExit:transitionContext:completion:] + 980
11 UIKit 0x2cbc2d8d __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 76
12 UIKit 0x2cbc2d39 -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 360
13 UIKit 0x2cbb7ef3 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 478
14 FrontBoardServices 0x2fd83169 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke_2 + 40
15 FrontBoardServices 0x2fd920a9 __31-[FBSSerialQueue performAsync:]_block_invoke + 12
16 CoreFoundation 0x29400fe5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
17 CoreFoundation 0x294002a9 __CFRunLoopDoBlocks + 216
18 CoreFoundation 0x293fede3 __CFRunLoopRun + 1714
19 CoreFoundation 0x2934c3b1 CFRunLoopRunSpecific + 476
20 CoreFoundation 0x2934c1c3 CFRunLoopRunInMode + 106
21 GraphicsServices 0x30939201 GSEventRunModal + 136
22 UIKit 0x2c9b643d UIApplicationMain + 1440
23 MyApp 0x0003696f main (main.m:19)
Any suggestion?

iAd Crash Report

I am seeing the following crash log in Crashlytics with an iOS app. It is certainly infrequent, and I have been unable to replicate, but it is very annoying.
Anyone able to suggest what this is likely linked to?
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x000000019548c0b4 objc_retain + 20
1 libsystem_blocks.dylib 0x0000000195b0dbf8 _Block_object_assign + 320
2 libsystem_blocks.dylib 0x0000000195b0d738 _Block_copy_internal + 384
3 UIKit 0x0000000189b49988 +[_UIAsyncInvocation invocationWithBlock:] + 84
4 UIKit 0x0000000189b2e378 +[_UIRemoteViewControllerConnectionRequest __requestRemoteViewController:service:fromServiceWithBundleIdentifier:serializedAppearanceCustomizations:legacyAppearance:exportedHostingObject:serviceViewControllerDeputyInterface:connectionHandler:] + 1320
5 UIKit 0x0000000189b2e7a8 +[_UIRemoteViewControllerConnectionRequest requestViewController:fromServiceWithBundleIdentifier:serializedAppearanceCustomizations:legacyAppearance:exportedHostingObject:serviceViewControllerDeputyInterface:connectionHandler:] + 72
6 UIKit 0x0000000189b30b00 +[_UIRemoteViewController _requestViewController:traitCollection:fromServiceWithBundleIdentifier:service:connectionHandler:] + 528
7 iAd 0x000000018a12c130 +[ADAdSpaceRemoteViewController adSpaceRemoteViewControllerWithCompletionHandler:] + 96
8 iAd 0x000000018a126908 -[ADAdSpace _requestServiceAdSpace] + 228
9 iAd 0x000000018a1264ac __30-[ADAdSpace initForRecipient:]_block_invoke + 36
10 libdispatch.dylib 0x0000000195ab93ac _dispatch_call_block_and_release + 24
11 libdispatch.dylib 0x0000000195ab936c _dispatch_client_callout + 16
12 libdispatch.dylib 0x0000000195abd980 _dispatch_main_queue_callback_4CF + 932
13 CoreFoundation 0x0000000184cd5fa4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
14 CoreFoundation 0x0000000184cd404c __CFRunLoopRun + 1492
15 CoreFoundation 0x0000000184c010a4 CFRunLoopRunSpecific + 396
16 GraphicsServices 0x000000018dda35a4 GSEventRunModal + 168
17 UIKit 0x00000001895363c0 UIApplicationMain + 1488
18 xxxxxxxx 0x00000001000d6380 main (main.m:16)
19 libdyld.dylib 0x0000000195ae2a08 start + 4

iOS - Determining the cause of a crash (from a crash report) in _WebTryThreadLock

I have been trying to figure out what is causing one of the top crashes in my iOS application. It looks like there is some layout happening on a background thread which is causing it to crash. Is there any way to determine what I might be doing that is triggering this relayout? I assume from the stack that it is related to a UIWebView when my app is being brought back into the foreground.
Other stackoverflow threads on the topic seem to mention things like triggering a table reload on a background thread. As far as I can see all the webView delegate methods get called on the main thread. Is there some case where this is not true or are there some other methods which get called on a background thread and I'm just not aware?
Web Thread - Crashed.
0 WebCore _WebTryThreadLock(bool) + 297
1 WebCore _WebTryThreadLock(bool) + 288
2 WebCore WebThreadLock + 66
3 UIKit -[UIWebDocumentView(UIWebDocumentViewTextSelecting) selectionBaseWritingDirection] + 10
4 UIKit -[UITextField _currentTextAlignment] + 86
5 UIKit -[UITextField _showsClearButtonWhenNonEmpty:] + 58
6 UIKit -[UITextField _textRectForBounds:forEditing:] + 678
7 UIKit -[UITextField editingRectForBounds:] + 52
8 UIKit -[UITextField editRect] + 70
9 UIKit -[UITextField layoutSubviews] + 1320
10 UIKit -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 258
11 QuartzCore -[CALayer layoutSublayers] + 214
12 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*) + 460
13 QuartzCore CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16
14 QuartzCore CA::Context::commit_transaction(CA::Transaction*) + 238
15 QuartzCore CA::Transaction::commit() + 316
16 QuartzCore CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 60
17 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
18 CoreFoundation __CFRunLoopDoObservers + 276
19 CoreFoundation CFRunLoopRunSpecific + 394
20 CoreFoundation CFRunLoopRunInMode + 104
21 WebCore RunWebThread(void*) + 444
22 libsystem_c.dylib pthread_start + 308
Main - Thread
0 libsystem_kernel.dylib __psynch_mutexwait + 24
1 libsystem_c.dylib pthread_mutex_lock + 392
2 WebCore _WebTryThreadLock(bool) + 336
3 WebCore WebThreadLock + 66
4 WebKit -[WebDatabasePauser applicationWillEnterForeground] + 16
5 CoreFoundation _CFXNotificationPost + 1426
6 Foundation -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
7 UIKit -[UIApplication _sendWillEnterForegroundCallbacks] + 154
8 UIKit -[UIApplication _handleApplicationResumeEvent:] + 1094
9 UIKit -[UIApplication handleEvent:withNewEvent:] + 1292
10 UIKit -[UIApplication sendEvent:] + 72
11 UIKit _UIApplicationHandleEvent + 6154
12 GraphicsServices _PurpleEventCallback + 590
13 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
14 CoreFoundation __CFRunLoopDoSources0 + 212
15 CoreFoundation __CFRunLoopRun + 646
16 CoreFoundation CFRunLoopRunSpecific + 356
17 CoreFoundation CFRunLoopRunInMode + 104
18 GraphicsServices GSEventRunModal + 74
19 UIKit UIApplicationMain + 1120
20 AppName main.m line 23
It seems you are updating UI on the background thread, in your code add this line wherever you are updating your UI and you are fetching data on the background thread:
dispatch_async(dispatch_get_main_queue(), ^{
// Update data here
});
As soon as you, rather code feels that data is there on device and it's time to update the UI corresponding to new data then try and bring back main thread in action.
Hope it helps.

Resources