Ken Krugler a Ècrit :
> >When running my program on a OS 3.5 IIIc, the map pan feature based on>WinCopyRectangle (following stylus moves) often crashes with the> >following stack crawl (seen in the CW 8.3 debugger): > >> >What can I do about this (other than telling my user to ditch his IIIc)?>MapHandleEvent( EventType* ) >0x10C55E52( WinCopyRectangle ) >0x10C4E0D2( BltCopyRectangle ) >0x10C4E0D2( BltCopyRectangle ) >0x10C51E32( PrvMisAlignedBackwardInnerBitBlt¡ ) >>I never saw this occur on another device, monochrome or color.> At 12:25 PM -0800 2/17/01, Ken Krugler wrote:
I ran into the same problem with some picture pan code. From an old post...
>2. When calling WinCopyRectangle(screen, >off-screen) and the off-screen window uses a >bitmap without a color table, then Palm OS 3.5 >will accidentally dispose of the system color >table, and a subsequent call will die in Poser. >I think this same situation might occur in the >inverse case as well.
The full post is at <http://www.escribe.com/computing/pcpqa/m34989.html>
I fixed it in my code by making sure the off-screen bitmap had a color table.
In my case, I'm just moving the screen window onto itself, drawing from screen to screen:
WinCopyRectangle( NULL, NULL, &bounds, newX - screenX, newY - screenY, winPaint );
How could the screen window not have a color table?
It should. But the specific bug was in the low-level blitter code, where it was incorrectly disposing of a color table that it _thought_ it had allocated, but was in fact (in my case) the system color table that's used when the destination bitmap doesn't have a color table.
So there may be other ways in which the same bug could be triggered. However rectangle to rectangle copying from the screen is something that gets used a lot, which makes me suspect something in your code that's trashing memory. Have you been running on POSER with a IIIc debug ROM and all debug checks turned on?
-- Ken -- Ken Krugler TransPac Software, Inc. <http://www.transpac.com> +1 530-470-9200
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/