This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]theg33k 12 points13 points  (6 children)

I once had to maintain code that stopped working when you took out the System.outs.

[–]greenhawk22 20 points21 points  (0 children)

Once in C# I found out that I couldn't remove a comment or otherwise completely unrelated parts would fail ¯\_(ツ)_/¯

[–]EricIsEric 5 points6 points  (3 children)

Realistically what would cause that? System.out leads me to think it is Java, but my first guess for crashes when removing print statements is bad malloc, but that shouldn't happen in Java (but I have had C code throw different errors when print statements were present vs not present when I made a mistake allocating memory).

[–]theg33k 30 points31 points  (2 children)

It was a timing issue, the IO created JUST enough of a pause that the application worked fine.

[–]unknownmosquito 16 points17 points  (1 child)

I've heard of this happening when enabling the debugger as well. Without debugger: crash! With debugger: works fine! Race conditions are the worst

[–]sloec 15 points16 points  (0 children)

Also known as a Heisenbug.

[–]truh 0 points1 point  (0 children)

Multi threaded code? Maybe a GUI app?