Page 1 of 1

Of all addresses...

Posted: Sat Apr 24, 2004 5:42 pm
by DCrazy
Even you non-programmers will get a kick of out this.

I compiled a an application that worked in Visual C++ 6 in a new copy of Visual Studio 2003. Unfortunately, the program didn't work; it died with an access violation. Here's the error message:

Unhandled exception at 0x77d6d9b2 in InstallStream.exe: 0xC0000005: Access violation reading location 0xbaadf00d.

:lol:

Posted: Sat Apr 24, 2004 5:43 pm
by fliptw
heh.

Posted: Sat Apr 24, 2004 5:47 pm
by Lothar
I assume the baadf00d had been purged...

Posted: Sat Apr 24, 2004 5:48 pm
by DCrazy
Apparently 0xbadf00d has some sort of significance on the heap after all. Figures, since I was passing a pointer to a struct on the heap to a WinAPI function. I must be doing something wrong. Pretty funny nonetheless.

Posted: Sat Apr 24, 2004 5:55 pm
by Drakona
Whoa! I heard the explanation for this from my data structures teacher a few years ago, but had never seen it actually happen. He had worked for Microsoft for 17 years and told us all that it's an internal practice to set uninitialized data to "BAADF00D"--making uninitialized variable errors easier to find. (Or was it dangling pointers? I can't now remember--ir's been a while.)

Posted: Sat Apr 24, 2004 6:07 pm
by DCrazy
Hmm... something must have changed between VC6 and VS 2003 and I'm not setting a field of PROPSHEETHEADER that I need to. Thanks Drakona! :)

Posted: Sat Apr 24, 2004 6:15 pm
by Ferno
stop feeding it with taco hell code DC. :P

Posted: Sat Apr 24, 2004 6:28 pm
by DCrazy
How ironic, I was eating Taco Bell while writing the code... damn gorditas, got my code sick.

Posted: Sat Apr 24, 2004 7:38 pm
by Dedman
Yeah, those little fat girls will do it to you every time.

Posted: Sat Apr 24, 2004 10:03 pm
by Zoop!
Mmm...gorditas

Posted: Sun Apr 25, 2004 3:12 am
by Sage
are gorditas any good? never had them. anyways gl on you proggy. what is it anyways?

Posted: Sun Apr 25, 2004 9:09 am
by DCrazy
Gorditas literally translate as the feminine form of "little fatties". That's what they are, really; chock full o' beef (or chicken, which I prefer), lettuce, tomato, onion, cheese, and sour cream. They had actually taken them off the menu in the NY area for a while, but popular opinion forced them back. :)

My program is a custom installer for distributing a huge RAR file across my school's network. We need it to transfer data to play CS at LAN parties. :)

Posted: Sun Apr 25, 2004 10:38 am
by Krom
mmmm sounds tastey, but CS? blah, play Descent, wouldnt take anywhere near as much data.

Posted: Sun Apr 25, 2004 6:07 pm
by Santrix
mmm, fat little girls