PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Joggle Game Released - I need your help!

Yesterday, I released my first Pocket PC game (Joggle) that is based on PF/PHAL. Since then, I have received a couple emails from customers saying that the game causes their PPC to crash on start-up. I've not been able to produce this problem on my Dell Axim.

I'd appreciate if you could try my game on your device and let me know if you have any problems. This game is live so I'm very anxious to get this resolved.

You can download Joggle at:
http://www.bapsoft.com/joggle_ppc.htm

Thanks for your help!
-Bobby
Another idea...since this game works perfectly on my Dell Axim (2002), is there anything special about using/compiling PF/PHAL on Pocket PC 2003 ? Most of the problems seem to be with 2003 devices.

Is anybody out there? I'd really appreciate your thoughts or suggestions... :)
I tried your game but as I have a Dell Axim also I did not expect problems and it worked fine. Can you post the models that have the problem? that should help.

I have no remaining crashing problems on any devices with Space Treker III which is PF 0.7 (without HAL).

If any of the users are I.T. literate you might get them to debug a little?
Conan,

Thanks for your help. I have a customer that has tried Joggle on these devices:

- iPAQ 2210, WM2003
- Toshiba e800, WM2003, highres 640x480

Joggle crashes at startup on both devices. There seems to be a problem with WM2003.

I'm a little embarrased to ask this, but do I need to build a separate version for WM2002 and WM2003? I thought that 2003 was backwards compatible with 2002, so that I could have 1 build for both. Is this true?

Also, I'm using evc3 to build an ARM release. Do I need to use evc4 to build for WM2003 ARM ??

Thanks again...
You should use the EVC4 compiler. using EVC3 is only asking for troubles.

In any case, are you using the latest PocketHAL (0.7.4)? I'd be very surprised if PocketHAL was the problem as the samples work perfectly on WM2003 and WM2003 SE.
Okay, but can EVC4 build for WM2002? I really don't think PocketHal is the problem (yes, I am using 0.7.4). Basically, I built my exe with EVC3 for "ARM Release" and then put this in the CAB file for distribution. So, if someone comes along with a 2003 device and installs my 2002 build, I guess this would cause their PPC to crash?

Do I need to built 2 separate exe's for 2002 and 2003? If so, do I build 2002 with EVC3 and 2003 with EVC4 and then put BOTH exe's in the CAB file? If 2002 and 2003 devices both use ARM processors, I don't see why I would need more than 2 executable.
You only need 1 exe for all platforms. What I do myself is use the PPC2000 SDK with EVC4.0's compiler. I never ran into any problems.

I do this by using the EVC3.0 IDE and replacing the compiler with EVC4's (simply change the "tools" path to point to EVC4's compiler).
That's interesting...so, you're not using the 2003 SDK?

A couple more questions please: :wink:

1) To use EVC4's compiler, do I need to install EVC4 IDE?

2) When you compile a single exe for BOTH 2002/2003, what build target do you use ("ARM Release")?
1) Probably. I did.

2) As I said I use the PPC 2000 SDK. I target "ARM Release". It works on all platforms (2000/2002/2003).
Although the V4 compiler no doubt is better & has fewer bugs than V3 I would very much doubt that your problems would stop simply by using it however it's worth a try.

All you do is install the newest SDK and then manually copy over the compiler into the eVC3 folder following the steps described reproduced from Daniel's post below:
i don't know if this is simply a know fact, but since i didn't know (and i'm quite active reading here...) i'm gonna tell how to use the new ARM compiler (EVC4 for WinCE 4.2) to speedup EVC (WinCE 3.0) code.

the way the Intel PXA Optimization Guide tells did not work for me, but this very simple steps do work:

*) have EVC3 + EVC4 + PocketPC2003SDK installed

*) rename the directory where all the EVC3 compiler stuff is located in (e.g.: c:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\bin) to save the old files

*) create a new directory with the original name

*) copy all files from the "WinCE4.2 bin dir" (e.g.: c:\Program Files\Microsoft eMbedded C++ 4.0\EVC\wce420\bin) into the new directory

*) copy all files from the renamed original EVC3 directoy WITHOUT overwritting anything into the new directory (so copy over what's not already there)

if everything was done correctly the compiler should now have version 12.20.9615 instead of 12.01.8569 (see by unchecking "suppress startup banner" in the project's c++/customize tab


ps: How easy would it be to make a PF 0.7.0 version? would it just be an hour or two's work. If so it's best to try this out. BTW! the only problem I found with 0.8.0 PF/HAL was that it was not so forgiving with mistakes like draw a vline from 0 to 320 instead of 0 to 319. No other issues but I never tested beyond my Axim.
Thanks guys...I appreciate your help. I'm going to give the EVC4 compiler a try and see if that does the trick.

Conan: Are you using 2000 or 2003 SDK? Any advantages/disadvantages to one or the other?
Hmmm, I have an axim x30 and it locks up the whole thing. I installed to the sd card, though.
fast_rx wrote:Hmmm, I have an axim x30 and it locks up the whole thing. I installed to the sd card, though.


oops. forgot to say 2003se is the os.
I'm building my release for PocketPC2002 using eVC3. That seems to work across all platforms. The V4 compiler did not solve any of my bugs. All my bugs were my own fault.
I've tried everything...and I still can't get Joggle to work on 2003 devices. I tried using the EVC4 compiler, but that didn't make any difference. This is so frustrating! Why does it work perfectly on 2002 and not 2003?

I can't even debug it on the 2003 device because EVC3 won't activesync with 2003 devices (in real time). I'm going to try to create a stripped-down version of the game and see if I can isolate the problem. I'm using PF/PHAL, so I might try going back to PF and see if that makes a difference.

How do you debug your programs on a 2003 device? Do you manually copy the exe to the device in the file manager and then run it?
To debug WM2003 devices, you need EVC4 and the WM2003 SDK.
I have finally isolated the problem...it is Hekkus!! If I remove all instances of Hekkus sound (function calls, etc.), the game works perfectly on PPC2003. With Hekkus included in the project, the game hangs indefinitely.

Does anyone know of any issues with Hekkus on PPC 2003 devices? I have contacted the author of Hekkus about this problem.

Thanks for everyone's help and suggestions...hopefully I can get this Hekkus issue resolved quickly! :wink:
I will need to check among my users but I use Hekkus & have had no one complaining
Today I have some times to check if there is really a problem with Hekkus and PPC 2003 SE. If someone have time please test this little prog (phal 0.7.4 + hekkus 0.99.1.rc3) and report here or email me your result.

Thanks guys.
I can't speak about 2003SE, but original 2003, I know there is no problems with Hekkus, at least not the latest version. I used it in two games, both run perfecly well on my X5, and I've had no users reporting issues with their devices either (some of which are 2003SE devices).
Thomas, I tried your rotozoom demo on my 2003 device and it works perfectly. I am starting to think the problem is not Hekkus, but my code. But again, my code works (with Hekkus) on WM2002 devices without any problems.

Here's something suspicious...if I comment out the Hekkus function calls in my code, it still does NOT work. I have to remove Hekkus from my project entirely. This makes me wonder if something is happening during the build process. Anything special that I need to do to build Hekkus for 2003? Is there a particular order that I need to initialize Hekkus and my audio resources? BTW, I'm not using the Hekkus DLL, I'm compiling the Hekkus source code into my project.
Oh, one other thing...I checked, and I am using (phal 0.7.3 + hekkus 0.99.1.rc3) (NOT 0.7.4)

Does Phal 0.7.3 behave friendly with hekkus?
Compiling in the source... that's potentially a pretty big "by the way"! :) Try just linking to the lib and see what happens...
I was quite sure that the problem wasn't Hekkus...

btw be sure that you are using the latest version (0.99.1.rc3) and if you include the source code on your project remember to add to your preprocessor definitions HSS_STATICLIB.

Try to manually delete all your .obj and rebuild all, sometimes it helps.


BapDude wrote:Oh, one other thing...I checked, and I am using (phal 0.7.3 + hekkus 0.99.1.rc3) (NOT 0.7.4)

Does Phal 0.7.3 behave friendly with hekkus?


If I remember correctly there was problems with phal 0.7.3 and PPC 2003 SE (not Hekkus related). Try using the latest phal version.
I tried using PHAL_0.7.4, but I still have the problem. I've rebuilt everything several times and that didn't help. I'll keep trying... :D
I'm curious...are most people compiling in the Hekkus source or linking in the lib file?
I'm using the latest Hekkus with the .lib file
Most people use dll, source code is provided only to donors. Could you try to build a version of your game with Hekkus as a dll?
Build your game with Hekkus as a dll may help to find what don't work on your game.

I have read your mail and you aren't doing nothing wrong on your initialization code with Hekkus, but there is for sure something that you are missing out ;)
Is there any documentation available for adding Hekkus dll and lib to existing projects? I have looked at Hekkus website and searched this forum and I didn't find anything.

Where do I need to put the dll and lib files so that EVC3 can find them? Also, do I need to copy the dll file to the PPC along with my exe?
Okay, I built Joggle using the Hekkus lib. Copied the exe file to PPC2003 along with the hss.dll

I started the game and it still freezes! I even created a new EVC3 project and manually added in the source files, etc. Compiled again and downloaded to PPC...and once again the game hangs when I start it. What in the world could be going on here? I feel totally helpless. Any ideas what I can try next?
You most likely have an issue related to how you use the Hekkus library. Perhaps you are not managing your sound/music resources properly?
Sorry I missed your earlier post as I asked the same question myself a few weeks back (where does the lib go etc). From my own experience with sound modules it's not very hard to change between them so you might just try mikmod or FMOD in place of Hekkus if you are having difficulties to see if you get a result. FMOD costs (around $100 I think).
Well, I spent most of last night trying (everything I could think of) to get this to work. Still, when I start the game, it freezes on WM2003. I'll probably try FMOD although it costs $1000 per title (a bit pricey). Whatever the problem might be, WM2002 is definitely more forgiving than WM2003. I would expect the same code to work on both.

Anyway, I just wanted to thank everyone for all your suggestions and help with this one. I never expected to have this much trouble, but isn't it always at the last minute that things go wrong? :D

Thanks again for everyone's help...
Bloomin heck! $1000 for FMOD, when did that happen.
BTW: There's a hobbyist license for $100.
:lol:
Remember that Mikmod is fully functional & free. I'm using Hekkus to support Thomas but would have been happy to use Mikmod if I had to.

To be honest I'm not so sure that Hekkus can be the real root of your problem. Over 1200 people have installed Space Treker III & not one has complained about hanging. I know for a fact that some have WM2003 2nd edition. I won't be buying a new PPC until after the Dell Axim X50 is launched so I can compare several devices before buying.
I don't think Hekkus has a bug either. It's probably how you use it.
Yes, I'm concerned the problem is my code. 8O Although, I sent some of my code to Thomas and he said my use of Hekkus looked correct.

This is a very BIG request, but if I created a "mini", stripped-down version of my game (maybe just the intro screen), would anyone be willing to try compiling my code and see if they have the same problem on WM2003?

I can zip up the project files so it would be very easy to use.
I'd be more then happy to debug it if you can reduce the size of the project. But I am leaving for 1 week of vacation tomorrow after work, so I might not have the time. Feel free to send it anyways.
Whew!...I think I have found the problem (although I still don't understand the problem exactly). I am using a Font class that was posted on this forum for PocketFrog.

I am declaring instances of type 'Font' in my project like this:
Code:

Font m_Font1, m_Font2, mFont3, mFont4, mFont5;
Font m_Font6, m_Font7, mFont8, mFont9, mFont10;

For some reason (and again, I don't really understand why), if the number of 'Font' instances exceeds 10, the application freezes on start-up. If I decrease the number of 'Font' instances to 10 or less, the application loads perfectly. It seems there is a memory issue here in WM2003. I don't really understand the Font class, I just use it with fonts that I create with the MetalShard FontMaker program.

It must be that the memory size for 10 fonts just happens to fall at a limit that WM2003 accepts. Beyond 10, and the memory size causes problems and the program freezes while loading the font resources.

So, anyway, my game is now working. Originally, I had about 11 fonts...so I removed one of them, and now it works. Also, before you ask the question "Maybe the font resource you removed was corrupt?". Well, I tried interchanging different fonts (i.e. remove m_Font3 instead of m_Font9) and it behaves the same (exceed 11 font resources and the app hangs). So, I am convinced that the fonts image resources are not corrupt...it must be a memory allocation problem in this Font class. Of course, I'm no expert either, so I'm just guessing.

Thanks again for everyone's help. I feel like I took everyone on a wild-goose chase trying to isolate this problem. But again, I really do appreciate your help and patience with me. :D
Out of curiosity, try creating an array of Font objects instead of 10 individual objects...
Do you mean something like:

Code:

Font m_Font[10];


How would this be any different than 10 separate objects? I'm not a C++ expert, so I may be asking a stupid question. :?

Also, this Font class simply calls 'LoadImage' just like any other resource loading. Maybe there's an issue with LoadImage()?
Well, you'd have to look at the assembler code the compiler outputs to see if they are equivalent...

I'm wondering if maybe making it an array lays it out differently in memory, and hence some problem occurs doing it otherwise. Is an array of Font objects actually a list of pointers to Font objects? Is declaring them individually actually Font objects thrown in memory (possibly not contiguously?) with entries added to some reference table somewhere? I don't know, it's been MANY years since I even THOUGHT about compiler design (the last time was creating my language for my compiler construction course in school... fun project then, not something I want to think much about now!)


But, it's just a wild guess based on nothing more than over 20 years of experience seeing little oddball things like that turn out to be the case when all logic and reason says there's no way it possibly could be :)
Thanks Frank...I'll be sure to give that a try. This is definitely one of those times when nothing seems "logical". But, as you said, it all depends how the compiler interprets your code. :)
Guys, compilers rarely make mistake. I've seen VC5.0 and EVC3's ARM compiler each make a single mistake in years of development (which I do 45+ hours per week).

I haven't studied the Font class, but I am wondering if it's not trying to do unaligned read or writes.
Thomas ("gersen") originally wrote this Font class and I think a lot of people use it for their bitmap fonts. As I mentioned before, it just calls 'LoadImage' and then displays the appropriate section of the bitmap based on letter and the kerning marks.

Thierry, I started creating a "mini" version of my game last night to send to you. However, when I finished removing all the fonts, etc. (to create a small project), the game started working on WM2003. It might be interesting to take this striped-down version of my game and add in just the fonts and see if this causes the problem again. If so, this might be a good place to start debug.

Whatever the mechanism, WM2002 and WM2003 interprets the resulting code differently.
Curiously I got the same thing when I added one extra font a few weeks back however as that was the only thing I did it was obvious what caused it. I just took the font back out & re-drew an existing one to get what I wanted but there's definately an issue with the fonts. I only had 4 though.
It wouldn't have to be a compiler MISTAKE per se... It might generate perfectly reasonable code that, while technically correct, causes a problem under one OS vs. the other.

Note that I don't really think this is the case at all, just that I'm quite used to very bizarre and highly unusual things like that happening. I'd guess it is a hitherto unseen problem with the Font class that only shows up in some unusual circumstance under WM2003SE. I'm not sure too many people try and declare 11 different fonts in an app, so it very possibly just has never come up before.
I know that WM2003 is less forgiving about memory management errors. I've seen many genuine bugs that would silently work on pre-WM2003 hardware. Most of them related to accessing memory out of allocated bounds.
Conan: It's encouraging to hear that someone else has had problems with the font class. I can't see why loading a font "bitmap" resource would be any different than loading a regular image resource (png, bmp, etc.) It's good that you found the problem after adding the extra font (so you easily knew what caused the problem). In my case, I had the game completed and working on WM2002. When I tried it on WM2003, and it didn't work, I had no clues as to the source of the problem.

Yeah, perhaps 11 fonts is a bit much. In one instance, I use 2 fonts (a white/black version of the same font), and draw them on top of each other for a shadow effect. The obvious solution (which I did), was to create a new font by combining the images to result in a single font with the shadow "built-in". This reduced my fonts to 10, and now the game works...pretty strange! 8O
Microsoft recently gave out this link in the eVC newsgroup for product feedback (product bugs & suggestions)... this resource issue might be worth letting 'em know about

http://msdn.microsoft.com/embedded/comm ... /feedback/
Hey BAP, looks like you really love my Zapped! game.
I just noticed it when I tried your game.

http://www.handango.com/PlatformProduct ... ctId=82918§ionId=0&catalog;=30&txtSearch;=zapped