blurrypiano / littleVulkanEngine

Code repo for video tutorial series teaching Vulkan and computer graphics
MIT License
829 stars 147 forks source link

Tutorial 03 & 04 - Read Access Violation / nullptr | VS19 #14

Closed NoxFly closed 2 years ago

NoxFly commented 2 years ago

Hello, After doing the tutorial 3 & 4, even the 5, an issue persists in VS19.

in pipeline.cpp :: createGraphicsPipeline :

if (vkCreateGraphicsPipelines(lveDevice.device(), VK_NULL_HANDLE, 1, &pipelineInfo, nullptr, &graphicsPipeline) != VK_SUCCESS) {
    throw std::runtime_error("Failed to create graphics pipeline");
}

Then :

# -- in the console --
Exception thrown at 0x00007FF9C850737B (nvoglv64.dll) in VulkanDemo.exe: 0xC0000005: Access violation reading location 0x0000000000000066.
# -- in a popup, next to the corresponding line --
read access violation : rpstate->_Ptr was nullptr.

I've fixed the self-referencing structure issue, and I've done the t05, but this issue has not been fixed.

If you want more (or specific) code, just ask me.

NoxFly commented 2 years ago

Fixed. Caused by a stupid issue :

shaderStages[1].module in the defaultPipelineConfigInfo method was getting the vertex module, not the shader one.

The compiler passed that, but crashed after for another thing.