When you realize how dumb a bug is...

Started by
150 comments, last by Juliean 7 years, 5 months ago

I've had an SSD that was failing to be recognized for weeks, and before I shipped it back (Filled out the RMA and got a label), windows updates turned off my computer.

When I booted it up, the SSD was working fine. I just needed to power cycle the SSD to fix it, and i hadn't even turned off my computer in weeks.

Why would you leave your PC on for weeks continously anyway? ^^

Advertisement

I've had an SSD that was failing to be recognized for weeks, and before I shipped it back (Filled out the RMA and got a label), windows updates turned off my computer.

When I booted it up, the SSD was working fine. I just needed to power cycle the SSD to fix it, and i hadn't even turned off my computer in weeks.

Why would you leave your PC on for weeks continously anyway? ^^

Nightly backups and use as build slave/helper for distributed builds?

Why would you leave your PC on for weeks continously anyway? ^^

I restart mine maybe once every couple of months (i.e. when an update forces me to restart). Otherwise it is just placed in sleep mode.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Why would you leave your PC on for weeks continously anyway? ^^

I restart mine maybe once every couple of months (i.e. when an update forces me to restart). Otherwise it is just placed in sleep mode.

I keep a desktop on in the cupboard 24/7 to act as mail server and git server and a few more things. Same as swiftcoder though I only sleep my pc and restart it when I really must...

So I was switching over one of the libraries i use from a prebuilt dynamic DLL to a static library (that I was pulling and building/linking against directly). Everything compiled and linked successfully, but whenever I ran it I would get crashes deep inside standard runtime libraries! I was building and rebuilding and changing settings and trying to figure it out for a couple days, frustratingly to no avail. Finally (I should have done this sooner), I started following the include links in the IDE and noticed that it was still including the old precompiled headers. The functions all existed so I didn't get any errors during build, but a lot of the signatures and parameters had changed so it wasn't calling things correctly!

Grr, note to self, when changing library versions, just rename the old directory (or delete it entirely) to make sure it's not getting included by accident. XD

unsigned int x, y;
.
.
.
for( y == bmp->height-1; y >= 0; y-- ){
.
.
.
}


This one got me 16 years ago, I believe this one was my very first head banging frustration session we coders have come to embrace as an significant part of our life. (I was quite new to coding at the time.)

unsigned int x, y;
.
.
.
for( y == bmp->height-1; y >= 0; y-- ){
.
.
.
}


This one got me 16 years ago, I believe this one was my very first head banging frustration session we coders have come to embrace as an significant part of our life. (I was quite new to coding at the time.)

These bugs are the worst. Just yesterday I wrote:


// squirrel script

local x = 42

if( x = position || falling ) {
   // do something
}

I just look right over the bug and usually don't find it until I start adding logging statements that don't make sense

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532

Spent 3 hours trying to figure out why my pixel shader was not producing expected results. I forgot to set the vertex declaration for my screen quad vertex buffer for post processing a texture...

Today, at work I wrote code equivalent to this and spent over an hour debugging why username was randomly becoming empty. FML


// LPCWSTR username
if(username) {
	AutoPtr<WCHAR> ptrUsername = wcsdup(username); // cannot modify const so we duplicate
	username = removeLeadingWhitespace(ptrUsername.get()); // modifies
	username = removeTrailingWhitespace(username); // modifies
}
// use username sometime later

Wasted an entire day wondering why the heck graphics weren't being loaded. I examine RAM, the data is there. I look at the code in a debugger and it's indeed executing in the subroutines it should. I look at the code that sends the commands to the video hardware, pointers are OK, then I step and the loop is running, yet somehow the video hardware is ignoring them... wait a second, did an instruction just get misassembled?

This:


cmp.l a4, a5

became:


cmpm.l (a4)+, (a5)+

Huuuuh not only it got converted to the wrong instruction (CMPM instead of CMPA), where did the assembler get the idea of adding postincrement?

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

This topic is closed to new replies.

Advertisement