At 12:00 AM 3/9/2002 -0800, Eric Snider <[EMAIL PROTECTED]> wrote: >I'm trying to get my game ready to ship... So I want to be a good developer >and get it to pass a million Gremlins events. I'm not making it far at all >(~20,000 events) before running into various problems.
We had that same problem with our first Palm program (got to ~20K b/f dying - seems like years ago - hey, it was! :) ). The biggest reason for most of these problems were memory related (not "pairing-up" the MemPtrNew()/MemPtrFree() calls, NULL pointers, etc.). Make sure you have Gremlins logging all events generated and received and look through the log of a crash. Maybe the event sequence will tell you what's going wrong (for instance, it will tell you what form is up, last coordinates of a pen action, etc.). This log is gold when you're trying to track down a bug! >Is there a way to use CodeWarrior's source level debugger while using >Gremlins? It would be great if I could investigate the call stack and >variables from there. Or am I supposed to attach the Palm Debugger, run >Gremlins, and then use the command line operations (e.g. "hd 2", etc) once >Gremlins finds a problem? It's good to learn the Palm debugger, but that's not always the fastest way. A couple of other tricks to try (these I do) Make sure you check the box for "Save After 10000 events", and possibly even set the value to something < the number of events before it dies. Poser will save images that are at the state in Gremlins where they were flushed out. Very valuable to let you see several different scenarios. The second thing to do is to have gremlins stop at some number less than the number of events that it dies, let it run until it stops, then single-step to the crash, periodically using the Codewarrior debugger to check the values of variables you are interested in (the likely suspects). >Sorry for the basic questions. I want to make sure I'm doing this stuff in >the best way I can. Just keep at it, you'll get there. The more you play with the tools (Poser/Codewarrior Debugger/Palm Debugger) the quicker you'll get at finding the odd bug. Especially for a game programmer - you'll be playing at the metal level sooner or later, get to know all the tools... ---- Tom Frauenhofer, [EMAIL PROTECTED] "Playing harp takes lots of luck, a love of music, and a pick-up truck." - Valentine Frauenhofer -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
