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

calling Shutdown() causes crash ?


calling Shutdown() causes crash ?

Postby Conan » Oct 10, 2002 @ 4:08pm

until now I had Shutdown() being called on a button press but now when I call a function from my game menu which itself calls Shutdown() the game crashes with an illegal operation.

If FMOD music is playing the iPaq needs a soft reset

I tried calling Shutdown() from the main loop and that also crashes so it's nothing to do with where my menu functions are ???

Has anyone seen a Shutdown problem like this?

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


Postby Pam » Oct 10, 2002 @ 4:51pm

All the easy problems have been solved.
User avatar
Pam
pm Insider
 
Posts: 449
Joined: Jan 24, 2002 @ 10:30pm
Location: Ohio


Postby draklava » Oct 10, 2002 @ 7:01pm

also the reverse of what Pam said...

If you call delete on something that was never instantiated it will crash...

can you step through the shutdown and see what line it is crashing on?
User avatar
draklava
pm Member
 
Posts: 79
Joined: May 15, 2002 @ 6:13am
Location: Atlanta, Albania, Wherever


Stepping through Shutdown

Postby Conan » Oct 10, 2002 @ 7:09pm

I can try to step through but this debugger is new to me. The thing which puzzles me is that the same function called from the button down function works fine.

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


Postby Kzinti » Oct 10, 2002 @ 8:28pm

This will usually happen if you try to use a surface after the system was shutdown... For example, trying to draw anything to the display after a call to Shutdown() will bomb like that.

Calling Shutdown() from the main loop or a button down event shouln't be different... Shutdown() is basically posting a WM_QUIT message to the window and does nothing else... Actual shutdown happens when the message is processed, which is always at the same time (between game loops).
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


making shutdown work

Postby Conan » Oct 10, 2002 @ 9:00pm

I have changed my code so that the call to Shutdown() happens in the stylus checking function where it's known to work from.

Looks like Shutdown can be a probelm if not called from the button or stylus functions ???

Anyway as I have a workaround I will get back to coding.
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby Pam » Oct 10, 2002 @ 10:46pm

Is your game menu and the function you call in the same class as the one you inherit from Game?

If not, you may have some kind of circular reference thing happening, which is why it doesn't work in your menu but still works in the button or stylus overrides.

Pam
All the easy problems have been solved.
User avatar
Pam
pm Insider
 
Posts: 449
Joined: Jan 24, 2002 @ 10:30pm
Location: Ohio


class where menu is etc

Postby Conan » Oct 10, 2002 @ 11:31pm

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


Postby Jay Mattis » Oct 12, 2002 @ 4:08am

Jay Mattis
pm Member
 
Posts: 66
Joined: Jan 12, 2002 @ 5:50pm
Location: NY


Postby Kzinti » Oct 12, 2002 @ 4:19am

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


thx

Postby tdz » Oct 13, 2002 @ 12:53am

tdz
pm Member
 
Posts: 4
Joined: Oct 10, 2002 @ 12:20am
Location: Atlanta


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

cron