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 / [DarkGDK 2.0] what am i doing wrong?

Author
Message
haliop
User Banned
Posted: 16th Jul 2012 18:27
im using vectors and i get acsses violations which i think causes GDK to crush at some points


here is parts of code obviusly i wont publish the entire code
but if you see something wrong pls help cause im kinda lost

creeps (ai bots) update


bullets update


turrets Update



and in game loop

haliop
User Banned
Posted: 16th Jul 2012 18:30
please help im lost in it!!!!!!
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 16th Jul 2012 18:41 Edited at: 16th Jul 2012 18:41
I can't see anywhere where there's an obvious access violation. You're going to have to find out exactly where it's getting an access violation. Either through breakpoints, or printing debug statements.

Example:


haliop
User Banned
Posted: 16th Jul 2012 18:58
it tells me Acsses Violation at 0x00000000
and it points at the command dbSync(0,0) at the main loop

and it not always do it on the same time , sometimes the app will run for 1 minutes then crush and sometimes it will run for 5 minutes then crush..

i think its a GDK bug all the way and not my code but maybe im not seeing it right..
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 16th Jul 2012 20:49
Quote: "it tells me Acsses Violation at 0x00000000
and it points at the command dbSync(0,0) at the main loop"

Sounds like DarkGDK is trying to call something from a null pointer. Not much you can do about that I think. Does it occur with a basic test program?

haliop
User Banned
Posted: 16th Jul 2012 21:42
i have another project and also i use vectors but no error there...

i think its a GDK related issue and not in my code
now this kinda sux cause the game is not playable :/
haliop
User Banned
Posted: 16th Jul 2012 21:52
interesting thing :

ive changed the Code Generation from MT (Multi Threaded ) to MTD (Multi Threaded Debug) and i ran the game 2 times now and no crush or error...



pherhads i found the fix .. i wonder
i'll run it for 10 or more times to see if it helps
, can someone explain the diffrence betwen MT and MTD ?
haliop
User Banned
Posted: 16th Jul 2012 22:25
ok no succses here , altough the game runs a bit longer and it seems to have less crushes still it crushes..
i am starting to think its GDK lib related rather then my code.
haliop
User Banned
Posted: 16th Jul 2012 22:34 Edited at: 16th Jul 2012 22:35
what does it meen?!


Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 17th Jul 2012 00:51
When it breaks, click the "Break" button and then go to the stack trace tab (it will show up along the bottom tabs after breaking).
It will point to the sync wrapper or whatever as you said, however you should be able to trace the code execution back several steps and hopefully you will find a point in your own code that the error seems likely to originate from.


That particular error message doesn't "mean" anything specific at all, just that something has screwed up. It might be accessing a deleted pointer or some other thing that is more or less unobvious.


"Why do programmers get Halloween and Christmas mixed up?"
haliop
User Banned
Posted: 17th Jul 2012 11:54
it shows something about WinMain
and some dlls but i cannot reach them
it say

frames below maybe incorrect or missing..

i honestly think its GDK related.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 17th Jul 2012 12:56
It sounds more likely to me that you are accessing an array beyond its bounds, unless GDK 'is' having an issue with any of its functions.

I would double check your arrays and loops that access them.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
haliop
User Banned
Posted: 17th Jul 2012 13:32
found and fix the problem was that sometimes the Tower was LockedOn an invalid Id.. all good now , the game is stable , ty everyone.

Login to post a reply

Server time is: 2024-04-16 11:20:37
Your offset time is: 2024-04-16 11:20:37