Running in a debugger changes the way a program runs. Sometimes it causes problems like this, where you see a bug outside the debugger but can't reproduce it inside.

The usual ways to find such...