Re: Crash within WinCopyRectangle
Ken Krugler a écrit : 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): MapHandleEvent( EventType* ) 0x10C55E52( WinCopyRectangle ) 0x10C4E0D2( BltCopyRectangle ) 0x10C4E0D2( BltCopyRectangle ) 0x10C51E32( PrvMisAlignedBackwardInnerBitBlt¡ ) What can I do about this (other than telling my user to ditch his IIIc)? I never saw this occur on another device, monochrome or color. I ran into the same problem with some picture pan code. From an old post... At 12:25 PM -0800 2/17/01, Ken Krugler wrote: 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 Yes. So far, the only solution I found is to test for color and OS 3.5 and then use WinInvertRectangleFrame to give the user visual feedback on the pan action that will take place when he lifts the pen (instead of moving the map with WinCopyRectangle, which produces odd streaks on the screen anyway since offscreen pixels are not brought into view by this API when moving the map). -- Luc Le Blanc -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Crash within WinCopyRectangle
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): MapHandleEvent( EventType* ) 0x10C55E52( WinCopyRectangle ) 0x10C4E0D2( BltCopyRectangle ) 0x10C4E0D2( BltCopyRectangle ) 0x10C51E32( PrvMisAlignedBackwardInnerBitBlt¡ ) What can I do about this (other than telling my user to ditch his IIIc)? I never saw this occur on another device, monochrome or color. I ran into the same problem with some picture pan code. From an old post... At 12:25 PM -0800 2/17/01, Ken Krugler wrote: 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/
Re: Crash within WinCopyRectangle
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): MapHandleEvent( EventType* ) 0x10C55E52( WinCopyRectangle ) 0x10C4E0D2( BltCopyRectangle ) 0x10C4E0D2( BltCopyRectangle ) 0x10C51E32( PrvMisAlignedBackwardInnerBitBltÁ ) What can I do about this (other than telling my user to ditch his IIIc)? I never saw this occur on another device, monochrome or color. I ran into the same problem with some picture pan code. From an old post... At 12:25 PM -0800 2/17/01, Ken Krugler wrote: 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. -- 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/
Re: Crash within WinCopyRectangle
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): MapHandleEvent( EventType* ) 0x10C55E52( WinCopyRectangle ) 0x10C4E0D2( BltCopyRectangle ) 0x10C4E0D2( BltCopyRectangle ) 0x10C51E32( PrvMisAlignedBackwardInnerBitBltÁ ) What can I do about this (other than telling my user to ditch his IIIc)? I never saw this occur on another device, monochrome or color. I ran into the same problem with some picture pan code. From an old post... At 12:25 PM -0800 2/17/01, Ken Krugler wrote: 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? -- Luc Le Blanc -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/