Page 2 of 2
Re: Your biggest OSdev /facepalm moment
Posted: Tue Mar 03, 2009 3:47 am
by pcmattman
nekros: I was about to say "Just find + replace" but then I remembered ASM comments are usually semicolons
Re: Your biggest OSdev /facepalm moment
Posted: Tue Mar 03, 2009 6:17 am
by Solar
Hmmm...
One for the regex masters: search all semicolons that
- don't end the line and
- don't follow a "for("
...and replace them with //. If that doesn't do the trick, your C++ style sucks.
Re: Your biggest OSdev /facepalm moment
Posted: Tue Mar 03, 2009 12:10 pm
by nekros
It was already fixed when I wrote this.
Re: Your biggest OSdev /facepalm moment
Posted: Tue Mar 03, 2009 3:42 pm
by neon
The several times that I posted looking for help only to find and solve the problem 5 minutes later after posting.
Re: Your biggest OSdev /facepalm moment
Posted: Tue Mar 03, 2009 3:53 pm
by nekros
Funny when you ask something out loud you end up answering it the moment you finish your sentence.
Re: Your biggest OSdev /facepalm moment
Posted: Tue Mar 03, 2009 9:03 pm
by nekros
I think I just experienced the biggest one on my record yet. Bootloader, was being screwy because I set sp to the start of the stack...
Re: Your biggest OSdev /facepalm moment
Posted: Sat Apr 25, 2009 3:46 am
by Ferrarius
spending over an hour trying to locate a mistake in the IDT or any other code, only to find out I didn't correctly remap the second PIC.
Re: Your biggest OSdev /facepalm moment
Posted: Sat Apr 25, 2009 5:27 am
by pcmattman
neon wrote:The several times that I posted looking for help only to find and solve the problem 5 minutes later after posting.
I'm in that boat. It's like posting the question is a catalyst for the answer to come...
Re: Your biggest OSdev /facepalm moment
Posted: Sat Apr 25, 2009 5:35 am
by PHPnerd
Some time ago, with my previous PMM, I got always no pages. Have been searching for 2 weeks. Problem was in find free frame function
Code: Select all
uint32_t *bitmap; // is initialized, dont worry :P
uint32_t bitmapSize; // in bits
uint32_t i = 0;
for(i = 0; i <(bitmapSize >> 3); i++)
{
if(bitmap[i] != 0xffffffff) // have != here, so when some bit is empty, it skips it!!!, and when all full, next statement checks where empty bit is, but its nowhere.
continue; // fast break if full
if() // do rest stuff, search through 32 bit finding empty one
}
really stupid
// PHPnerd
Re: Your biggest OSdev /facepalm moment
Posted: Sat Apr 25, 2009 9:56 pm
by earlz
using code insertion on my IRQ handlers and injecting 'mov al,0x...' after the 'popa'
Re: Your biggest OSdev /facepalm moment
Posted: Thu May 14, 2009 8:26 pm
by NickJohnson
I setup a special linking script and code that would collect all of the init code in my kernel and free it after everything was set up. Unfortunately, in my overzealous marking for deletion, I made it get rid of the main loop, so when the freeing function returned... kpow! Somehow this took me three hours to figure out.
Or, equally dumb: I had my GDT being loaded before I switched on paging, and it was still in lower memory. I could unmap the kernel image that was in lower memory, but whenever I did an interrupt, it would reload the segments, not find an actual GDT, and triple fault. I kept looking through my memory manager to try and figure out where the heck it was faulting, when the actual problem was in the first ten instructions in the kernel.
Re: Your biggest OSdev /facepalm moment
Posted: Wed Jun 03, 2009 9:55 pm
by alethiophile
I initialized some space for a disk address packet to 0xdeadbeef so I could find it in a hex editor, then wondered why my read_sectors kept saying 'LBA out of range'.
Re: Your biggest OSdev /facepalm moment
Posted: Wed Jun 03, 2009 10:20 pm
by Troy Martin
Ye gods, this could be a five-page post
One of them would be accidentally adding a * before a variable name. Unexpected output was everywhere. In the form of divide errors. Unfortunately I don't have a screenshot...
Re: Your biggest OSdev /facepalm moment
Posted: Wed Jun 03, 2009 11:57 pm
by pcmattman
The other day:
Code: Select all
void assert(bool b)
{
ERROR("Assertion failed.");
Processor::breakpoint();
}
Took me a while to figure out why all my assertions were failing