Deleting Text causes AV

  • Julian,

    Summery:
    I am having a problem that sometimes occurs when deleting text. It seems to happen if the cursor is in a table when you hit the delete key.

    Details:
    This is hard to describe, but I'll do my best. The caps are emphasis, not yelling :P. Start by loading the following document (I loaded into the mini program using WPTools 5.20.8). Next, drag selecting (with the cursor) at the beginning of the first paragraph down to the end of the "LET YOUR CARE TAKERS KNOW ABOUT THE FOLLOWING" section. HERE IS THE KEY: The end of your selection (the final cursor position) needs to be on the same line as the last bullet of that section, NOT ON THE BLANK LINE below the table. Then, let go of the mouse to complete the selection. Then hit the delete key. That process yields the following error (see below). However, if I select from the first paragraph down to and INCLUDING THE BLANK LINE after the section (the line past the last bullet), then it does not error. The error details and WPT source are below.

    I know it is kind of bizarre, but my users are deleting text that way and it is erroring. Any ideas?

    Here is the error:

    Code
    exception message : Access violation at address 005D97D8 in module 'ExitDMS2.exe'. Read of address 0000000F.

    Here is a the call stack:

    Code
    005d97d8 +020 ExitDMS2.exe WPRTEDefs            TParagraph.DeleteChars005f128a +772 ExitDMS2.exe WPRTEDefs            TWPRTFDataCursor.ClearTextInbetween005f1bfa +5b2 ExitDMS2.exe WPRTEDefs            TWPRTFDataCursor.ClearSelection006164ab +01f ExitDMS2.exe WPRTEPaint           ClearSelection0061662f +157 ExitDMS2.exe WPRTEPaint           SetChar006176aa +212 ExitDMS2.exe WPRTEPaint           TWPRTFEnginePaint.InputString0067be34 +4e0 ExitDMS2.exe WPCTRMemo   5941 +80 TWPCustomRtfEdit.KeyDown004b987c +090 ExitDMS2.exe Controls             TWinControl.DoKeyDown004b989e +00a ExitDMS2.exe Controls             TWinControl.WMKeyDown004b4457 +2bb ExitDMS2.exe Controls             TControl.WndProc004b82ad +499 ExitDMS2.exe Controls             TWinControl.WndProc00686cc2 +00a ExitDMS2.exe WPCTRMemo  13104  +4 TWPCustomRtfEdit.WndProc

    Here is the assembly:

    Code
    0067be22 5941   push    00067be24        mov     eax, [ebp-8]0067be27        mov     eax, [eax+$7d0]0067be2d        mov     cl, 10067be2f        mov     edx, $67c9ec0067be34      > call    -$649a1 ($617498)      ; WPRTEPaint.TWPRTFEnginePaint.InputString0067be39 5942   mov     eax, [ebp-8]0067be3c        mov     edx, [eax]0067be3e        call    dword ptr [edx+$144]0067be44 5943   mov     eax, [ebp-8]0067be47        mov     edx, [eax]

    Here is the WPT source: