rendy icon indicating copy to clipboard operation
rendy copied to clipboard

Crashes on failed assertion in Frames::wait_complete on Windows with Vulkan backend

Open bonsairobo opened this issue 5 years ago • 8 comments

https://github.com/amethyst/rendy/blob/c3841966b387adf5e27b265b772b7f6c49e7a780/frame/src/frame.rs#L153

This happens on the first attempt at drawing a frame in my application that runs perfectly on Mac/Metal.

bonsairobo avatar May 24 '19 03:05 bonsairobo

What value ready has?

zakarumych avatar May 24 '19 06:05 zakarumych

Err(DeviceLost(DeviceLost))

bonsairobo avatar May 25 '19 07:05 bonsairobo

This is unfortunate. Device lost shouldn't typically happen, but we must handle it anyway.

zakarumych avatar May 25 '19 09:05 zakarumych

Device lost probably caused by invalid memory access on gpu. So while rendy will propagate this error instead of panicking, you should fix what casusing it

zakarumych avatar May 25 '19 09:05 zakarumych

I'm not very experienced at debugging GPU problems, but I'm looking at my application with RenderDoc. It looks like I'm able to finish drawing 3 frames (which is the number of images in my swapchain). The last Vulkan API call made before crashing is vkQueuePresentKHR. I'd appreciate any help you could give me with debugging this.

bonsairobo avatar May 26 '19 05:05 bonsairobo

The problem is not always manifests itself in renderdoc, until logical device become broken and DeviceLost error is returned.

Do you have validation layers available? They usually is able to catch problems that may cause loosing device.

You alos may ask help on amethyst discord rendering channel linking your code for review.

zakarumych avatar May 26 '19 06:05 zakarumych

The validation layer tells me that I wasn't properly aligning my uniform buffers. It's fixed now.

bonsairobo avatar Jun 02 '19 23:06 bonsairobo

@bonsairobo glad you figured it out. But let make this open until this function panics on DeviceLost instead of returning error.

zakarumych avatar Jun 03 '19 07:06 zakarumych