Closed IAmNotHanni closed 2 years ago
Running valgrind 3.15.0 yields:
==12854== Jump to the invalid address stated on the next line
==12854== at 0x0: ???
==12854== by 0x53F524: vmaCreateBuffer (.conan/data/vulkan-memory-allocator/2.3.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/vk_mem_alloc.h:17508)
==12854== by 0x57ADBB: inexor::vulkan_renderer::wrapper::GPUMemoryBuffer::GPUMemoryBuffer(inexor::vulkan_renderer::wrapper::Device const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long const&, unsigned int const&, VmaMemoryUsage const&) (src/vulkan-renderer/wrapper/gpu_memory_buffer.cpp:41)
==12854== by 0x57AF6E: inexor::vulkan_renderer::wrapper::GPUMemoryBuffer::GPUMemoryBuffer(inexor::vulkan_renderer::wrapper::Device const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long const&, void*, unsigned long, unsigned int const&, VmaMemoryUsage const&) (src/vulkan-renderer/wrapper/gpu_memory_buffer.cpp:54)
==12854== by 0x55D986: inexor::vulkan_renderer::wrapper::StagingBuffer::StagingBuffer(inexor::vulkan_renderer::wrapper::Device const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, void*, unsigned long) (src/vulkan-renderer/wrapper/staging_buffer.cpp:13)
==12854== by 0x555641: inexor::vulkan_renderer::wrapper::GpuTexture::create_texture(void*, unsigned long) (src/vulkan-renderer/wrapper/gpu_texture.cpp:50)
==12854== by 0x555561: inexor::vulkan_renderer::wrapper::GpuTexture::GpuTexture(inexor::vulkan_renderer::wrapper::Device const&, inexor::vulkan_renderer::wrapper::CpuTexture const&) (src/vulkan-renderer/wrapper/gpu_texture.cpp:20)
==12854== by 0x4B4031: _ZSt12construct_atIN6inexor15vulkan_renderer7wrapper10GpuTextureEJRNS2_6DeviceERNS2_10CpuTextureEEEDTgsnwcvPvLi0E_T_pispclsr3stdE7declvalIT0_EEEEPS9_DpOSA_ (stl_construct.h:97)
==12854== by 0x4B3C88: void std::allocator_traits<std::allocator<inexor::vulkan_renderer::wrapper::GpuTexture> >::construct<inexor::vulkan_renderer::wrapper::GpuTexture, inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&>(std::allocator<inexor::vulkan_renderer::wrapper::GpuTexture>&, inexor::vulkan_renderer::wrapper::GpuTexture*, inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&) (alloc_traits.h:514)
==12854== by 0x4B3D72: void std::vector<inexor::vulkan_renderer::wrapper::GpuTexture, std::allocator<inexor::vulkan_renderer::wrapper::GpuTexture> >::_M_realloc_insert<inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&>(__gnu_cxx::__normal_iterator<inexor::vulkan_renderer::wrapper::GpuTexture*, std::vector<inexor::vulkan_renderer::wrapper::GpuTexture, std::allocator<inexor::vulkan_renderer::wrapper::GpuTexture> > >, inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&) (vector.tcc:449)
==12854== by 0x41C626: inexor::vulkan_renderer::wrapper::GpuTexture& std::vector<inexor::vulkan_renderer::wrapper::GpuTexture, std::allocator<inexor::vulkan_renderer::wrapper::GpuTexture> >::emplace_back<inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&>(inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&) (vector.tcc:121)
==12854== by 0x41812A: inexor::vulkan_renderer::Application::load_textures() (src/vulkan-renderer/application.cpp:150)
==12854== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==12854==
==12854==
==12854== Process terminating with default action of signal 11 (SIGSEGV)
==12854== Bad permissions for mapped region at address 0x0
==12854== at 0x0: ???
==12854== by 0x53F524: vmaCreateBuffer (.conan/data/vulkan-memory-allocator/2.3.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/vk_mem_alloc.h:17508)
==12854== by 0x57ADBB: inexor::vulkan_renderer::wrapper::GPUMemoryBuffer::GPUMemoryBuffer(inexor::vulkan_renderer::wrapper::Device const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long const&, unsigned int const&, VmaMemoryUsage const&) (src/vulkan-renderer/wrapper/gpu_memory_buffer.cpp:41)
==12854== by 0x57AF6E: inexor::vulkan_renderer::wrapper::GPUMemoryBuffer::GPUMemoryBuffer(inexor::vulkan_renderer::wrapper::Device const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long const&, void*, unsigned long, unsigned int const&, VmaMemoryUsage const&) (src/vulkan-renderer/wrapper/gpu_memory_buffer.cpp:54)
==12854== by 0x55D986: inexor::vulkan_renderer::wrapper::StagingBuffer::StagingBuffer(inexor::vulkan_renderer::wrapper::Device const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, void*, unsigned long) (src/vulkan-renderer/wrapper/staging_buffer.cpp:13)
==12854== by 0x555641: inexor::vulkan_renderer::wrapper::GpuTexture::create_texture(void*, unsigned long) (src/vulkan-renderer/wrapper/gpu_texture.cpp:50)
==12854== by 0x555561: inexor::vulkan_renderer::wrapper::GpuTexture::GpuTexture(inexor::vulkan_renderer::wrapper::Device const&, inexor::vulkan_renderer::wrapper::CpuTexture const&) (src/vulkan-renderer/wrapper/gpu_texture.cpp:20)
==12854== by 0x4B4031: _ZSt12construct_atIN6inexor15vulkan_renderer7wrapper10GpuTextureEJRNS2_6DeviceERNS2_10CpuTextureEEEDTgsnwcvPvLi0E_T_pispclsr3stdE7declvalIT0_EEEEPS9_DpOSA_ (stl_construct.h:97)
==12854== by 0x4B3C88: void std::allocator_traits<std::allocator<inexor::vulkan_renderer::wrapper::GpuTexture> >::construct<inexor::vulkan_renderer::wrapper::GpuTexture, inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&>(std::allocator<inexor::vulkan_renderer::wrapper::GpuTexture>&, inexor::vulkan_renderer::wrapper::GpuTexture*, inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&) (alloc_traits.h:514)
==12854== by 0x4B3D72: void std::vector<inexor::vulkan_renderer::wrapper::GpuTexture, std::allocator<inexor::vulkan_renderer::wrapper::GpuTexture> >::_M_realloc_insert<inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&>(__gnu_cxx::__normal_iterator<inexor::vulkan_renderer::wrapper::GpuTexture*, std::vector<inexor::vulkan_renderer::wrapper::GpuTexture, std::allocator<inexor::vulkan_renderer::wrapper::GpuTexture> > >, inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&) (vector.tcc:449)
==12854== by 0x41C626: inexor::vulkan_renderer::wrapper::GpuTexture& std::vector<inexor::vulkan_renderer::wrapper::GpuTexture, std::allocator<inexor::vulkan_renderer::wrapper::GpuTexture> >::emplace_back<inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&>(inexor::vulkan_renderer::wrapper::Device&, inexor::vulkan_renderer::wrapper::CpuTexture&) (vector.tcc:121)
==12854== by 0x41812A: inexor::vulkan_renderer::Application::load_textures() (src/vulkan-renderer/application.cpp:150)
==12854==
==12854== HEAP SUMMARY:
==12854== in use at exit: 23,203,407 bytes in 47,899 blocks
==12854== total heap usage: 128,951 allocs, 81,052 frees, 1,509,946,853 bytes allocated
==12854==
==12854== LEAK SUMMARY:
==12854== definitely lost: 152 bytes in 5 blocks
==12854== indirectly lost: 24 bytes in 1 blocks
==12854== possibly lost: 424,485 bytes in 1,875 blocks
==12854== still reachable: 22,778,746 bytes in 46,018 blocks
==12854== of which reachable via heuristic:
==12854== newarray : 16 bytes in 1 blocks
==12854== multipleinheritance: 104 bytes in 1 blocks
==12854== suppressed: 0 bytes in 0 blocks
==12854== Rerun with --leak-check=full to see details of leaked memory
==12854==
==12854== For lists of detected and suppressed errors, rerun with: -s
==12854== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
Interestingly, PFN_vkGetImageMemoryRequirements2KHR
is a null pointer for some reason. I used gdb to find out:
I did sudo apt install nvidia-driver-510
on my Linux and now it works. I still don't understand why VMA did not validate the function pointer, but since version 2.3.0
is quite outdated (and so is my graphics card: NVidia GTX 660M), it's probably not worth to dig deeper into it.
Describe The Bug
When I build and run current main on Linux Mint 20.3, I get an error.
Steps To Reproduce
Expected Behavior
You should be able to see the 2 octrees we currently render in main branch
Affected Code
The entire code base
Operating System
Linux Mint 20.3 Cinnamon
Application Version
cab5078
Additional Context
I just installed latest Mint 20.3, it could be possible something is missing. Vulkan cube application is running though.
Relevant Log Output