ARKIt based app crashes on com.apple.scenekit.scnview-renderer

While showing arifacts my app crashes abruptedly on:

com.apple.scenekit.scnview-renderer (21): EXC_BAD_ACCESS (code=1, address=0xed0a7ac80)

while I run it from Xcode.

No crash is instead produced when running the app by itself.

I tried not inserting or deleting nodes while Scenekit was rendering by means of a lock, but that changed nothing.

I also submitted a ticket to Apple.


Anyone else experiences it and has some solution?

Replies

Same here.

Same here. It sometimes works and sometimes crashes.

Using just Scenekit with many own Metal shaders and SCNTechnique and I also get sometimes crashes, which are not related to a special action of the app. But for me it seems to be less stable since I added my own SCNTechnique to support multiple render layers. However, Apple is also using this technique for many effects internally. Seems to come from this direction....

  • Hey @JuergenT I'm noticing the same crashes when using SCNTechnique and Metal shaders. Did you ever find a solution?

Add a Comment

I'm also getting a similar error, a fairly regular crash in Xcode, but fine when not running through Xcode, crashes using a SCNTechnique

0x00000001a74fc9c0 in objc_msgSend ()
0x00000001bbf441e8 in -[MTLRenderPipelineDescriptorInternal setFragmentFunction:] ()
0x00000001bc46ebec in _pipelineDescriptorForPipelineDesc ()
0x00000001bc46f958 in __69-[SCNMTLResourceManager(Compilation) newRenderPipelineStateWithDesc:]_block_invoke ()
0x00000001bc46f71c in -[SCNMTLResourceManager(Compilation) newRenderPipelineStateWithDesc:] ()
0x00000001bc46ea30 in -[SCNMTLResourceManager(Compilation) renderResourceForProgramDesc:renderPassDescriptor:] ()
0x00000001bc296dc4 in _execute(SCNMTLRenderContext*, DrawCommand) ()
0x00000001bc29bd80 in -[SCNMTLRenderContext drawFullScreenQuadForPass:] ()
0x00000001bc2c2db8 in C3D::DrawQuadPass::execute(C3D::RenderArgs const&) ()
0x00000001bc24dfe4 in C3D::__renderSlice(C3D::RenderGraph*, C3D::RenderPass*, unsigned short&, C3D::RenderGraph::GraphNode const&, C3D::RenderGraph::Stage*&, C3D::RenderArgs, bool, id<MTLCommandBuffer>&) ()
0x00000001bc24f91c in C3D::RenderGraph::execute() ()
0x00000001bc34f228 in -[SCNRenderer _renderSceneWithEngineContext:sceneTime:] ()
0x00000001bc34fa98 in -[SCNRenderer _drawSceneWithNewRenderer:] ()
0x00000001bc350028 in -[SCNRenderer _drawScene:] ()
0x00000001bc3503f8 in -[SCNRenderer _drawAtTime:] ()
0x00000001bc3eec7c in -[SCNView _drawAtTime:] ()
0x00000001c3ebc09c in -[ARSCNView _drawAtTime:] ()
0x00000001bc2ac2d8 in __69-[NSObject(SCN_DisplayLinkExtensions) SCN_setupDisplayLinkWithQueue:]_block_invoke ()
0x00000001bc3b8dc4 in __36-[SCNDisplayLink _callbackWithTime:]_block_invoke ()
0x0000000108f8b18c in _dispatch_client_callout ()
0x0000000108f9ac34 in _dispatch_lane_barrier_sync_invoke_and_complete ()
0x00000001bc3b8d48 in -[SCNDisplayLink _callbackWithTime:] ()
0x000000010916c114 in -[DYDisplayLinkInterposer forwardDisplayLinkCallback:] ()
0x00000001ae30f354 in CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) ()
0x00000001ae3df1a4 in display_timer_callback(__CFMachPort*, void*, long, void*) ()
0x00000001a773d584 in __CFMachPortPerform ()
0x00000001a7767f44 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
0x00000001a77675e8 in __CFRunLoopDoSource1 ()
0x00000001a77620e0 in __CFRunLoopRun ()
0x00000001a7761660 in CFRunLoopRunSpecific ()
0x00000001a7aab6a8 in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
0x00000001bc2ac6e0 in __71-[SCNView(SCNDisplayLink) _initializeDisplayLinkWithCompletionHandler:]_block_invoke ()
0x00000001bc2ac968 in __SCNRenderThread_start__ ()
0x00000001a74f18fc in _pthread_start ()

with a crash on line 10 here:


com.apple.scenekit.scnview-renderer (17): EXC_BAD_ACCESS (code=1, address=0x0)


libobjc.A.dylib`objc_msgSend:
    0x1a74fc9a0 <+0>:   cmp    x0, #0x0                  ; =0x0 
    0x1a74fc9a4 <+4>:   b.le   0x1a74fca20               ; <+128>
    0x1a74fc9a8 <+8>:   ldr    x13, [x0]
    0x1a74fc9ac <+12>:  and    x16, x13, #0xffffffff8
    0x1a74fc9b0 <+16>:  ldr    x11, [x16, #0x10]
    0x1a74fc9b4 <+20>:  and    x10, x11, #0xffffffffffff
    0x1a74fc9b8 <+24>:  and    x12, x1, x11, lsr #48
    0x1a74fc9bc <+28>:  add    x12, x10, x12, lsl #4
->  0x1a74fc9c0 <+32>:  ldp    x17, x9, [x12]


Sometimes it's the fragmentShader, sometimes its the vertex shader, sometimes it's MTLDebugFunction