Vector35 / Vector35/debugger

Crash when stepping and quiting at the same time

Open
#389 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug crash Impact: High memory & concurrency
Dominant language
C++
Stars
331
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Here is a new issue that gets exposed after I fix the hang issue. Steps to reproduce:

  1. Launch helloworld in debugger
  2. Hold F7 (Step into) and do not release it
  3. Use mouse to click the Quit button
  4. Observe the crash (sometimes it hangs, though)

This is not easy to trigger, since the timing window is narrow. It seems to me that one must hold the F7 button for a while and do not release it. Otherwise, this cannot be triggered. This is unlikely to happen during normal use of the debugger.

Relevant sequence of events:

  1. Step into on HLIL, the thread executes DebuggerController::StepIntoIL
  2. Quit
  3. While stepping into in HLIL takes some time to process (before the step into request is send to the adapter), the quit operation succeeds and all of its callback gets called.
  4. One of the callback sets m_liveView to nullptr
  5. DebuggerController::StepIntoIL tries to access m_liveView without checking whether it is nullptr

Contributor guide

No contributing guide indexed for this repository

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 at DebuggerController::StepIntoIL and trace the quit callbacks that set m_liveView to nullptr while the HLIL step request is pending. Reproduce by holding F7 while quitting the helloworld session, then verify that the debugger no longer crashes or hangs when the operations overlap.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools, reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.