Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / WTF?? cam pos at -2147483648, -2147483648, -2147483648

Author
Message
prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 1st Aug 2009 19:42
This now happens (but only randomly, and sometimes it does work) and camera just goes to -2147483648, -2147483648, -2147483648 (signed 32 bit integer, the lowest), i have absolutely NO idea why and it started happening when I added health which doesn't affect the player's position WHATSOEVER!! Has anyone else had this problem before?


Your signature has been erased by a mod

Attachments

Login to view attachments
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 1st Aug 2009 20:10 Edited at: 1st Aug 2009 20:13
Ive never seen that myself.. all I can suggest is putting a watch on the variable(right click, select "Add Watch") and place breakpoints at all the places in your program that it's value is passed or changed and, both before and after the change, and check what is happening to it.

Good Luck, that bug looks like a pain in the butt kind..

Edit : How are you manipulating you health value ? are you using pointers ? Im thinking is there any chance that anywhere in your program you could be overwriting memory somewhere, it could explain the random nature, might be overwriting very small amounts, not causing and serious damage, enough to crash, but little glitches like that. Just thinking out loud..

If it ain't broke.... DONT FIX IT !!!
prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 1st Aug 2009 20:18
It doesn't do it in debug mode, but fortunately, I worked out what the problem is (yes I went through > 1000 lines) it turns out that one of my variables "gravity" is not set at the beginning and has a VERY low value, making it do that. The thing is, it hasn't done it ever before and I didn't change any of the gravity code :S but the good thing it's fixed now

TOP TIP: INITIALIZE ALL VARIABLES WHEN YOU MAKE THEM


Your signature has been erased by a mod

Login to post a reply

Server time is: 2024-10-01 08:47:13
Your offset time is: 2024-10-01 08:47:13