What causes this error

i keep getting this error

[ERROR: Validation]
Validation Error: [ VUID-vkGetPhysicalDeviceSurfaceSupportKHR-surface-parameter ] Object 0: handle = 0x564255b7e0c0, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x801f247e | Invalid VkSurfaceKHR Object 0x7ffe90251820. The Vulkan spec states: surface must be a valid VkSurfaceKHR handle (Vulkan® 1.3.273 - A Specification (with all registered extensions))
[ERROR: Validation]
Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0x7ffe90251820, type = VK_OBJECT_TYPE_SURFACE_KHR; | MessageID = 0x5d6b67e2 | Couldn’t find VkSurfaceKHR Object 0x7ffe90251820. This should not happen and may indicate a bug in the application.

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

im thinking it has somthing to do with shaders but i couldnt find anything wrong in the code
also the debugger crashes at vkb::Instance vkb_inst = inst_ret.value();

i think ive fixed the other errors (for the most part) but how do i fix the segmentation fault

1 Like

Let’s not overthink it. The validation says the VkSurface is not valid handle. Well, is it valid handle obtained from successful call to vkCreateSurface?

Might also be problem with your abstractions, IDK. Try VK_LAYER_LUNARG_api_dump layer to see what the driver actually receives.

i think i fixed it and it turned out to have somthing to do with the pipeline and somthing to do with the shaders
but now it gives this error

[ERROR: Validation]
Validation Error: [ UNASSIGNED-CoreValidation-Shader-InputNotProduced ] Object 0: handle = 0xdd3a8a0000000015, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x23e43bb7 | Vertex shader consumes input at location 0 but not provided
[WARNING: Performance]
Validation Performance Warning: [ UNASSIGNED-CoreValidation-Shader-OutputNotConsumed ] Object 0: handle = 0xdd3a8a0000000015, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x609a13b | vertex shader writes to output location 0.0 which is not consumed by fragment shader
Detected Vulkan error: 2

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

however it does actuly suceed in making a triangle on the screen

also for some reason it still works for the most part if i skip the error in the debugger

ive been working on it for a while and its working and i can load 3d objects and use matrices from the glm library but it gives all these errors

Validation Error: [ VUID-VkSubpassDependency-dstAccessMask-00869 ] Object 0: handle = 0x562b5d7fdb40, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x8ab30c42 | vkCreateRenderPass(): pDependencies[1].dstAccessMask bit VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT is not supported by stage mask (VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT|VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT). The Vulkan spec states: Any access flag included in dstAccessMask must be supported by one of the pipeline stages in dstStageMask, as specified in the table of supported access types (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSubpassDependency-dstAccessMask-00869)
Triangle fragment shader successfully loaded
Triangle vertex shader successfully loaded
Triangle fragment shader successfully loaded
Triangle vertex shader successfully loaded
[ERROR: Validation]
Validation Error: [ VUID-VkPipelineDepthStencilStateCreateInfo-flags-parameter ] Object 0: handle = 0x562b5d7fdb40, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x2d10b5d6 | vkCreateGraphicsPipelines: value of pCreateInfos[0].pDepthStencilState->flags contains flag bits that are not recognized members of VkPipelineDepthStencilStateCreateFlagBits The Vulkan spec states: flags must be a valid combination of VkPipelineDepthStencilStateCreateFlagBits values (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkPipelineDepthStencilStateCreateInfo-flags-parameter)
[ERROR: Validation]
Validation Error: [ UNASSIGNED-GeneralParameterError-UnrecognizedValue ] Object 0: handle = 0x562b5d7fdb40, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbe6eff91 | vkCreateGraphicsPipelines: value of pCreateInfos[0].pDepthStencilState->depthBoundsTestEnable (621985040) is neither VK_TRUE nor VK_FALSE. Applications MUST not pass any other values than VK_TRUE or VK_FALSE into a Vulkan implementation where a VkBool32 is expected.
[ERROR: Validation]
Validation Error: [ UNASSIGNED-GeneralParameterError-UnrecognizedValue ] Object 0: handle = 0x562b5d7fdb40, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbe6eff91 | vkCreateGraphicsPipelines: value of pCreateInfos[0].pDepthStencilState->stencilTestEnable (32764) is neither VK_TRUE nor VK_FALSE. Applications MUST not pass any other values than VK_TRUE or VK_FALSE into a Vulkan implementation where a VkBool32 is expected.
[ERROR: Validation]
Validation Error: [ VUID-VkStencilOpState-failOp-parameter ] Object 0: handle = 0x562b5d7fdb40, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x89b05963 | vkCreateGraphicsPipelines: value of pCreateInfos[0].pDepthStencilState->front.failOp (8) does not fall within the begin..end range of the core VkStencilOp enumeration tokens and is not an extension added token. The Vulkan spec states: failOp must be a valid VkStencilOp value (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkStencilOpState-failOp-parameter)
[ERROR: Validation]
Validation Error: [ VUID-VkStencilOpState-failOp-parameter ] Object 0: handle = 0x562b5d7fdb40, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x89b05963 | vkCreateGraphicsPipelines: value of pCreateInfos[0].pDepthStencilState->back.failOp (32764) does not fall within the begin..end range of the core VkStencilOp enumeration tokens and is not an extension added token. The Vulkan spec states: failOp must be a valid VkStencilOp value (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkStencilOpState-failOp-parameter)
[ERROR: Validation]
Validation Error: [ VUID-VkStencilOpState-passOp-parameter ] Object 0: handle = 0x562b5d7fdb40, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x517a57e9 | vkCreateGraphicsPipelines: value of pCreateInfos[0].pDepthStencilState->back.passOp (9) does not fall within the begin..end range of the core VkStencilOp enumeration tokens and is not an extension added token. The Vulkan spec states: passOp must be a valid VkStencilOp value (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkStencilOpState-passOp-parameter)
[ERROR: Validation]
Validation Error: [ VUID-VkPipelineDepthStencilStateCreateInfo-sType-sType ] Object 0: handle = 0x562b5d7fdb40, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfa7d9d67 | vkCreateGraphicsPipelines: parameter pCreateInfos[0].pDepthStencilState->sType must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO The Vulkan spec states: sType must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkPipelineDepthStencilStateCreateInfo-sType-sType)
[ERROR: Validation]
Validation Error: [ UNASSIGNED-CoreValidation-Shader-InputNotProduced ] Object 0: handle = 0xcb1c7c000000001b, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x23e43bb7 | Vertex shader consumes input at location 0 but not provided
Mesh triangle vertex successfully loaded
WARN: Material file [ monkey_smooth.mtl ] not found in a path : 
Failed to load material file(s). Use default material.
material [ 'None' ] not found in .mtl

[ERROR: Validation]
Validation Error: [ VUID-vkDestroyPipelineLayout-pipelineLayout-parameter ] Object 0: handle = 0x562b5d1e7730, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x3456cf9c | Invalid VkPipelineLayout Object 0x6f736a5f7465675f. The Vulkan spec states: If pipelineLayout is not VK_NULL_HANDLE, pipelineLayout must be a valid VkPipelineLayout handle (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyPipelineLayout-pipelineLayout-parameter)
[ERROR: Validation]
Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0x6f736a5f7465675f, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x5d6b67e2 | Couldn't find VkPipelineLayout Object 0x6f736a5f7465675f. This should not happen and may indicate a bug in the application.
[ERROR: Validation]
Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0x6f736a5f7465675f, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x5d6b67e2 | Couldn't find VkPipelineLayout Object 0x6f736a5f7465675f. This should not happen and may indicate a bug in the application.
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyImageView-imageView-parameter ] Object 0: handle = 0x562b5d1e7730, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xe0208096 | Invalid VkImageView Object 0x967dd1000000000e. The Vulkan spec states: If imageView is not VK_NULL_HANDLE, imageView must be a valid VkImageView handle (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyImageView-imageView-parameter)
[ERROR: Validation]
Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0x967dd1000000000e, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x5d6b67e2 | Couldn't find VkImageView Object 0x967dd1000000000e. This should not happen and may indicate a bug in the application.
[ERROR: Validation]
Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0x967dd1000000000e, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x5d6b67e2 | Couldn't find VkImageView Object 0x967dd1000000000e. This should not happen and may indicate a bug in the application.
[ERROR: Validation]
Validation Error: [ VUID-vkDestroyImage-image-parameter ] Object 0: handle = 0x562b5d1e7730, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x18c56777 | Invalid VkImage Object 0xe88693000000000c. The Vulkan spec states: If image is not VK_NULL_HANDLE, image must be a valid VkImage handle (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyImage-image-parameter)
[ERROR: Validation]
Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0xe88693000000000c, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x5d6b67e2 | Couldn't find VkImage Object 0xe88693000000000c. This should not happen and may indicate a bug in the application.
[ERROR: Validation]
Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0xe88693000000000c, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x5d6b67e2 | Couldn't find VkImage Object 0xe88693000000000c. This should not happen and may indicate a bug in the application.
zsh: segmentation fault (core dumped)  ./vulkanProject

and it only works when run from a terminal for some reason

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.