You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I meet a crash problem when my program release vulkan instance, let me explain:
Suppose I have a vulkan render class, which will create vulkan instance, vulkan surface, pick physical device, and create vulkan device in sequence. Of course, I have to create another window to support the vulkan surface creation.
For the destructor of vulkan render, I write the release source code by the order:
vulkan device -> vulkan surface -> vulkan instance
Of course, I also write the release source code in the destructor of the window class.
In my program main function, I create the window and take it to initialize the vulkan render until the vulkan device is created, and then exit the program. No need to do anything.
When program exits, it should release the vulkan encoder and window. Here, I find a strange crash issue:
If the vulkan render is allocated in the main function, which is a local variable, the program will release it ok.
But, if the vulkan render is announced as a "global" variable, program will crash when vulkan instance is released.
The sample code likes below:
As the picture shows, if the render is announced as global (try line 95 and disable line 101), program will crash when it exits and release vulkan instance:
Thread 1 "vulkan_test" received signal SIGSEGV, Segmentation fault.
0x00007ffff0ffaf57 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/amdvlk64.so
(gdb) where
#0 0x00007ffff0ffaf57 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/amdvlk64.so #1 0x00007ffff7f64da5 in vkDestroyInstance () from /lib/x86_64-linux-gnu/libvulkan.so.1 #2 0x000055555555cb9e in CUbiVulkanRender::ClearCommonResource (this=0x55555559a340 , p_CommonInfo=...) at UbiVulkanRender.cpp:216 #3 0x000055555555cd50 in CUbiVulkanRender::Cleanup (this=0x55555559a340 ) at UbiVulkanRender.cpp:247 #4 0x000055555555c4b6 in CUbiVulkanRender::~CUbiVulkanRender (this=0x55555559a340 , __in_chrg=) at UbiVulkanRender.cpp:57 #5 0x00007ffff79c7495 in __run_exit_handlers (status=0, listp=0x7ffff7b9c838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true,
run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:113 #6 0x00007ffff79c7610 in __GI_exit (status=) at ./stdlib/exit.c:143 #7 0x00007ffff79abd97 in __libc_start_call_main (main=main@entry=0x55555555a8e0 <main()>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe098)
at ../sysdeps/nptl/libc_start_call_main.h:74 #8 0x00007ffff79abe40 in __libc_start_main_impl (main=0x55555555a8e0 <main()>, argc=1, argv=0x7fffffffe098, init=,
fini=, rtld_fini=, stack_end=0x7fffffffe088) at ../csu/libc-start.c:392 #9 0x000055555555a445 in _start ()
My platform is ubuntu 22.04, driver is "1:5.7.00.48.50700-1666569.22.04", and graphic card is [Radeon RX470].
The text was updated successfully, but these errors were encountered:
I meet a crash problem when my program release vulkan instance, let me explain:
Suppose I have a vulkan render class, which will create vulkan instance, vulkan surface, pick physical device, and create vulkan device in sequence. Of course, I have to create another window to support the vulkan surface creation.
For the destructor of vulkan render, I write the release source code by the order:
vulkan device -> vulkan surface -> vulkan instance
Of course, I also write the release source code in the destructor of the window class.
In my program main function, I create the window and take it to initialize the vulkan render until the vulkan device is created, and then exit the program. No need to do anything.
When program exits, it should release the vulkan encoder and window. Here, I find a strange crash issue:
If the vulkan render is allocated in the main function, which is a local variable, the program will release it ok.
But, if the vulkan render is announced as a "global" variable, program will crash when vulkan instance is released.
The sample code likes below:
As the picture shows, if the render is announced as global (try line 95 and disable line 101), program will crash when it exits and release vulkan instance:
Thread 1 "vulkan_test" received signal SIGSEGV, Segmentation fault.
0x00007ffff0ffaf57 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/amdvlk64.so
(gdb) where
#0 0x00007ffff0ffaf57 in ?? () from /opt/amdgpu-pro/lib/x86_64-linux-gnu/amdvlk64.so
#1 0x00007ffff7f64da5 in vkDestroyInstance () from /lib/x86_64-linux-gnu/libvulkan.so.1
#2 0x000055555555cb9e in CUbiVulkanRender::ClearCommonResource (this=0x55555559a340 , p_CommonInfo=...) at UbiVulkanRender.cpp:216
#3 0x000055555555cd50 in CUbiVulkanRender::Cleanup (this=0x55555559a340 ) at UbiVulkanRender.cpp:247
#4 0x000055555555c4b6 in CUbiVulkanRender::~CUbiVulkanRender (this=0x55555559a340 , __in_chrg=) at UbiVulkanRender.cpp:57
#5 0x00007ffff79c7495 in __run_exit_handlers (status=0, listp=0x7ffff7b9c838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true,
run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:113
#6 0x00007ffff79c7610 in __GI_exit (status=) at ./stdlib/exit.c:143
#7 0x00007ffff79abd97 in __libc_start_call_main (main=main@entry=0x55555555a8e0 <main()>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe098)
at ../sysdeps/nptl/libc_start_call_main.h:74
#8 0x00007ffff79abe40 in __libc_start_main_impl (main=0x55555555a8e0 <main()>, argc=1, argv=0x7fffffffe098, init=,
fini=, rtld_fini=, stack_end=0x7fffffffe088) at ../csu/libc-start.c:392
#9 0x000055555555a445 in _start ()
My platform is ubuntu 22.04, driver is "1:5.7.00.48.50700-1666569.22.04", and graphic card is [Radeon RX470].
The text was updated successfully, but these errors were encountered: