My scenekit app got rejected from review, because of a crash. In the symbolicated crash logfile, I can see that it happens at MTLTextureDescriptorInternal validateWithDevice. The same version works in testflight on my devices.
Most of the SCNNodes just contain colors or images. I don't use shaders. There is one SKVideoNode with a mp4 file and one 3D-Object (SCNNode(MDLObject:obj) with .obj).
How can I fix this?
Or can it have something to do with the app size or IPV6, because the app is larger than 100MB and I only tested on WLAN?
Thanks!
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
...
Thread 0 name: Dispatch queue: com.apple.scenekit.renderingQueue.superoom.SuperoomV0x12736dda0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000018173411c __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000181800ef8 pthread_kill + 112
2 libsystem_c.dylib 0x00000001816a5dac abort + 140
3 libsystem_c.dylib 0x000000018167ae54 __assert_rtn + 284
4 Metal 0x0000000183cd133c MTLReportFailure + 480
5 Metal 0x0000000183cb6350 -[MTLTextureDescriptorInternal validateWithDevice:] + 584
6 AGXMetalG4G 0x0000000105167060 0x105148000 + 127072
7 SceneKit 0x00000001905c35f0 -[SCNMetalResourceManager _newTextureWithDescriptor:] + 52
8 SceneKit 0x00000001905c39f4 -[SCNMetalResourceManager _fillTexture:slice:image:textureImageType:needsMipMap:] + 668
9 SceneKit 0x00000001905c4120 -[SCNMetalResourceManager renderResourceForImage:sampler:] + 340
10 SceneKit 0x0000000190601d70 __41+[SCNRenderContextMetal registerBindings]_block_invoke_17 + 172
11 SceneKit 0x000000019060065c -[SCNRenderContextMetal _execute:] + 2928
12 SceneKit 0x0000000190600dc0 -[SCNRenderContextMetal drawRenderElement:withPass:] + 416
13 SceneKit 0x0000000190608658 C3DEnginePipelineRenderSubTree + 1140
14 SceneKit 0x00000001905d719c C3DEngineContextRenderNodeTree + 440
15 SceneKit 0x00000001906d7d88 _drawScene + 184
16 SceneKit 0x00000001906d5f5c __C3DEngineContextRenderPassInstance + 372
17 SceneKit 0x00000001906d7040 C3DEngineContextRenderMainTechnique + 1352
18 SceneKit 0x0000000190676d48 -[SCNRenderer _renderScene:sceneTime:] + 364
19 SceneKit 0x0000000190676e98 -[SCNRenderer _drawSceneWithNewRenderer:] + 264
20 SceneKit 0x0000000190677398 -[SCNRenderer _drawScene:] + 84
21 SceneKit 0x000000019067769c -[SCNRenderer _draw] + 636
22 SceneKit 0x00000001906d0a8c -[SCNView _drawAtTime:] + 464
23 libdispatch.dylib 0x00000001815e547c _dispatch_client_callout + 16
24 libdispatch.dylib 0x00000001815f0728 _dispatch_barrier_sync_f_invoke + 100
25 SceneKit 0x00000001906d2508 -[SCNView displayLayer:] + 96
26 QuartzCore 0x0000000184697508 CA::Layer::display() + 140
27 QuartzCore 0x00000001846797b0 CA::Layer::display_if_needed(CA::Transaction*) + 228
28 QuartzCore 0x000000018467949c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 44
29 QuartzCore 0x0000000184678ac0 CA::Context::commit_transaction(CA::Transaction*) + 252
30 QuartzCore 0x0000000184678820 CA::Transaction::commit() + 500
31 UIKit 0x0000000186ce25f8 _afterCACommitHandler + 180
32 CoreFoundation 0x0000000181b50728 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
33 CoreFoundation 0x0000000181b4e4cc __CFRunLoopDoObservers + 372
34 CoreFoundation 0x0000000181b4e8fc __CFRunLoopRun + 928
35 CoreFoundation 0x0000000181a78c50 CFRunLoopRunSpecific + 384
36 GraphicsServices 0x0000000183360088 GSEventRunModal + 180
37 UIKit 0x0000000186d5a088 UIApplicationMain + 204
38 superoom 0x0000000100013674 main (AppDelegate.swift:14)
39 libdyld.dylib 0x00000001816168b8 start + 4
Related
I have a crash on SceneKit reported by multiple users on Crashlytics. It happens on a lot of devices (iPhone SE, iPhone 12, iPhone 11 Pro Max...) on iOS 14. They seem to appear quite randomly.
The callstack only contains SceneKit calls.
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0068006b006a0099
Crashed: com.apple.main-thread
0 SceneKit 0x1dd1873a4 C3DAnimationManagerRemoveAnimationsForObject + 48
1 SceneKit 0x1dd33604c C3DEntityRemoveAllAnimations + 44
2 SceneKit 0x1dd335fe4 C3DEntityCFFinalize + 24
3 SceneKit 0x1dd180488 _C3DMeshSourceCFFinalize + 112
4 CoreFoundation 0x1a8952aac _CFRelease + 248
5 CoreFoundation 0x1a88afd88 -[__NSArrayM dealloc] + 192
6 SceneKit 0x1dd23df08 _C3DMeshCFFinalize + 84
7 CoreFoundation 0x1a8952aac _CFRelease + 248
8 SceneKit 0x1dd1c2a00 _C3DRendererElementFinalize + 96
9 SceneKit 0x1dd3c2c70 __C3DRendererElementStoreDeallocateSpan + 164
10 SceneKit 0x1dd3c2d88 C3DRendererElementStoreDeallocateSpanForNode + 64
11 SceneKit 0x1dd2439dc C3DSceneNodeWillBeRemovedOrHidden + 48
12 SceneKit 0x1dd239584 _C3DNodeWillRemoveFromScene + 36
13 SceneKit 0x1dd168440 C3DRemoveSceneRef + 160
14 SceneKit 0x1dd2394c8 _C3DNodeEnumerateSubEntities + 408
15 SceneKit 0x1dd16849c C3DRemoveSceneRef + 252
16 SceneKit 0x1dd2394c8 _C3DNodeEnumerateSubEntities + 408
17 SceneKit 0x1dd16849c C3DRemoveSceneRef + 252
18 SceneKit 0x1dd2394e0 _C3DNodeEnumerateSubEntities + 432
19 SceneKit 0x1dd16849c C3DRemoveSceneRef + 252
20 SceneKit 0x1dd2394e0 _C3DNodeEnumerateSubEntities + 432
21 SceneKit 0x1dd16849c C3DRemoveSceneRef + 252
22 SceneKit 0x1dd2449d4 _C3DSceneCFFinalize + 188
23 CoreFoundation 0x1a8952aac _CFRelease + 248
24 SceneKit 0x1dd374958 C3DTransactionFlush + 2112
25 CoreFoundation 0x1a894fc74 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
26 CoreFoundation 0x1a8949d98 __CFRunLoopDoObservers + 572
27 CoreFoundation 0x1a894a344 __CFRunLoopRun + 1052
28 CoreFoundation 0x1a89499f4 CFRunLoopRunSpecific + 600
29 GraphicsServices 0x1c001a734 GSEventRunModal + 164
30 UIKitCore 0x1ab3c775c -[UIApplication _run] + 1072
31 UIKitCore 0x1ab3ccfcc UIApplicationMain + 168
32 TagHeuerGolf 0x100084cac main + 27 (main.swift:27)
33 libdyld.dylib 0x1a8605cf8 start + 4
Does someone have the same crashes? If so, did you find a solution to fix it?
I was trying to redo my LaunchScreen.storyboard so I deleted it and created a new LaunchScreen via File(in the toolbar) > New > New File > Launch Screen and then I started getting this problem. I've already checked my IBOutlet connections. I deleted the new LaunchScreen.storyboard in hopes of solving it but it still can't transition to my GameScene. I use SpriteKit and UICollectionView for my game.
Debug Navigator Screenshot
AppDelegate SIGABRT Screenshot
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) e Thread.callStackSymbols.forEach{print($0)}
0 ??? 0x00000001062343cc 0x0 + 4397941708
1 Billionaire City 0x00000001006e23b8 main + 0
2 libsystem_c.dylib 0x00000001c28f7ea8 abort + 140
3 libc++abi.dylib 0x00000001c1fc4788 __cxa_bad_cast + 0
4 libc++abi.dylib 0x00000001c1fc4934 <redacted> + 0
5 libobjc.A.dylib 0x00000001c1fdbe00 <redacted> + 124
6 libc++abi.dylib 0x00000001c1fd0838 <redacted> + 16
7 libc++abi.dylib 0x00000001c1fd01a8 __cxa_get_exception_ptr + 0
8 libc++abi.dylib 0x00000001c1fd0168 <redacted> + 0
9 libobjc.A.dylib 0x00000001c1fdbb3c <redacted> + 0
10 CoreFoundation 0x00000001c2d1d278 <redacted> + 0
11 CoreFoundation 0x00000001c2e05d60 <redacted> + 1408
12 CoreFoundation 0x00000001c2e079fc _CF_forwarding_prep_0 + 92
13 CoreText 0x00000001c6a178d0 <redacted> + 92
14 UIFoundation 0x00000001cd3edf78 <redacted> + 120
15 CoreText 0x00000001c6a1707c <redacted> + 84
16 CoreText 0x00000001c6a169d0 <redacted> + 92
17 CoreText 0x00000001c6a16834 <redacted> + 104
18 CoreText 0x00000001c69c660c <redacted> + 216
19 CoreText 0x00000001c69c651c <redacted> + 160
20 CoreText 0x00000001c69c1da4 CTTypesetterCreateWithAttributedString + 60
21 SpriteKit 0x00000001d98f1c04 _ZN12SKCLabelNode11rebuildTextEv + 1064
22 libdispatch.dylib 0x00000001019f8c74 _dispatch_client_callout + 16
23 libdispatch.dylib 0x0000000101a07480 _dispatch_lane_barrier_sync_invoke_and_complete + 124
24 SpriteKit 0x00000001d98f1230 _ZN12SKCLabelNode21addRenderableChildrenEP13SKCRenderInfoPNSt3__16vectorIP7SKCNodeNS2_9allocatorIS5_EEEE + 92
25 SpriteKit 0x00000001d99aed90 _ZN11SKCRenderer18doBuildRenderGroupEP7SKCNode14SKCRenderState13simd_float4x4 + 372
26 SpriteKit 0x00000001d99aefb8 _ZN11SKCRenderer18doBuildRenderGroupEP7SKCNode14SKCRenderState13simd_float4x4 + 924
27 SpriteKit 0x00000001d99aefb8 _ZN11SKCRenderer18doBuildRenderGroupEP7SKCNode14SKCRenderState13simd_float4x4 + 924
28 SpriteKit 0x00000001d99ae2fc _ZN11SKCRenderer16buildRenderGroupERKNSt3__110shared_ptrI18SKCRenderSortGroupEE + 940
29 SpriteKit 0x00000001d99ab608 _ZN11SKCRenderer15buildRenderPassERKNSt3__110shared_ptrI13SKCRenderPassEE + 96
30 SpriteKit 0x00000001d99aaea0 _ZN11SKCRenderer6renderEP7SKCNodeDv4_fRKNSt3__110shared_ptrI15jet_framebufferEEDv4_j13simd_float4x4bP12NSDictionaryP8SKCStatsSE_d + 1628
31 SpriteKit 0x00000001d9928c80 <redacted> + 664
32 SpriteKit 0x00000001d9928958 <redacted> + 252
33 SpriteKit 0x00000001d992cbec <redacted> + 184
34 UIKitCore 0x00000001ef7cbe54 <redacted> + 1292
35 QuartzCore 0x00000001c728e1f0 <redacted> + 184
36 QuartzCore 0x00000001c7293198 <redacted> + 332
37 QuartzCore 0x00000001c71f60a8 <redacted> + 348
38 QuartzCore 0x00000001c7224108 <redacted> + 640
39 UIKitCore 0x00000001ef35c534 <redacted> + 124
40 CoreFoundation 0x00000001c2d9210c <redacted> + 20
41 CoreFoundation 0x00000001c2d91a10 <redacted> + 272
42 CoreFoundation 0x00000001c2d8ca74 <redacted> + 1024
43 CoreFoundation 0x00000001c2d8c354 CFRunLoopRunSpecific + 436
44 GraphicsServices 0x00000001c4f8c79c GSEventRunModal + 104
45 UIKitCore 0x00000001ef343b68 UIApplicationMain + 212
46 Billionaire City 0x00000001006e2404 main + 76
47 libdyld.dylib 0x00000001c28528e0 <redacted> + 4
(lldb)
It is preferable for an application to run with a LaunchScreen.
In order to fix your problem, try adding a new LaunchScreen, then head to Project Settings - General and from the Launch Screen File drop down menu select your new LaunchScreen.
You can also run it without a LaunchScreen. Delete the LaunchScreen from project in Xcode and Finder, then head to Project Settings - General and from the Launch Screen File drop down menu select scene-name (Main).
Apparently an App I submitted for review crashed twice on an iPad, with the following issue highlighted. I'm having trouble deciphering anything usable from this, if anyone's able to shed some light on this I'd appreciate it. I've attempted to replicate the issue using the simulator's but I've been unsuccessful. I don't understand how this could work on an iPhone, whilst testing, but not on the iPad.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000195a8f270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000195b2d224 pthread_kill + 108
2 libsystem_c.dylib 0x0000000195a06b14 abort + 108
3 Christmas 0x0000000100101b90 0x1000f4000 + 56208
4 Christmas 0x0000000100101744 0x1000f4000 + 55108
5 Christmas 0x00000001000ff504 0x1000f4000 + 46340
6 Christmas 0x00000001000ff218 0x1000f4000 + 45592
7 Christmas 0x0000000100135088 0x1000f4000 + 266376
8 UIKit 0x0000000188f6be3c -[UIViewController _setViewAppearState:isAnimating:] + 512
9 UIKit 0x00000001890099bc -[UINavigationController _startTransition:fromViewController:toViewController:] + 796
10 UIKit 0x00000001890093b8 -[UINavigationController _startDeferredTransitionIfNeeded:] + 636
11 UIKit 0x00000001890090d8 -[UINavigationController __viewWillLayoutSubviews] + 52
12 UIKit 0x0000000189009058 -[UILayoutContainerView layoutSubviews] + 196
13 UIKit 0x0000000188f51a28 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 568
14 QuartzCore 0x00000001888a9990 -[CALayer layoutSublayers] + 164
15 QuartzCore 0x00000001888a4560 CA::Layer::layout_if_needed(CA::Transaction*) + 316
16 QuartzCore 0x00000001888a4404 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 28
17 QuartzCore 0x00000001888a3c04 CA::Context::commit_transaction(CA::Transaction*) + 272
18 QuartzCore 0x00000001888a3988 CA::Transaction::commit() + 432
19 UIKit 0x0000000188f489fc _afterCACommitHandler + 152
20 CoreFoundation 0x000000018475e148 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28
21 CoreFoundation 0x000000018475b0d4 __CFRunLoopDoObservers + 356
22 CoreFoundation 0x000000018475b4b4 __CFRunLoopRun + 832
23 CoreFoundation 0x00000001846891f0 CFRunLoopRunSpecific + 392
24 GraphicsServices 0x000000018d7eb5a0 GSEventRunModal + 164
25 UIKit 0x0000000188fba780 UIApplicationMain + 1484
26 Christmas 0x0000000100103914 0x1000f4000 + 63764
27 libdyld.dylib 0x0000000195976a04 start + 0
I have only a little knowledge on how to read the crash reason in device logs. Please give me some clue on where should I start to look at in my app. It crashed the minute I clicked on a button when I open the app. I only got this error when I unplugged the device. I cannot reproduce the device if I try to build with my phone via Xcode.
Thank you.
OS Version: iOS 7.0.5 (11B601)
Report Version: 104
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 1
Thread 0:
0 libobjc.A.dylib 0x3a45bb66 objc_msgSend + 6
1 CoreFoundation 0x3003ec4a -[__NSDictionaryM setObject:forKey:] + 178
2 UIKit 0x32b157a4 -[NSString(UIStringDrawingLegacy) _legacy_drawInRect:withFont:lineBreakMode:alignment:lineSpacing:includeEmoji:truncationRect:] + 456
3 UIKit 0x32b155c8 -[NSString(UIStringDrawingLegacy) _legacy_drawInRect:withFont:lineBreakMode:alignment:lineSpacing:includeEmoji:] + 72
4 UIKit 0x32b15512 -[NSString(UIStringDrawingLegacy) _legacy_drawInRect:withFont:lineBreakMode:alignment:] + 70
5 UIKit 0x32b14f9e -[NSString(UIStringDrawing) drawInRect:withFont:lineBreakMode:alignment:] + 54
6 ST iPhone Standalone AppStore 0x001fc4a4 -[ArticleTableViewCell_CG drawContentView:] (ArticleTableViewCell_CG.m:178)
7 ST iPhone Standalone AppStore 0x001f9a7c -[ABTableViewCellView drawRect:] (ABTableViewCell.m:43)
8 UIKit 0x32907dd4 -[UIView(CALayerDelegate) drawLayer:inContext:] + 368
9 QuartzCore 0x3253da74 -[CALayer drawInContext:] + 96
10 QuartzCore 0x32527240 CABackingStoreUpdate_ + 1856
11 QuartzCore 0x326012e8 ___ZN2CA5Layer8display_Ev_block_invoke + 48
12 QuartzCore 0x32526af0 x_blame_allocations + 80
13 QuartzCore 0x325267a2 CA::Layer::display_() + 1114
14 QuartzCore 0x3250a364 CA::Layer::display_if_needed(CA::Transaction*) + 204
15 QuartzCore 0x32509ffc CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 20
16 QuartzCore 0x32509a08 CA::Context::commit_transaction(CA::Transaction*) + 224
17 QuartzCore 0x3250981a CA::Transaction::commit() + 310
18 QuartzCore 0x32503548 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 52
19 CoreFoundation 0x300cef66 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
20 CoreFoundation 0x300cc8f2 __CFRunLoopDoObservers + 282
21 CoreFoundation 0x300ccc3e __CFRunLoopRun + 734
22 CoreFoundation 0x3003746c CFRunLoopRunSpecific + 520
23 CoreFoundation 0x3003724e CFRunLoopRunInMode + 102
24 GraphicsServices 0x34d712e6 GSEventRunModal + 134
25 UIKit 0x328ec840 UIApplicationMain + 1132
26 ST iPhone Standalone AppStore 0x000597cc main (main.m:14)
27 ST iPhone Standalone AppStore 0x00059764 start + 36
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x3a9fd838 kevent64 + 24
1 libdispatch.dylib 0x3a94c0d0 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3a94661e _dispatch_mgr_thread + 34
My app started crashing after long time in background right when I launch it again.
The problem of course is when it wasn't killed - only when it was in the background.
the log is:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x32858a1c __pthread_kill + 8
1 libsystem_c.dylib 0x337013b4 pthread_kill + 52
2 libsystem_c.dylib 0x336f9bf8 abort + 72
3 libstdc++.6.dylib 0x30504a64 __gnu_cxx::__verbose_terminate_handler() + 376
4 libobjc.A.dylib 0x3068f06c _objc_terminate + 104
5 libstdc++.6.dylib 0x30502e36 __cxxabiv1::__terminate(void (*)()) + 46
6 libstdc++.6.dylib 0x30502e8a std::terminate() + 10
7 libstdc++.6.dylib 0x30502f5a __cxa_throw + 78
8 libobjc.A.dylib 0x3068dc84 objc_exception_throw + 64
9 CoreFoundation 0x3351048a +[NSException raise:format:arguments:] + 62
10 Foundation 0x326ea56c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 56
11 UIKit 0x31bc3a82 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 666
12 UIKit 0x31bc3764 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 28
13 UIKit 0x31bbc0c6 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 930
14 UIKit 0x31bbb276 -[UITableView layoutSubviews] + 134
15 UIKit 0x31b675f4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 20
16 CoreFoundation 0x3347defc -[NSObject(NSObject) performSelector:withObject:] + 16
17 QuartzCore 0x33351bae -[CALayer layoutSublayers] + 114
18 QuartzCore 0x33351966 CALayerLayoutIfNeeded + 178
19 QuartzCore 0x333571be CA::Context::commit_transaction(CA::Transaction*) + 206
20 QuartzCore 0x33356fd0 CA::Transaction::commit() + 184
21 QuartzCore 0x3335004e CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 50
22 CoreFoundation 0x334e7a2e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 10
23 CoreFoundation 0x334e945e __CFRunLoopDoObservers + 406
24 CoreFoundation 0x334ea754 __CFRunLoopRun + 848
25 CoreFoundation 0x3347aebc CFRunLoopRunSpecific + 224
26 CoreFoundation 0x3347adc4 CFRunLoopRunInMode + 52
27 GraphicsServices 0x311a5418 GSEventRunModal + 108
28 GraphicsServices 0x311a54c4 GSEventRun + 56
29 UIKit 0x31b90d62 -[UIApplication _run] + 398
30 UIKit 0x31b8e800 UIApplicationMain + 664
31 Vento 0x00002c64 main (main.m:14)
32 Vento 0x00002c0c start + 32
Any idea where to start digging?
Thank you!
Look at the log to see the exception detail.
Run the static code analyzer over your code. It may find the bug for you.