iOS Metal: White screen after adding large number of objects to existing scene.
Our app is a "CAD-style" program. If we create a large number of new objects in the scene at once, the backend apparently fails/panics and we only get a blank white screen. Here are some details:
Using Filament 1.31.4
- Metal exhibits this problem; OpenGL runs fine.
- Able to reproduce on both simulator and real iOS hardware.
- Creating a small scene works.
- Adding objects in small increments works.
- Adding a large number of objects all at once triggers the issue.
- "Large number" represents (roughly): 320+ new Vertex/Index buffers with 8-50 verts per buffer; 640+ new entities;
Given that we are CAD-like, we don't have a set of models to send to repro the problem.
On simulator, we get this backend info, but we don't seem to get any from actual iOS hardware: Engine (64 bits) created at 0x7fca31f56400 (threading is enabled) FEngine resolved backend: Metal Selected physical device 'Apple iOS simulator GPU' FEngine feature level: 2
Crash call stack:
Native stacktrace:
0x1085eacc5 - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/3E970786-4BCC-400B-AD24-ABBD08845140/XactimateiOS.app/XactimateiOS : mono_dump_native_crash_info
0x1085df0de - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/3E970786-4BCC-400B-AD24-ABBD08845140/XactimateiOS.app/XactimateiOS : mono_handle_native_crash
0x1085f1d96 - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/3E970786-4BCC-400B-AD24-ABBD08845140/XactimateiOS.app/XactimateiOS : mono_crashing_signal_handler
0x7ff836167dfd - /usr/lib/system/libsystem_platform.dylib : _sigtramp
0x7ff800078000 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libxpc.dylib : __dso_handle
0x7ff80008fa36 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libxpc.dylib : _xpc_serializer_pack
0x7ff800083359 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libxpc.dylib : _xpc_connection_pack_message
0x7ff800083f3b - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libxpc.dylib : xpc_connection_send_message
0x7ff82e580151 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/MTLSimDriver.framework/MTLSimDriver : -[MTLSimCommandQueue submitCommandBuffers:count:]
0x7ff811ced4ff - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Metal.framework/Metal : -[_MTLCommandQueue _submitAvailableCommandBuffers]
0x7ff80013ca3a - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib : _dispatch_client_callout
0x7ff80013fe87 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib : _dispatch_continuation_pop
0x7ff80015534a - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib : _dispatch_source_invoke
0x7ff8001440fb - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib : _dispatch_lane_serial_drain
0x7ff800144fe3 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib : _dispatch_lane_invoke
0x7ff800151b46 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib : _dispatch_workloop_worker_thread
0x7ff836170fd0 - /usr/lib/system/libsystem_pthread.dylib : _pthread_wqthread
0x7ff83616ff57 - /usr/lib/system/libsystem_pthread.dylib : start_wqthread
We also got this call stack on one of our tests when we had bumped up the Filament buffers quite a bit to see if that had a positive effect. Not sure if this is useful, but thought we'd include it:
Native stacktrace:
0x102ed7cc5 - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/2D07A799-52ED-4DDA-A279-DCA62CFAC0CB/XactimateiOS.app/XactimateiOS : mono_dump_native_crash_info
0x102ecc0de - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/2D07A799-52ED-4DDA-A279-DCA62CFAC0CB/XactimateiOS.app/XactimateiOS : mono_handle_native_crash
0x102ed72ff - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/2D07A799-52ED-4DDA-A279-DCA62CFAC0CB/XactimateiOS.app/XactimateiOS : sigabrt_signal_handler
0x7ff836167dfd - /usr/lib/system/libsystem_platform.dylib : _sigtramp 0x0 - Unknown
0x7ff800132fe0 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort 0x102735b8d - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/2D07A799-52ED-4DDA-A279-DCA62CFAC0CB/XactimateiOS.app/XactimateiOS : _ZN5utils6TPanicINS_18PostconditionPanicEE5panicEPKcS4_iS4_z
0x10275d7b7 - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/2D07A799-52ED-4DDA-A279-DCA62CFAC0CB/XactimateiOS.app/XactimateiOS : _ZN8filament7backend20PlatformCocoaTouchGL11makeCurrentEPNS0_8Platform9SwapChainES4_
0x102746ddb - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/2D07A799-52ED-4DDA-A279-DCA62CFAC0CB/XactimateiOS.app/XactimateiOS : _ZNSt3__110__function6__funcIZN8filament7backend13CommandStream7executeEPvE3$_0NS_9allocatorIS6_EEFvvEEclEv
0x102746b78 - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/2D07A799-52ED-4DDA-A279-DCA62CFAC0CB/XactimateiOS.app/XactimateiOS : _ZN8filament7backend13CommandStream7executeEPv
0x102705b10 - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/2D07A799-52ED-4DDA-A279-DCA62CFAC0CB/XactimateiOS.app/XactimateiOS : _ZN8filament7FEngine4loopEv
0x10270914c - /Users/i23981/Library/Developer/CoreSimulator/Devices/4F4069A3-B9A1-42CE-B866-718CE5A28A80/data/Containers/Bundle/Application/2D07A799-52ED-4DDA-A279-DCA62CFAC0CB/XactimateiOS.app/XactimateiOS : _ZNSt3__1L14__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN8filament7FEngineEFivEPS8_EEEEEPvSD_
0x7ff8361744e1 - /usr/lib/system/libsystem_pthread.dylib : _pthread_start
0x7ff83616ff6b - /usr/lib/system/libsystem_pthread.dylib : thread_start