Closed jwinarske closed 2 months ago
log snippet of valid run
/mnt/raid10/stargate/ivi-homescreen/cmake-build-debug-clang/plugins/filament_view/simple
libdecor-gtk-WARNING: Failed to initialize GTK
Failed to load plugin 'libdecor-gtk.so': failed to init
FEngine (64 bits) created at 0x1e37780 (threading is enabled)
FEngine resolved backend: Vulkan
Vulkan device driver: radv Mesa 23.1.9
Selected physical device 'AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO)' from 2 physical devices. (vendor 0x1002, device 0x164e, driver 0x5c01009, api 1.3)
Backend feature level: 1
FEngine feature level: 1
WARNING: :0:0:0: The function '%41 = OpFunction %2 None %37' could not be inlined because the return instruction is not at the end of the function. This could be fixed by running merge-return before inlining.
WARNING: :0:0:0: The function '%91 = OpFunction %6 None %89' could not be inlined because the return instruction is not at the end of the function. This could be fixed by running merge-return before inlining.
WARNING: :0:0:0: The function '%91 = OpFunction %6 None %89' could not be inlined because the return instruction is not at the end of the function. This could be fixed by running merge-return before inlining.
... lots more warnings (removed for brevity)
vkCreateSwapchain: 1200x800, VK_FORMAT_B8G8R8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, swapchain-size=5, identity-transform=true, depth=VK_FORMAT_D32_SFLOAT
Renderer: Commands High watermark 0 KiB (0%), 6 commands, 64 bytes/command
CircularBuffer: High watermark 18 KiB (0%)
FEngine::mHeapAllocator arena: High watermark 189 KiB
Running near tip of tree main: 0e9b2eda0aaeba3e69251616b5e849103c124a62
Behavior is different running on release. On debug it takes about two maximize/restore, and with release it takes ~7 maximize/restore then hitting this stack trace:
[libc.so.6] __pthread_kill_implementation 0x00007ffff7d0f834
[libc.so.6] raise 0x00007ffff7cbd8ee
[libc.so.6] abort 0x00007ffff7ca58ff
[libc++abi.so.1] abort_message 0x00007ffff7e87b0f
[libc++abi.so.1] demangling_terminate_handler() 0x00007ffff7e70e8f
[libc++abi.so.1] std::__terminate(void (*)()) 0x00007ffff7e869aa
[libc++abi.so.1] std::terminate() 0x00007ffff7e86924
[simple] __clang_call_terminate 0x00000000004d47ce
[simple] filament::backend::ConcreteDispatcher<filament::backend::VulkanDriver>::commit(filament::backend::Driver&, filament::backend::CommandBase*, long*) 0x000000000090af1b
[simple] std::__1::__function::__func<filament::backend::CommandStream::execute(void*)::$_0, std::__1::allocator<filament::backend::CommandStream::execute(void*)::$_0>, void ()>::operator()() [clone .llvm.9022111094664947753] 0x00000000008f1b4b
[simple] filament::backend::Driver::execute(std::__1::function<void ()> const&) 0x0000000000938910
[simple] filament::backend::CommandStream::execute(void*) 0x00000000008f190c
[simple] filament::FEngine::execute() 0x00000000008d0e60
[simple] filament::FEngine::loop() 0x00000000008c7990
[simple] void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, int (filament::FEngine::*)(), filament::FEngine*> >(void*) 0x00000000008d251b
[libc.so.6] start_thread 0x00007ffff7d0d897
[libc.so.6] clone3 0x00007ffff7d946fc
CMake used to build it:
set(CONTEXT_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:-stdlib=libc++> $<$<COMPILE_LANGUAGE:CXX>:-isystem${LLVM_ROOT}/include/c++/v1/>)
#
# Toolchain IPO/LTO support
#
if (ENABLE_LTO)
cmake_policy(SET CMP0069 NEW)
include(CheckIPOSupported)
check_ipo_supported(
RESULT IPO_SUPPORT_RESULT
OUTPUT IPO_SUPPORT_OUTPUT
LANGUAGES C CXX
)
endif ()
add_library(filament INTERFACE)
target_include_directories(filament INTERFACE ${FILAMENT_INCLUDE_DIR})
target_link_directories(filament INTERFACE ${FILAMENT_LINK_LIBRARIES_DIR})
target_link_libraries(filament INTERFACE
libbackend.a
libbluevk.a
libdracodec.a
libfilamat.a
libfilameshio.a
libgltfio_core.a
libimage.a
libshaders.a
libuberarchive.a
libviewer.a
libbasis_transcoder.a
libcamutils.a
libfilabridge.a
libfilament.a
libgeometry.a
libibl.a
libimageio.a
libmeshoptimizer.a
libsmol-v.a
libuberzlib.a
libvkshaders.a
libcivetweb.a
libtinyexr.a
libfilaflat.a
libfilament-iblprefilter.a
libgltfio.a
libibl-lite.a
libktxreader.a
libmikktspace.a
libpng.a
libstb.a
libutils.a
libzstd.a
z
Threads::Threads
)
set(CMAKE_THREAD_PREFER_PTHREAD ON)
include(FindThreads)
#
# Simple Example
#
pkg_check_modules(SDL2 IMPORTED_TARGET sdl2)
if (SDL2_FOUND)
add_executable(simple test/simple.cc)
target_link_libraries(simple PUBLIC
PkgConfig::SDL2
filament
${FILAMENT_LINK_LIBRARIES_DIR}/../../../../third_party/spirv-tools/source/opt/libSPIRV-Tools-opt.a
${FILAMENT_LINK_LIBRARIES_DIR}/../../../../third_party/spirv-cross/tnt/libspirv-cross-msl.a
)
target_compile_options(simple PRIVATE ${CONTEXT_COMPILE_OPTIONS})
target_link_options(simple PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-fuse-ld=lld -lc++ -lc++abi -lc -lm -v>)
if (IPO_SUPPORT_RESULT)
set_property(TARGET simple PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif ()
endif ()
I just rolled to v1.52.3 from v1.49.2 and have confirmed this issue is now resolved. No more crashing on resize. Thank you!
Discussed in https://github.com/google/filament/discussions/7450