Embarcadero / Dev-Cpp

A fast, portable, simple, and free C/C++ IDE
https://www.embarcadero.com/free-tools/dev-cpp
GNU General Public License v2.0
2.43k stars 266 forks source link

Variables in debugger may mutate unexpectedly #249

Open danielrcollins1 opened 1 year ago

danielrcollins1 commented 1 year ago

Occasionally variables in the debugger may mutate in unexpected ways. This is unpredictable and not consistently replicable.

It's most commonly observed with a counter variable in a loop incrementing additional times when it shouldn't. This bug seems more likely if the user waits for some amount of time while the debugger is running, without interacting with it.

See linked video for a (1) correct and (2) incorrect performance with the exact same code and input. The bug is first visible at 2:05 into the video, after roughly 30 seconds of the debugger being idle. At this point the variable "count" shows a value in the popup which differs from the debug tab watch. When the debugger steps to the next line, "count" is at the incorrect higher number (and thus saves data at the wrong place in the associated array).

https://youtu.be/-pSdplSw1zo