this post was submitted on 14 Aug 2023
202 points (93.5% liked)

Programmer Humor

31224 readers
70 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 10 months ago* (last edited 10 months ago)

Today, I had a weird issue: A program I worked on for hours would compile and do the (test-) output it was supposed to do. But if I'd declare and initialize another variable (unused), it would be stuck in an endless loop.

It would only happen with an initialized variable, not with simply declared variables.

Took me until this evening in my bed to realize that I probably am using another uninitialized variable somewhere in my code and that's the source of this bug.