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.

DarkBASIC Professional Discussion / Random Crash 1.#QNANO?

Author
Message
Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 18th Nov 2011 07:15
I'm not sure what this could be the result of, but it's haunted me for a good while.

PROBLEM:
Once in a rare while when I do a heavy operation in my gameloop, or spread it out through a few loops, the frame rate severely drops, and about three seconds later the screen turns black.

EXTRA INFO: any coordinates is replaced by 1.#qnano. Someone once told me that it means not a number.

What I'm doing is activating a mob of ai, turning the excludeobject off on each of them, and begin calculating their path to the player. Any help would be greatly appreciated.

The fastfood zombie killer
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 18th Nov 2011 10:05
I don't really feel that something else could be said other than that you.. did something wrong...

Jumping across loops, and getting stuck in one of them with or without sync does similar things. Look at the code until you spot the problem, you can't really do more, maybe try to rem out each game parts and if the problem never occurs that way, then you're gonna know where is the problem.

-In.Dev.X: A unique heavy story based shoot'em ~35%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 18th Nov 2011 21:47
Alrighty, I just don't get it though. It only happens once in a while, making it really hard to try and track down.

The fastfood zombie killer
Agent
21
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 18th Nov 2011 21:56
You get results like this when you do something illegal like divide by zero or mismatch floats with other variable types. Sometimes it's really hard to track this type of bug because any operation involving a NAN (Not A Number) will result in a NAN, meaning the problem might not be the operation in which you're observing a NAN - it might have happened several calculations ago. You'll have to do a logic stepthrough of everything involved in the problematic operation and make sure everything is kosher.

Cybermind
Valued Member
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 19th Nov 2011 00:17
How about fiddling a little with the step-through, see if anything unusual is going on in your program.

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 19th Nov 2011 02:52
For some reason I have never been able to get the step through mode to work for me Unfortunately I have to be back to work in just a min, and will be working again at 7 am, so I don't have time to check on this issue yet Thanks for the advice so far everyone!!!

The fastfood zombie killer
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 19th Nov 2011 05:08
My advice: double check all your divisions, and make sure that it's impossible to divide by zero.

Besides that... what Quel said.

BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 19th Nov 2011 17:08
Also check you aren't using gotos in an unorthodox way (e.g goto out of subroutines)

Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 19th Nov 2011 21:17
Nope, don't use goto

The fastfood zombie killer
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 19th Nov 2011 23:29
Are you using timer based movement? If so posting the code for that would help.

[b]
Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 20th Nov 2011 03:45
I'll try to straighten it out before I put it up, just a sec....ironing...ironing...ironing....

In a nutshell...

ummm.... I may have just found it I'll repost after testing!!!

The fastfood zombie killer

Login to post a reply

Server time is: 2026-07-10 11:25:22
Your offset time is: 2026-07-10 11:25:22