我正在尝试使用两个共享共同支持的场景工具包视图。视图在添加哪些节点方面有所不同(一个没有任何节点,并且仅显示相机源)。这种方法有效,但我得到与内存管理和金属渲染有关的间歇性错误(来自场景工具包框架)。我正在使用 iOS14.1
使用两个 ARSCNView 并共享它们的背景属性是否合法?
Apple 是否在未来的 iOS 版本中修复了 ARKit 的稳定性?
com.apple.scenekit.scnview-renderer (12) Queue : com.apple.scenekit.renderingQueue.ARSCNView0x106a0c910 (serial)
#0 0x0000000102d30984 in ___lldb_unnamed_symbol79$$libMTLToolsDiagnostics.dylib ()
#1 0x0000000102d30660 in ___lldb_unnamed_symbol77$$libMTLToolsDiagnostics.dylib ()
#2 0x0000000102d2e5bc in ___lldb_unnamed_symbol54$$libMTLToolsDiagnostics.dylib ()
#3 0x00000001dce017c8 in -[IOGPUMetalCommandEncoder endEncoding] ()
#4 0x00000001eadaf378 in ___lldb_unnamed_symbol1985$$AGXMetalA14 ()
#5 0x00000001dddf8938 in -[MTLGPUDebugRenderCommandEncoder endEncoding] ()
#6 0x00000001dde7b2f4 in -[MTLDebugRenderCommandEncoder endEncoding] ()
#7 0x000000010320f7f8 in ___lldb_unnamed_symbol1266$$libMTLCapture.dylib ()
#8 0x00000001d40a6030 in C3D::__renderSlice(C3D::RenderGraph*, C3D::RenderPass*, unsigned short&, C3D::RenderGraph::GraphNode const&, C3D::RenderGraph::Stage*&, C3D::RenderArgs, bool, id<MTLCommandBuffer>&) ()
#9 0x00000001d40a7334 in C3D::RenderGraph::execute() ()
#10 0x00000001d41a8e08 in -[SCNRenderer _renderSceneWithEngineContext:sceneTime:] ()
#11 0x00000001d41a9674 in -[SCNRenderer _drawSceneWithNewRenderer:] ()
#12 0x00000001d41a9c18 in -[SCNRenderer _drawScene:] ()
#13 0x00000001d41a9fd8 in -[SCNRenderer _drawAtTime:] ()
#14 0x00000001d424a520 in -[SCNView _drawAtTime:] ()
#15 0x00000001d41041e8 in __76-[NSObject(SCN_DisplayLinkExtensions) SCN_setupDisplayLinkWithQueue:screen:]_block_invoke ()
#16 0x00000001d4214204 in __36-[SCNDisplayLink _callbackWithTime:]_block_invoke ()
#17 0x0000000102d615f0 in _dispatch_client_callout ()
#18 0x0000000102d717f8 in _dispatch_lane_barrier_sync_invoke_and_complete ()
#19 0x00000001d4214188 in -[SCNDisplayLink _callbackWithTime:] ()
#20 0x0000000103481618 in -[DYDisplayLinkInterposer forwardDisplayLinkCallback:] ()
#21 0x00000001a4f46748 in CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) ()
#22 0x00000001a501d244 in display_timer_callback(__CFMachPort*, void*, long, void*) ()
#23 0x00000001a1c87ce4 in __CFMachPortPerform ()
#24 0x00000001a1cac098 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#25 0x00000001a1cab440 in __CFRunLoopDoSource1 ()
#26 0x00000001a1ca5320 in __CFRunLoopRun ()
#27 0x00000001a1ca44bc in CFRunLoopRunSpecific ()
#28 0x00000001a2f25e30 in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
#29 0x00000001d4104658 in __78-[SCNView(SCNDisplayLink) _initializeDisplayLinkWithScreen:completionHandler:]_block_invoke ()
@IBOutlet var sceneView: ARSCNView!
@IBOutlet weak var feedSceneView: ARSCNView!
feedSceneView?.scene.background.contents = sceneView.scene.background.contents
feedSceneView?.session = sceneView.session