KhronosGroup / KhronosGroup/Vulkan-ValidationLayers

Crash when trying to use a command buffer that was freed

Open
#12,159 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
C++
Stars
1k
Forks
505
Avg merge
11h 25m
Merged PRs (30d)
229

Description

TEST_F(NegativeCommand, Test) {
    RETURN_IF_SKIP(Init());

    vk::FreeCommandBuffers(*m_device, m_command_pool, 1, &m_command_buffer.handle());
    m_command_buffer.Begin();
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Test_F(NegativeCommand, Test) case: call Init(), free m_command_buffer with vk::FreeCommandBuffers, then call Begin(). Trace command-buffer lifetime handling in the validation layer and determine why the freed handle reaches a crash. Done means this scenario no longer crashes and the regression is covered by the test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.