remedybg-issues icon indicating copy to clipboard operation
remedybg-issues copied to clipboard

Setting a breakpoint and stepping/continuing reliably crashes the program being debugged

Open scallyw4g opened this issue 6 months ago • 0 comments

Remedy version : 0.4.0.5

Hello! I just wanted to say thanks for making Remedy -- I use it every day and I love it!

I've been experiencing this bug intermittently for a long time (probably multiple years at this point), but I've never been able to nail down a stable repro for it. Today I finally managed to find a reliable reproduction for it. I believe it to be caused by a combination of multiple threads hammering on a function in a DLL .. or at least that's the best I've got to go on.

Steps to reproduce:

  1. Download bonsai (my game-engine side-project)
  2. Checkout branch jesse/debug/remedy_repro (commit 83e4e3c3b8b027234a1767f4e9ac3e7da1da99d8)
  3. (optional) Run ./remedy_repro.make.sh (this runs a debug build for the targets to repro the issue)
  4. Open remedy_repro.rdbg
  5. Hit F5
  6. Wait a few seconds (maybe tens of seconds) while a bunch of processing happens
  7. Once the window shows .. stuff .. hit F1, and click the "Memory" tab on the screen
  8. Set a breakpoint in WriteToMetaTable
  9. Step, or continue, a few times (once is usually enough on my machine w/ 10 threads) and the program should crash

Now, I'm like 98% sure that crash is caused by Remedy. I'm not totally, 100% sure it's not a bug in my program, because I do not understand why it is crashing. I've been experiencing these crashes for a long time and tried to analyze the state of the program to figure out what's gone wrong. I think Remedy silently inserts extra instructions and somehow that process, under certain conditions, corrupts the instruction stream.. maybe ..? Anyhow that's my wild stab in the dark.

I've also committed the binaries I'm using on my local machine to that repo so you can skip the build, in case that's helpful.

Happy to provide any additional assistance or information I can

scallyw4g avatar Aug 21 '24 21:08 scallyw4g