Dumbest mistake you have ever made

Programming, for all ages and all languages.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: Dumbest mistake you have ever made

Post by earlz »

Wow.. been there done that. lol..

Makes me think of one time I was having severe trouble with my OS randomly failing on trying to do userspace multithreaded stuff.. After debugging for a few days I finally figured it out. I went to crt0.asm and found

Code: Select all

;...
mov ebx,0
mov [ebx],10 ;test if page faults work

call _main
;....
bitshifter
Member
Member
Posts: 50
Joined: Sun Sep 20, 2009 4:03 pm

Re: Dumbest mistake you have ever made

Post by bitshifter »

Recently dumbest...

Code: Select all

mov ds,[g_segment1]
mov es,[g_segment2]
Took me two days to find that one :(
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: Dumbest mistake you have ever made

Post by thepowersgang »

Recently I found a bug in my FAT directory code that had been there for about four years.

Code: Select all

if(disk->bootsect.spc == 1)
	offset += (dirpos / 16);
else
	offset += (dirpos / 16) % disk->bootsect.spc;
(The problem is that if SPC == 1, it's treated as SPC == 2, so when I directory is > 1 cluster with 512-byte clusters it will read junk)
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
ATC
Member
Member
Posts: 45
Joined: Sun Jan 24, 2010 9:27 am

Re: Dumbest mistake you have ever made

Post by ATC »

It was probably when I first started programming, and was trying to write a "game" with DirectX9. I had only been programming about 2 months, and got the bright idea that I should introduce some good ol' multi-threading to my project. All the "game" did was let you throw and push some boxes around on terrain and look at the 'pretty' physics. I don't remember quite how the code worked, but I basically set it up so EVERY box's collision detection had its own thread (and some hideous recursions). Problem was, you could create unlimited amounts of boxes, and there was no disabling on idle ones. To make a long story short, after playing with it for 2-3 minutes my computer first froze with a sound effect being played hundreds of times a second. This quickly turned into a blue screen of death then to a black screen with the ominous "Dumping physical memory". I absolutely PANICKED! :lol: Needless to say, I basically trashed all of that code and thanked my lucky stars that I didn't destroy anything. I was on edge for quite a while after that one. :roll: LOL!
There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. - Jeremy S. Anderson
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Dumbest mistake you have ever made

Post by bluemoon »

In the old days when I was fresh, I'm debugging a weird crash of my server program running on BSD, the program crash kinda randomly;
and it turns out that the crash is due to my attempt to debug - I'm overwriting the image and causing "bus error" XD.

It took me a week of debugging going thru' the code inside out, and then I realized it don't crash in holiday, and learnt it the hard way.
this incident still give a good laugh when I talk to my friends.
arjo129
Posts: 21
Joined: Mon May 03, 2010 10:19 pm
Location: Asia, Planet Earth, Solar system, Milky way

Re: Dumbest mistake you have ever made

Post by arjo129 »

Mine was even worse, I speant a whole 2 years working on a kernel and finally when I compiled it, it showed a black screen. It took me 2 days to figure out that I forgot to call the main shell.
Zephirum OS- Super secure http://code.google.com/p/zephirum-server/
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
crossedeyefreak
Posts: 6
Joined: Sun Nov 28, 2010 2:56 pm

Re: Dumbest mistake you have ever made

Post by crossedeyefreak »

I never called a string into the VGA memory.
Post Reply