This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Game crashes on very last line ( return 0)


Game crashes on very last line ( return 0)

Postby Conan » Mar 11, 2003 @ 5:43pm

When I exit from my in-development game I get an exception with error number -1073741819
This happens on the ARM release, the VC6 Debug but not the VC6 release version.

I'm guessing that it's something to do with not releasing memory but I have delete'd everything I new'ed. Does anyone have any pointers ( no pun intended )

for example my main arrays are created like this :-
system_data *systems;
systems = new system_data[MAX_SYSTEM];
and deleted with:-
delete systems;
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby gersen » Mar 11, 2003 @ 7:21pm

User avatar
gersen
pm Member
 
Posts: 147
Joined: Oct 19, 2002 @ 8:40am
Location: Italy


debugging continued

Postby Conan » Mar 11, 2003 @ 7:41pm

Thanks, I needed to know that & have now implemented []. It does not stop the crash however. I did get my VC6 debug build to stop crashing by removing one of the delete's so it may be that there's more stuff in there that's wrong.

I also get asked for the path to DBGDEL.CPP which I can't find on my VC6 or eVC setup.
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Pixel shader demo also crashes

Postby Conan » Mar 11, 2003 @ 9:28pm

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby adde » Mar 12, 2003 @ 7:28am

First of all, I would like to point out that (as with almost all other operators) the delete [] can also be written as delete[].

Then, here's what I think is wrong with your code. -1073741819 is the same as 0xC0000005 which is the "access violation" error code. And since the debugger fails during a delete (This is why it asks for the dbgdel.cpp. It wants the debug information for the delete function.) there are two possible scenarios:

1. You are using threads and forgot to link your project to the MT version of the runtime library (CLIB). If the single thread version of the runtime library is used with multiple threads that use new and delete you will get race conditions since they will all use the same heap to allocate/deallocate memory. On my platform SDK for eVC however, I only have one library to link to (=CE Runtime) and I think it's the same for all WinCE platforms. This library is an MT library so this can't be the problem.

2. You used the pointer (or array) to write outside the allocated memory area. Sometimes the debugger doesn't report this as an access error until you try to delete the array and this is what I think happened.

So, take a close look at your code and double check every access to the array that caused the error. My bet is that you used an illegal array index somewhere.
User avatar
adde
pm Member
 
Posts: 152
Joined: Oct 9, 2002 @ 1:42pm
Location: Stockholm / Sweden


thanks for the advice

Postby Conan » Mar 12, 2003 @ 8:48am

Thanks Adde, you may be correct with the secord suggestion. If so this may mean that somewhere either PF or my own code is being naughty with arrays. I will find out how best to debug this kind of problem & get on it.
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


thanks for the advice

Postby Kzinti » Mar 12, 2003 @ 8:54am

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby refractor » Mar 12, 2003 @ 12:42pm

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


problem fixed

Postby Conan » Mar 17, 2003 @ 9:37am

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum