CodyIT@programming.dev to Programmer Humor@programming.devEnglish · 5 days agoThe biggest mystery known to mankindprogramming.devimagemessage-square44linkfedilinkarrow-up1738arrow-down118
arrow-up1720arrow-down1imageThe biggest mystery known to mankindprogramming.devCodyIT@programming.dev to Programmer Humor@programming.devEnglish · 5 days agomessage-square44linkfedilink
minus-squareatopi@piefed.blahaj.zonelinkfedilinkEnglisharrow-up16·4 days agoa while ago, during a game jam, while i was making some of the worst gdscript i have ever seen, i have encountered a bug after adding a print to see the value of a variable, the bug disappeared. Confused, i commented out the line i just added. The bug was still fixed i removed the comment. The bug reappeared
minus-squareWillem@kutsuya.devlinkfedilinkarrow-up3·4 days agoprinting to a console could enforce a flush, sync thread or other shenanigans. usually setting a breakpoint would have the same effect and gives me the suggestion of a threading issue.
minus-squareatopi@piefed.blahaj.zonelinkfedilinkEnglisharrow-up3·4 days agothe problem wasnt that the print statement fixed the bug the problem was that even if i removed the print statement and added a comment on that line, the bug would also be fixed
a while ago, during a game jam, while i was making some of the worst gdscript i have ever seen, i have encountered a bug
after adding a print to see the value of a variable, the bug disappeared. Confused, i commented out the line i just added. The bug was still fixed
i removed the comment. The bug reappeared
printing to a console could enforce a flush, sync thread or other shenanigans.
usually setting a breakpoint would have the same effect and gives me the suggestion of a threading issue.
the problem wasnt that the print statement fixed the bug
the problem was that even if i removed the print statement and added a comment on that line, the bug would also be fixed