[QUERY] [BUG] Validation Layer Error with Semaphores : Vulkan

VUID-vkQueueSubmit-pCommandBuffers-00065(ERROR / SPEC): msgNum: 1901485743 - Validation Error: [ VUID-vkQueueSubmit-pCommandBuffers-00065 ] Object 0: handle = 0xe7e6d0000000000f, type = VK_OBJECT_TYPE_SEMAPHORE; Object 1: handle = 0x21a67d3c3e0, type = VK_OBJECT_TYPE_QUEUE; Object 2: handle = 0x21a67d3c3e0, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0x71565eaf | vkQueueSubmit(): pSubmits[0].pSignalSemaphores[0] (VkSemaphore 0xe7e6d0000000000f[]) is being signaled by VkQueue 0x21a67d3c3e0[], but it was previously signaled by VkQueue 0x21a67d3c3e0[] and has not since been waited on.
The Vulkan spec states: Any calls to vkCmdSetEvent, vkCmdResetEvent or vkCmdWaitEvents that have been recorded into any of the command buffer elements of the pCommandBuffers member of any element of pSubmits, must not reference any VkEvent that is referenced by any of those commands in a command buffer that has been submitted to another queue and is still in the pending state (https://vulkan.lunarg.com/doc/view/1.3.296.0/windows/1.3-extensions/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00065)
    Objects: 3
       [0]  0xe7e6d0000000000f, type: 5, name: NULL
       [1]  0x21a67d3c3e0, type: 4, name: NULL
       [2]  0x21a67d3c3e0, type: 4, name: NULL
VUID-vkQueueSubmit-pCommandBuffers-00065(ERROR / SPEC): msgNum: 1901485743 - Validation Error: [ VUID-vkQueueSubmit-pCommandBuffers-00065 ] Object 0: handle = 0xe7e6d0000000000f, type = VK_OBJECT_TYPE_SEMAPHORE; Object 1: handle = 0x21a67d3c3e0, type = VK_OBJECT_TYPE_QUEUE; Object 2: handle = 0x21a67d3c3e0, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0x71565eaf | vkQueueSubmit(): pSubmits[0].pSignalSemaphores[0] (VkSemaphore 0xe7e6d0000000000f[]) is being signaled by VkQueue 0x21a67d3c3e0[], but it was previously signaled by VkQueue 0x21a67d3c3e0[] and has not since been waited on.
The Vulkan spec states: Any calls to vkCmdSetEvent, vkCmdResetEvent or vkCmdWaitEvents that have been recorded into any of the command buffer elements of the pCommandBuffers member of any element of pSubmits, must not reference any VkEvent that is referenced by any of those commands in a command buffer that has been submitted to another queue and is still in the pending state (https://vulkan.lunarg.com/doc/view/1.3.296.0/windows/1.3-extensions/vkspec.html#VUID-vkQueueSubmit-pCommandBuffers-00065)
    Objects: 3
        [0] 0xe7e6d0000000000f, type: 5, name: NULL
        [1] 0x21a67d3c3e0, type: 4, name: NULL
        [2] 0x21a67d3c3e0, type: 4, name: NULL
{Create materialIdx - color: }: {0 0 0 0 0}
{Get materialIdx - color: }: {0 0 0 0 0}
{Get materialIdx - color: }: {0 0 0 0 0}
{Get materialIdx - color: }: {0 0 0 0 0}
{Get materialIdx - color: }: {0 0 0 0 0}
{Get materialIdx - color: }: {0 0 0 0 0}
VUID-vkAcquireNextImageKHR-surface-07783(ERROR / SPEC): msgNum: -1391585802 - Validation Error: [ VUID-vkAcquireNextImageKHR-surface-07783 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SWAPCHAIN_KHR; | MessageID = 0xad0e15f6 | vkAcquireNextImageKHR():  Application has already previously acquired 2 images from swapchain. Only 2 are available to be acquired using a timeout of UINT64_MAX (given the swapchain has 3, and VkSurfaceCapabilitiesKHR::minImageCount is 2).
The Vulkan spec states: If forward progress cannot be guaranteed for the surface used to create the swapchain member of pAcquireInfo, timeout must not be UINT64_MAX (https://vulkan.lunarg.com/doc/view/1.3.296.0/windows/1.3-extensions/vkspec.html#VUID-vkAcquireNextImageKHR-surface-07783)
    Objects: 1
        [0] 0xfab64d0000000002, type: 1000001000, name: NULL
VUID-vkAcquireNextImageKHR-surface-07783(ERROR / SPEC): msgNum: -1391585802 - Validation Error: [ VUID-vkAcquireNextImageKHR-surface-07783 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SWAPCHAIN_KHR; | MessageID = 0xad0e15f6 | vkAcquireNextImageKHR():  Application has already previously acquired 2 images from swapchain. Only 2 are available to be acquired using a timeout of UINT64_MAX (given the swapchain has 3, and VkSurfaceCapabilitiesKHR::minImageCount is 2).
The Vulkan spec states: If forward progress cannot be guaranteed for the surface used to create the swapchain member of pAcquireInfo, timeout must not be UINT64_MAX (https://vulkan.lunarg.com/doc/view/1.3.296.0/windows/1.3-extensions/vkspec.html#VUID-vkAcquireNextImageKHR-surface-07783)
    Objects: 1
       [0]  0xfab64d0000000002, type: 1000001000, name: NULL
VUID-vkAcquireNextImageKHR-surface-07783(ERROR / SPEC): msgNum: -1391585802 - Validation Error: [ VUID-vkAcquireNextImageKHR-surface-07783 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SWAPCHAIN_KHR; | MessageID = 0xad0e15f6 | vkAcquireNextImageKHR():  Application has already previously acquired 2 images from swapchain. Only 2 are available to be acquired using a timeout of UINT64_MAX (given the swapchain has 3, and VkSurfaceCapabilitiesKHR::minImageCount is 2).
The Vulkan spec states: If forward progress cannot be guaranteed for the surface used to create the swapchain member of pAcquireInfo, timeout must not be UINT64_MAX (https://vulkan.lunarg.com/doc/view/1.3.296.0/windows/1.3-extensions/vkspec.html#VUID-vkAcquireNextImageKHR-surface-07783)
    Objects: 1
        [0] 0xfab64d0000000002, type: 1000001000, name: NULL
VUID-vkAcquireNextImageKHR-surface-07783(ERROR / SPEC): msgNum: -1391585802 - Validation Error: [ VUID-vkAcquireNextImageKHR-surface-07783 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SWAPCHAIN_KHR; | MessageID = 0xad0e15f6 | vkAcquireNextImageKHR():  Application has already previously acquired 2 images from swapchain. Only 2 are available to be acquired using a timeout of UINT64_MAX (given the swapchain has 3, and VkSurfaceCapabilitiesKHR::minImageCount is 2).
The Vulkan spec states: If forward progress cannot be guaranteed for the surface used to create the swapchain member of pAcquireInfo, timeout must not be UINT64_MAX (https://vulkan.lunarg.com/doc/view/1.3.296.0/windows/1.3-extensions/vkspec.html#VUID-vkAcquireNextImageKHR-surface-07783)
    Objects: 1
       [0]  0xfab64d0000000002, type: 1000001000, name: NULL
{ERROR}: {Errr... Vulkan Error is: {1}}
The program '[556] main.exe' has exited with code 0 (0x0).

Hi all,
I was debugging an engine from https://www.youtube.com/@Cakez77.

However, after I recompiled the engine, there were a huge number of errors and the Vulkan Validation error was VK_NOT_READY = 1.

May I ask what could have gone wrong with the semaphores?

And how to debug it?

Thank you.