Skip to content

Synchronisation problem? #54

@jdf-id-au

Description

@jdf-id-au

Hi, thanks for the wonderful introductions to Vulkan in LWJGL.

To prevent the following error when runnning InstancedSpheresDemo.java, I need to put Thread.sleep(40); before vkQueueWaitIdle(queue);:

[mvk-warn] VK_TIMEOUT: vkQueueWaitIdle timed out after 10 frames while awaiting 1 swapchain image presentations to complete.
ERROR OCCURED: VK_TIMEOUT: vkQueueWaitIdle timed out after 10 frames while awaiting 1 swapchain image presentations to complete.
libc++abi: terminating due to uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument

I don't think it's specific to this demo, this is just an example. I'm only starting to learn the Vulkan API so can't quite work out whether perhaps Host access to queue must be externally synchronised is violated, or there is some other reason for the timeout.

I'm using the JVM flag -XstartOnFirstThread because I'm on macOS; could that be relevant?

(repo revision, Vulkan 1.3.268.1 (MoltenVK), Java 17.0.4, macos 14.1.2, Intel Xeon W, Radeon Pro Vega 56)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions