Weird ass thing

Discuss programming topics for any language, any source base. If it is programming related but doesn't fit in one of the below categories, it goes here.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Weird ass thing

Post by revelator »

yip int is not same size in 64 bit :) intptr_t seemed to have done the trick might have been an oversight from mh when he created it,
but im not quite sure why Windows 7's 32 bit vm doesnt handle this as a 32 bit executable when it is. The engine itself is 32 bit but running on Windows 7 64 bit.
Ill probably run into more snags like that since im rewriting the entire renderer with vertex arrays / vbo / fbo and the unholy Trinity itself :lol:
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Weird ass thing

Post by revelator »

Hrmm Theres definatly a null pointer somewhere in there cause now i get errors from the debugger saying that it cannot execute memory area 0x000000 but it fails to point me to where in the code this might be the case, instead i get a pointer to an unknown function argh :evil:
i removed libpng since the last release seems to also piss of win7 with an error in fread.
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Weird ass thing

Post by revelator »

Ok the plot thickens i just recompiled Doom3 and its also crashing and i know for a fact that it Worked flawlessly before my reinstall :shock: in fact the exe compiled before the reinstall Works without a hitch
and i havent changed anything in the code so something is fishy. Strange thing the new compile gained about 0.1mb in size so its definatly linking in something it didnt before.
Productivity is a state of mind.
Labman
Posts: 62
Joined: Fri Nov 05, 2004 2:39 am
Location: Brisbane, Australia
Contact:

Re: Weird ass thing

Post by Labman »

I was just looking at a similar crash in QMB the other day, after some valgrind work I found a string being allocated without space for a null terminator which was clobbering the malloc header data and causing malloc to die the next time it was called.

Valgrind is an awesome tool and well recommended if you can use it. I managed to clean up a heap of dodge memory stuff.

I followed it up by testing out some static analysis tools (clang's and cppcheck) which found some more crappy code including some poor skybox loading code which would find skyboxes with uncommon naming standards but then fail to load them. The static analysis tools would be good for finding your null pointer dereference.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Weird ass thing

Post by revelator »

I use clang and cpp extensively :) they found nothing unfortunatly. valgrind does not Work right on Windows yet though Work on that is being done, atm im using drmemory which does much the same as valgrind.
The bug was a borked Windows install :lol: i swear i newer imagined a broken install could fuck up so many Things but soon after it broke my own code several other Things on my pc started behaving weirdly and ultimatly i had to reinstall.
Productivity is a state of mind.
Post Reply