PrvMisAlignedForwardInnerBitBlt is a particularly tricky function (along with
PrvMisAlignedBackwardInnerBitBlt). It has this habit of walking off the end or
beginning of an allocated buffer while copying pixels from one place to another.
As it turns out, it does so in a fairly safe fashion, and so Poser's heuristics
for determining naughty behaviour report an error when there really is none.
Poser *does* check for characteristic memory accesses from those two functions
and inhibits error messages when it looks like they're OK. However, Poser's
check is very narrow; it allows only for 16-byte reads (see line 1033 or so of
Poser's MetaMemory.cpp source file). It's possible that you've found a similar
case involving 8-bit reads. Looking at the Palm OS 3.1 source code, I can see
that this might be the case.
If you want, you can rebuild Poser to allow for this possibility. Find the lines
in MetaMemory.cpp:
if (Patches::HasBlitBugs () &&
info.result == Errors::kMemMgrAccess &&
info.forRead &&
info.size == sizeof (UInt16) &&
(::InPrvCompressedInnerBitBlt () ||
::InPrvMisAlignedForwardInnerBitBlt () ||
::InPrvMisAlignedBackwardInnerBitBlt ()))
{
goto HideBug;
}
And do something appropriate with that "info.size == sizeof (UInt16)" part, like
getting rid of it.
-- Keith Rollin
-- Palm OS Emulator engineer
"Prashant Verma" <[EMAIL PROTECTED]> on 08/08/2000 01:28:48 PM
Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent by: "Prashant Verma" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
cc: (Keith Rollin/US/PALM)
Subject: Misaligned BitBlt?
Repost:The original was 18 hrs back and still hasn't shown up on the forum
:-(
"PrvMisalignedForwardInnerBitBlt"
----------------------------------
Hi,
I'm trying to WinCopyRectangle() from my offscreen window (1 BPP) to the
display window (2 BPP). This works erratically on my Palm V (OS 3.1) device
(ie it sometimes works) and when it doesn't work, it just shows a blank
screen (probably meaning it could not copy the Rect).
When I run the same program on the emulator with a Palm V ROM, I get a
dialog box saying "...Program has just read directly from memory manager
data structures."
When I hit the debug button in this dialog, CWR6 shows the stack window with
the current location set to "PrvMisalignedForwardInnerBitBlt". The functions
higher up in the stack are ScrCopyRectangle() and WinCopyRectangle().
What could be the reason for this, and why does this still work
occasionally? Suggestions are greatly welcome :-)
-Prashant
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/