Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running in release causes validation errors #1065

Open
jonathansty opened this issue Oct 6, 2018 · 6 comments
Open

Running in release causes validation errors #1065

jonathansty opened this issue Oct 6, 2018 · 6 comments

Comments

@jonathansty
Copy link
Contributor

jonathansty commented Oct 6, 2018

When running my vulkano application with cargo run --release I get a validation error:

Validation(ERROR): msg_code: 0:  [ VUID-vkDestroyFence-fence-01120 ] Object: 0xc (Type = 7) | Fence 0xc is in use. The Vulkan spec states: All queue submission commands that refer to fence must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyFence-fence-01120)

When quite I receive a slightly different error but is related to the same issue:

"VUID-vkDestroyFence-fence-01120 Fence 0x2e is in use. The Vulkan spec states: All queue submission commands that refer to fence must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyFence-fence-01120)"

My code isn't doing anything particularly 'smart':

 let fence = previous_frame_end.join(acquire_future)
        .then_execute(gfx_queue.clone(),result).unwrap()
        .then_swapchain_present(gfx_queue.clone(),swapchain.clone(), image_num)
        .then_signal_fence_and_flush();

        match fence {
            Ok(s) => { s.wait(None).unwrap() },
            Err(vulkano::sync::FlushError::OutOfDate) =>{
                recreate_swapchain = true;
            },
            Err(msg) => panic!("{:?}",msg)
        }

        previous_frame_end = Box::new(vulkano::sync::now(device.clone())) as Box<_>;

Weirdly enough in debug mode I do not get these validation messages.

@rukai
Copy link
Member

rukai commented Oct 7, 2018

I'm not sure what the code snippet is for, it looks like one of the alternative workarounds listed in: #955

Its not needed to reproduce this issue however, as the existing triangle example will trigger it.
I thought this validation error was as at least mentioned in an issue somewhere, but github search isn't bringing anything up ¯\(ツ)/¯ Maybe the actual contents of the validation error was never mentioned.

@jonathansty
Copy link
Contributor Author

@rukai It should be similar to #955 . Although I'm not sure why I am receiving this validation error only in a build compiled with the --release option.

Although I'll have a closer look at #955 to see if I can somehow fix this...
In the deferred example I changed following code:

        let after_frame = after_future.unwrap()
            .then_swapchain_present(queue.clone(), swapchain.clone(), image_num)
            .then_signal_fence_and_flush().unwrap();
        previous_frame_end = Box::new(after_frame) as Box<_>;

to this:

        let after_frame = after_future.unwrap()
            .then_swapchain_present(queue.clone(), swapchain.clone(), image_num)
            .then_signal_fence_and_flush().unwrap().wait(None).unwrap();

        previous_frame_end = Box::new(now(device.clone())) as Box<_>;

But still get this validation error. I'm not sure if I just don't understand it correctly or not to be honest.

@jonathansty
Copy link
Contributor Author

I seem to not be able to reproduce this with the new vkDebugUtilsMessengerEXT objects so I'm closing this issue.

I've tried the examples where I was seeing it previously.

@jonathansty
Copy link
Contributor Author

jonathansty commented Oct 12, 2018

Actually spoke too soon, the examples do not show the issue anymore but I'm still seeing this message pop up in my own project.

Edit: examples also still have this problem. None of the examples use any debug validation layers, once I added the standard validation this problem showed up again.

@m4b
Copy link

m4b commented Dec 31, 2018

Ditto seeing this (only) in release mode as well on a project

@rukai
Copy link
Member

rukai commented Dec 31, 2018

I am looking into this atm, still trying to figure out what the correct solution is..

@Rua Rua added the type: bug label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants