On Thu, 2002-10-10 at 04:35, JB Parrett wrote: > Are you using the Emulator with debug ROMs? Use the latest POSE (3.5) and > the OS 4.1 debug ROMs with all the debug checks turned on and run Gremlins. > POSE does a pretty thorough job of looking for memory accesses in forbidden > places, and the debug ROMs do a good job of checking your use of the Palm OS > APIs through assertions.
Yep, I was using the emulator and debug roms. The problem was in one of my assembly line drawing routines. I was getting the base address of a window, and adding the offset for the line something like this: move.l #base, a0 | base address for bitmap move.w #rowbytes, d0 | bytes per row for this bitmap move.w #row,d1 | row number to start at mulu d1,d0 | multiply them add.w d0,a0 | worked "some" of the time. Assume a0 is 0x11000, and the multiplied offset was 0x3000, no problem, a0 would be 0x14000. Now assume a0 is 0x1E000, and the multiplied offset was 0x3000. now, a0 is actually 0x12000. Because of the way I'd allocated memory, (two big buffers), this would be pointing in the previous buffer, causing a smear effect, but *not* causing a memory violation, even with debug roms. Obviously, that last instruction should have been 'add.l d0,a0'. I just found the right combination of emulator, rom, and pre-loaded programs that helped me tickle this bug to the surface so it could be squashed. It's truly a joy having the emulator so that I *can* debug on so many different devices virtually. > In CodeWarrior, the Palm menu has a Debug Console menu (or something similar > depending on your platform) where you can scramble the heap, compact it, > fill up most free memory, etc. This can also be done in code. Take a look at > the Development Tools Guide chapter on the Console (the guide is in the 5.0 > SDK docs). I'm afraid that Codewarrior is a bit steep for me SRP of $500!?!?. I'm using Falch and PRC Tools. > Finally, take a look at the Expert Case Studies online course, which is free > until the end of the year. Click on the Developers link at > www.palmsource.com and follow the Training links to the course enrollment > form. I've enrolled for this. Thanks! -Ken -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/