google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.78k stars 1.89k forks source link

hello-ar iOS crashes on startup #5383

Closed fluffy-critter closed 2 years ago

fluffy-critter commented 2 years ago

Describe the bug

The hello-ar iOS sample crashes on startup.

To Reproduce

Steps to reproduce the behavior:

  1. Build hello-ar
  2. Attempt to run it on an iPhone 13 Pro

Expected behavior

I expected the sample to run.

Logs

2022-03-30 11:34:00.940320-0700 hello-ar[401:7710] Metal GPU Frame Capture Enabled
2022-03-30 11:34:00.940406-0700 hello-ar[401:7710] Metal API Validation Enabled
2022-03-30 11:34:00.974950-0700 hello-ar[401:7710] Errors found! Invalidating cache...
FEngine (64 bits) created at 0x142000000 (threading is enabled)
FEngine resolved backend: Metal
Selected physical device 'Apple A15 GPU'
Supported GPU families: 
  MTLGPUFamilyCommon3
  MTLGPUFamilyApple7
Features:
  readWriteTextureSupport: true
2022-03-30 11:34:01.102366-0700 hello-ar[401:7940] setting deprecated property. outputDepthUnits has no impact on pipeline's depth units

in void utils::panic(const char *, const char *, int, const char *):32
in file /Users/jshagam/src/filament/libs/utils/src/debug.cpp
reason: /Users/jshagam/src/filament/filament/src/details/Material.h:100: failed assertion `mCachedPrograms[variant.key]'

#0  hello-ar                               0x1024c8188 utils::CallStack::update(unsigned long) + 32
#1  hello-ar                               0x1024c815c utils::CallStack::unwind(unsigned long) + 44
#2  hello-ar                               0x1024e3238 utils::details::panicLog(char const*, char const*, int, char const*, ...) + 220
#3  hello-ar                               0x1024c7258 utils::panic(char const*, char const*, int, char const*) + 92
#4  hello-ar                               0x102359c78 filament::FMaterial::getProgram(filament::Variant) const + 92
#5  hello-ar                               0x1022ce66c filament::PostProcessManager::colorGradingPrepareSubpass(filament::backend::CommandStream&, filament::FColorGrading const*, filament::PostProcessManager::ColorGradingConfig const&, filament::VignetteOptions const&, unsigned int, unsigned int) + 660
#6  hello-ar                               0x102371b0c filament::FRenderer::renderJob(utils::ArenaScope<utils::Arena<utils::LinearAllocator, utils::LockingPolicy::NoLock, utils::TrackingPolicy::DebugAndHighWatermark, utils::AreaPolicy::HeapArea> >&, filament::FView&)::$_4::operator()(filament::backend::CommandStream&) const + 76
#7  hello-ar                               0x102371ab4 auto void filament::FrameGraph::addTrivialSideEffectPass<filament::FRenderer::renderJob(utils::ArenaScope<utils::Arena<utils::LinearAllocator, utils::LockingPolicy::NoLock, utils::TrackingPolicy::DebugAndHighWatermark, utils::AreaPolicy::HeapArea> >&, filament::FView&)::$_4>(char const*, filament::FRenderer::renderJob(utils::ArenaScope<utils::Arena<utils::LinearAllocator, utils::LockingPolicy::NoLock, utils::TrackingPolicy::DebugAndHighWatermark, utils::AreaPolicy::HeapArea> >&, filament::FView&)::$_4&&)::'lambda'(filament::FrameGraphResources const&, filament::FRenderer::renderJob(utils::ArenaScope<utils::Arena<utils::LinearAllocator, utils::LockingPolicy::NoLock, utils::TrackingPolicy::DebugAndHighWatermark, utils::AreaPolicy::HeapArea> >&, filament::FView&)::$_4 const&, filament::backend::CommandStream&)::operator()<filament::FrameGraph::Empty>(filament::FrameGraphResources const&, filament::FRenderer::renderJob(utils::ArenaScope<utils::Arena<utils::Li#8  hello-ar                               0x102371a1c filament::FrameGraphPass<filament::FrameGraph::Empty, void filament::FrameGraph::addTrivialSideEffectPass<filament::FRenderer::renderJob(utils::ArenaScope<utils::Arena<utils::LinearAllocator, utils::LockingPolicy::NoLock, utils::TrackingPolicy::DebugAndHighWatermark, utils::AreaPolicy::HeapArea> >&, filament::FView&)::$_4>(char const*, filament::FRenderer::renderJob(utils::ArenaScope<utils::Arena<utils::LinearAllocator, utils::LockingPolicy::NoLock, utils::TrackingPolicy::DebugAndHighWatermark, utils::AreaPolicy::HeapArea> >&, filament::FView&)::$_4&&)::'lambda'(filament::FrameGraphResources const&, filament::FRenderer::renderJob(utils::ArenaScope<utils::Arena<utils::LinearAllocator, utils::LockingPolicy::NoLock, utils::TrackingPolicy::DebugAndHighWatermark, utils::AreaPolicy::HeapArea> >&, filament::FView&)::$_4 const&, filament::backend::CommandStream&)>::execute(filament::FrameGraphResources const&, filament::backend::CommandStream&) + 52
#9  hello-ar                               0x1023c76ac filament::RenderPassNode::execute(filament::FrameGraphResources const&, filament::backend::CommandStream&) + 188
#10 hello-ar                               0x1023b7700 filament::FrameGraph::execute(filament::backend::CommandStream&) + 476
#11 hello-ar                               0x102367620 filament::FRenderer::renderJob(utils::ArenaScope<utils::Arena<utils::LinearAllocator, utils::LockingPolicy::NoLock, utils::TrackingPolicy::DebugAndHighWatermark, utils::AreaPolicy::HeapArea> >&, filament::FView&) + 6600
#12 hello-ar                               0x1023659d8 filament::FRenderer::renderInternal(filament::FView const*) + 124
#13 hello-ar                               0x102365bc4 filament::FRenderer::render(filament::FView const*) + 200
#14 hello-ar                               0x1022f2f00 filament::Renderer::render(filament::View const*) + 52
#15 hello-ar                               0x1022a2e5c FilamentApp::render(FilamentApp::FilamentArFrame const&) + 492
#16 hello-ar                               0x1022a92cc -[FilamentArViewController session:didUpdateFrame:] + 2908
#17 ARKitCore                              0x20027dfe4 <redacted> + 128

dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/usr/lib/libMTLCapture.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
(lldb) 

Smartphone (please complete the following information):

Additional context

Other samples (e.g. hello-triangle) work.

bejado commented 2 years ago

I'm able to reproduce and will take a look.