PocketMatrix forums

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

AliCE updated

Hi all,

The packages on the Alice page are updated:
http://www.pocketmatrix.com/phantom/alice.htm
Tell me what you think. :)

Sources are available too. It's not a pretty sight, I'm afraid; this is quite old code. The keyboard code is new though.

Jacco.
Cool, although I never liked your site's design. But maybe that's just me...
I am not a site designer. :)
If you would like to redo it, be my guest.
Perhaps I'm doing something wrong, but the MIPS version I downloaded a few minutes ago still produces an error message...
I'm getting more complaints about it, and I think I know what's going wrong. I'll see what I can do tonight.
Some of these Pocket PC CPUs will generate an exception if you try to make unaligned accesses to memory (i.e. read/write a WORD to an odd address).  I don't know if that's what is going on here though.  0xC0000005 is an access violation, and you usually see this when you try to read/write to memory that doesn't belong to your process.  I don't know if that same error denotes unaligned accesses.  Just an idea.

Good point, but I'm afraid that's not the problem in this case. I'm very sure the ARM doesn't allow for unaligned access either, so this still doesn't explain why it doesn't work on the Casio. If you wish, we can do a debug session on monday; I'll send you a couple of AliCE executables with exit(0) at various stages of initialization, so we can pinpoint the location of the crash. I've never done that by e-mail though; I usually use this approach when I have a crash that only occurs on my iPaq, and not on the PC (VERY rare).
Just tried this on my iPaq.  If your code causes an alignment exception it will generate the following error message in the debugger:

First-chance exception in foo.exe: 0x80000002: Datatype Misalignment.

However, the "Fatal Application Error" dialog that is displayed on the device gives the above info along with the address where the exception occured.  If someone can give you that address, you should be able to find where the error is your code.  It will be a lot easier to find if you give them a build with debug info.  Of course if this died somewhere down in a system DLL you're going to have a tough time without a call stack finding the problem spot in your code.  


This might make it easier for you than sending someone multiple .exes with exit(0) sprinkled throughout your initialization routines.

Inside WinMain(), bracket all your code with __try{}, then add an exception handler.  Add a global DWORD variable to your app and init to 0.  At the beginning of each of your functions increment the counter by 1.  In the exception handler, either write the value to a log file, or put up a message box and display the value.  The person running the app and getting the exception needs to give you this value.

Once you have the value, set a conditional breakpoint on the value of the counter equal to whatever it was when it crashed.  Run your app and it should break in the function that caused the error.  If your functions contain a lot of code, you can add more calls to bump up the counter variable and ask the person to run again.

Code with exception handler looks like so:

DWORD g_dwDbgCnt = 0L;


INT WINAPI WinMain (...)
{
__try
{
   // all your code in WinMain here
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
   // save counter value here
   MessageBox(...)

   // exit the app
   return 0;
}
  return 0;
}


I've done things like this before when I couldn't get a call stack and was able to narrow down where the problem was.  What I did was actually write a _penter() routine and compile with /Gh so that the compiler generated a call to _penter() at the entry to every function.  This kept me from having to manually add the code to increment the counter variable, and was easier to remove once I found the problem.

Good luck!

Cool. I'll add this to AliCE as soon as I find the time. Thanks a lot for the info.
The fatal application error window does not come up for me when AliCE crashes. It just exits the program completely and my Start bar never returns unless I reboot my @migo.
I hope the @migo problem is caused by the (0,0)=Framebuffer+319 problem. I'll post a version that fixes this on Monday (can't do that from my home). Otherwise, you'll have to wait for the version with the __try blocks.
How do I turn it off and go back to the today page? Great freeware by the way.
Type 'exit'. :)
I seem to have tried this program on my Casio E-125, but it didn't work either. Is it working now on the Cassiopeias?!
lemmings and aliCE dont run on my em-500 :(
Lemmings is totally unplayable on my Jornada 548 too.  It freezes all the time and I have to do a soft reset.
I will try to find the bug in Alice that prevents it from working on the Casio's. I hope to fix this with the release of EasyCE 1.5; since most of my programs seem to have problems on Casio's (except The Nutcracker btw, wich runs perfectly according to Carp), I assume it's a problem with EasyCE. Anyway, I'll be rather busy with The Nutcracker for one more week or so (selling, webpage, marketing, MIPS version), after that I should have time for other things again...

Like an editor for The Nutcracker. :) More info on that soon.
Moose or Chuck · 15 Oct 2001, 10:48 UTC
o yea, Nutcracker for mips officially kicks anus. Great Job Phantom. I'm gonna play it for a while longer then, try to review it.
Has Jacob fixed the AliCe error on Casio E-125 yet?

I download the app yesterday and this window pops up after the background graphics finish loading:

Fatal Application Error
Application alice.exe has performned an illegal operation and will be shut down.  If the problem persists, contact the program vendor.

Program: alice.exe
Exception: 0xc0000005
Address: 00011328 Fatal Application Error



I click OK to get rid of the error window.  Then I see the taskbar is all black on my Today screen.  I had to reset my Casio.
It's still not fixed, sorry. :(
Untill Phantom fixes Alice, here is how you can get around the error message without having to do a soft reset.  Put a shortcut to Alice.exe in a seperate folder on your start menu.  Run Alice.  When Alice crashes and the taskbar is blacked out, it will return you to the folder with the shortcut of alice.exe.  Just re-click on the alice.exe shortcut and Alice will load up again. Keep doing this untill you want to quit, by typing EXIT when running Alice.  When you exit Alice by typing EXIT, EasyCE shuts down and the Taskbar re-appears.  

Untill Phantom fixes Alice, here is how you can get around the error message without having to do a soft reset.  Put a shortcut to Alice.exe in a seperate folder on your start menu.  Run Alice.  When Alice crashes and the taskbar is blacked out, it will return you to the folder with the shortcut of alice.exe.  Just re-click on the alice.exe shortcut and Alice will load up again. Keep doing this untill you want to quit, by typing EXIT when running Alice.  When you exit Alice by typing EXIT, EasyCE shuts down and the Taskbar re-appears.  



Okay.  I tried your suggestion by loading it from the Programs window instead of directly from Start.  It still crashes upon re-load and gives the same error window with the exact error code and address as the Fatal Application Error described in my previous post.  So I keep on re-loading it many times yet everytime it crashes with the exact same error.

Also, I tried using Explorer to folder /Programs/AliCE to run alice.exe and it still repeatedly gives the same error window with the same error codes and address.

I noticed that the /Programs/AliCE folder contains Alice.exe, keyboard, and one other folder containing all of which seems to be only text files.

I hope this helps.
The program still crashes.
When I use AliCE, I use at least 14 MB of Program Memory. The more the better. Try alocating as much as possible. Delete programs if you have to.