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

PocketFrog Bug - Dell Axim


PocketFrog Bug - Dell Axim

Postby Bapdude » Jun 2, 2004 @ 7:35am

User avatar
Bapdude
pm Member
 
Posts: 140
Joined: May 14, 2004 @ 5:06am


Postby Kzinti » Jun 2, 2004 @ 7:55am

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


Postby Conan » Jun 2, 2004 @ 12:45pm

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


Postby Presto » Jun 2, 2004 @ 12:52pm

User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby Bapdude » Jun 2, 2004 @ 2:49pm

Please don't think that I am "complaining" about PocketFrog. Believe me, I am *extremely* grateful for PocketFrog as it has saved me so much time and headaches that I WAS having before I started using it. PocketFrog gave me the tools to do more than I could ever do on my own.

I've been coding for the PalmOS for the past 3 years, so I'm certainly not an expert in the Windows arena. My first port to the Pocket PC is almost finished (thanks largely to PocketFrog), and this application error is the only remaining problem that I have left to fix.

I would gladly do my part to help debug this problem, but coming from Palm OS development, I'm not very savy with the debugger. How do I debug a program on an actual device? I've been developing in Visual C++ on my computer and then downloading to my Axim for the final testing. If someone can give me some quick instructions on how to get debug info on this error, I will gladly post my results.

Thanks guys!
:)
User avatar
Bapdude
pm Member
 
Posts: 140
Joined: May 14, 2004 @ 5:06am


Postby Conan » Jun 2, 2004 @ 4:51pm

If you want to try a device debug yourself make sure that you have the latest active sync & within evC3++ do a build of a debug version after setting all it's project settings & tools options setting so as to pick up the correct PF lib, PHAL lib & pointing to the correct includes & library folders just like your release one.

When you do a build & it downloads the debug version to the device you can then do a build / start debug / go & the app will start on the device.

However: when you power off the device activesync stops working so I cannot tell what the debugger was doing. Then evc++ crashed & exited.
I can try the Entrek debugging tools demo:- When the app crashes on power off the Entrek tool stops giving data.

So I think it's a new question: What actions must a developer take other than suspending Hekkus when a suspend happens? Should the game's main loop check every time & do nothing if suspended or what?
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby fzammetti » Jun 2, 2004 @ 5:26pm

Thierry, was PF *ever* coded to handle these types of situations? I only ask because I didn't add any functionality in this regard to the later versions, so if it wasn't there to begin with, there's the problem.
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby Bapdude » Jun 3, 2004 @ 5:01pm

User avatar
Bapdude
pm Member
 
Posts: 140
Joined: May 14, 2004 @ 5:06am


Postby fast_rx » Jun 3, 2004 @ 6:59pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby Kzinti » Jun 7, 2004 @ 1:11am

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


Postby Conan » Jun 7, 2004 @ 7:20am

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


Postby Bapdude » Jun 7, 2004 @ 7:50am

User avatar
Bapdude
pm Member
 
Posts: 140
Joined: May 14, 2004 @ 5:06am


Postby adde » Jun 8, 2004 @ 3:51am

Ok, not saying I'm holding all the answers (heck, I don't even own a PDA) but here's my guess:

The "Exception: 0xc000005" is an "Access Violation" which happens if you try to read/write from/to a NULL pointer or a dangling pointer (i.e. a pointer to a piece of memory that is not valid).

Conan wrote: "does this mean that in PocketFrog everywhere displaydevice is used I need to add in functionality to test if it's valid before doing anything with the screen?"

No, because if you managed to start your game using Game::Run() (which in turn calls Game::Init() followed by Game::GameInit() and then continuesly calls Game::GameLoop()) then it has already created the DisplayDevice for you and verified that it is not null. If it was, then Game::Init() would have returned false and Game::Run() would have exited with an error and not ever call Game::GameInit() or Game::GameLoop().

This is good news because it meens that you don't need to worry about the DisplayDriver (unlike what fast_rx suggested earlier).

But the bad news is (and this is once again traced back to the file pocketpc.cpp) is that the global pointer pointing to the DisplayDriver is never freed on a shutdown or exit. Normally this is not a problem since when a program exits all its memory are returned to the OS (but don't bet on it). I don't know exactly what happens on a Dell Axim when the power button is pressed so from this point on I'm only speculating:

It sounds like it goes down to some powersleep mode. And for some reason when it gets back, since its not going straight to your game (like Conan said worked flawlessly), it invalidates your DisplayDriver OR your program jumps on the GameLoop to fast (writing to the DisplayDriver if you are not the owner (i.e. has the focus) will also create this error).

So, I suggest you try three things:

1. Try adding a Sleep(1000) in Game::OnActivate before calling PocketPC::Resume(). It's a long shot but it could work.

2. Add a function to pocketpc.cpp that sets the global pointers to NULL (or 0) so you can try to reinitialize the DisplayDriver. Unfortunately there will be difficult to separate this behaviour from when the game only looses focus. And you don't want to create a new DisplayDriver every time (if that is even possible) because this will use up your memory eventually. Also, to be able to reinitialize you have to modify the Game interface and add a function here that does this for you (since all the stuff you need is private and you need a public or protected interface to use it).

3. Disable this owner info if that is what's causing the problem and you have no problem with normal suspend/resumes.

Not sure if this helped anyone. Sorry for a confusing and long post.
User avatar
adde
pm Member
 
Posts: 152
Joined: Oct 9, 2002 @ 1:42pm
Location: Stockholm / Sweden


Postby Bapdude » Jun 8, 2004 @ 5:49pm

User avatar
Bapdude
pm Member
 
Posts: 140
Joined: May 14, 2004 @ 5:06am


Postby Conan » Jun 9, 2004 @ 10:12am

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


Next

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