>Well, your argument seems to be right 'cause the second message shows up
>BEFORE the contents of the field are written onto screen, although when I
>click 'Continue' on POSE warning box the field content is displayed
>correctly. The first message showed up with text in field displayed when I
>tryed to write something into field by pen.
>
>1)Is there any clever and short way to prevent the second error?
Fix the bug, of course!

>2)How dangerous it really is?
It is dangerous. For two reasons:
1) if you are WRITING off  the end of your chunk then you will be trashing
other data and also risk the portion of your data which is in the wrong
place being tromped on by something else. If the data you are trashing is a
memory manager structure then you are probably corrupting the heap on the
device which will eventually lead to a crash.
2) If you're reading off the end then you could be reading random data
which could draw garbage characters or worse. For instance, if your data
which is in the wrong place is a POINTER and then you dereference a garbage
pointer, you can crash the device.

>3)I gotta admit that I don't understand how could I read off the end of
>the chunk. DmRecord of 256 bytes is attached to a field that can have 20
>characters (ok 256 is default testing size). It's all allocated before and
>is automatically accessed and writen on  screen when form resource
>(together with field) is loaded and displayed. Again, how can I prevent
>that?

Well, I obviously don't know what your code is doing, but chances are
hitting the 'debug' button will show you exactly in your code where this is
occuring. Then you can figure out why you're reading from invalid memory.

Good luck!

Alan Pinstein
Synergy Solutions, Inc.
http://www.synsolutions.com
1-800-210-5293

Reply via email to