Closed bvernoux closed 1 year ago
After more investigation with gdb doing step by step the issue appears after execution of line scopehal-apps/src/ngscopeclient/TextureManager.cpp:304
m_textures[name] = make_shared<Texture>(*g_vkComputeDevice, imageInfo, stagingBuf, width, height, this);
(gdb) bt
at C:\msys64\home\bvern\scopehal-apps\src\ngscopeclient\TextureManager.cpp:304
Then after few step with gdb the exception happen when calling vk::raii::Image::bindMemory() (when calling scopehal-apps\src\ngscopeclient\TextureManager.cpp:59 m_image.bindMemory(**m_deviceMemory, 0);
See gdb bt
(gdb) bt
#0 vk::(anonymous namespace)::throwResultException (result=vk::Result::eErrorValidationFailedEXT,
message=message@entry=0x7ff74d79510f <vtable for std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<SCPIConsoleDialog::DoRender
()::{lambda()#1}> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<SCPIConsoleDialog::DoRender()::{la
mbda()#1}> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >*> > >+503> "vk::Image::bindMemory")
at C:/VulkanSDK/1.3.224.1/Include/vulkan/vulkan.hpp:5973
#1 0x00007ff74d56179b in vk::resultCheck (
message=0x7ff74d79510f <vtable for std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<SCPIConsoleDialog::DoRender()::{lambda()#
1}> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::*)(), std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<SCPIConsoleDialog::DoRender()::{lambda()#1}> >,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >*> > >+503> "vk::Image::bindMemory",
result=<optimized out>) at C:/VulkanSDK/1.3.224.1/Include/vulkan/vulkan.hpp:6169
#2 vk::raii::Image::bindMemory (memoryOffset=0, memory=..., this=0x1dc45d701b0) at C:/VulkanSDK/1.3.224.1/Include/vulkan/vulkan_raii.hpp:10498
#3 Texture::Texture (this=0x1dc45d701b0, device=..., imageInfo=..., srcBuf=..., width=24, height=24, mgr=0x1dc45ce4428)
at C:\msys64\home\bvern\scopehal-apps\src\ngscopeclient\TextureManager.cpp:59
#4 0x00007ff74d562645 in std::_Construct<Texture, vk::raii::Device&, vk::ImageCreateInfo&, vk::raii::Buffer&, int&, int&, TextureManager*> (__p=0x1dc45d701b0)
at C:/msys64/mingw64/include/c++/12.2.0/bits/stl_construct.h:119
#5 std::allocator_traits<std::allocator<void> >::construct<Texture, vk::raii::Device&, vk::ImageCreateInfo&, vk::raii::Buffer&, int&, int&, TextureManager*> (__p=0x1dc45d701b0)
at C:/msys64/mingw64/include/c++/12.2.0/bits/alloc_traits.h:635
#6 std::_Sp_counted_ptr_inplace<Texture, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<vk::raii::Device&, vk::ImageCreateInfo&, vk::raii::Buffer&, int&, int&, TextureManager*> (__a=...,
this=0x1dc45d701a0) at C:/msys64/mingw64/include/c++/12.2.0/bits/shared_ptr_base.h:604
#7 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<Texture, std::allocator<void>, vk::raii::Device&, vk::ImageCreateInfo&, vk::raii::Buffer&, int&, int&, TextureManager*>
(__a=..., __p=<optimized out>, this=<optimized out>) at C:/msys64/mingw64/include/c++/12.2.0/bits/shared_ptr_base.h:971
#8 std::__shared_ptr<Texture, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, vk::raii::Device&, vk::ImageCreateInfo&, vk::raii::Buffer&, int&, int&, TextureManager*> (
__tag=..., this=<optimized out>) at C:/msys64/mingw64/include/c++/12.2.0/bits/shared_ptr_base.h:1712
#9 std::shared_ptr<Texture>::shared_ptr<std::allocator<void>, vk::raii::Device&, vk::ImageCreateInfo&, vk::raii::Buffer&, int&, int&, TextureManager*> (__tag=..., this=<optimized out>)
at C:/msys64/mingw64/include/c++/12.2.0/bits/shared_ptr.h:464
#10 std::make_shared<Texture, vk::raii::Device&, vk::ImageCreateInfo&, vk::raii::Buffer&, int&, int&, TextureManager*> () at C:/msys64/mingw64/include/c++/12.2.0/bits/shared_ptr.h:1010
#11 TextureManager::LoadTexture (this=this@entry=0x1dc45ce4428, name="foo", path="C:\\msys64\\home\\bvern\\glscopeclient_release_glslang_static/icons/24x24/trigger-start.png")
at C:\msys64\home\bvern\scopehal-apps\src\ngscopeclient\TextureManager.cpp:304
#12 0x00007ff74d52c900 in MainWindow::MainWindow (this=this@entry=0x1dc45ce3f70, queue=...) at C:\msys64\home\bvern\scopehal-apps\src\ngscopeclient\MainWindow.cpp:107
#13 0x00007ff74d75d58a in std::make_unique<MainWindow, vk::raii::Queue&> () at C:/msys64/mingw64/include/c++/12.2.0/bits/unique_ptr.h:1064
#14 main (argc=<optimized out>, argv=<optimized out>) at C:\msys64\home\bvern\scopehal-apps\src\ngscopeclient\main.cpp:133
See https://hydrabus.com/ngscopeclient/vulkaninfoSDK.txt More details with Vulkan Validation (with all debug info)
ngscopeclient.exe
VUID-vkBindImageMemory-memory-01047(ERROR / SPEC): msgNum: -1558817633 - Validation Error: [ VUID-vkBindImageMemory-memory-01047 ] Object 0: handle = 0xa21a4e0000000030, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0xa316549f | vkBindImageMemory()(): MemoryRequirements->memoryTypeBits (0x102) for this object type are not compatible with the memory type (0x7) of VkDeviceMemory 0xa21a4e0000000030[]. The Vulkan spec states: memory must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with image (https://vulkan.lunarg.com/doc/view/1.3.224.1/windows/1.3-extensions/vkspec.html#VUID-vkBindImageMemory-memory-01047)
Objects: 1
[0] 0xa21a4e0000000030, type: 8, name: NULL
Build done with mingw64 latest version with commit https://github.com/glscopeclient/scopehal-apps/commit/d611cbae57684b0505b2ca846d444b94b9ad2786
C:\\msys64\\home\\bvern\\glscopeclient_release_glslang_static/icons/24x24/trigger-start.png
exist (with all icons and also fonts) in my system so it is not related to a missing file.