EIntOverFlow when deleting text

  • Hi,

    Some of my end-users get an EIntOverflow exception when working with WPRichText.

    Apparently, the exception arises when pressing the 'Delete' key inside the text.
    Then, the contents of the document disappears (a blank document is shown).
    Undoing the last change makes the document reappear.

    It is difficult to reproduce exactly the circumstances leading to this problem, but I was able to find out that :

    it occurs apparently :
    - frequently
    - after copy-pasting from one document to another
    - inside edit fields
    - only when pressing the 'Delete' key

    the exception arises in TWPCustomRtfEdit.DoUpdate, apparently at line FMemo.ReformatAll :

    end else
    if (WPUPD_Code = WPUPD_REFORMAT) or
    ((WPUPD_Code = WPUPD_SPEEDREFORMAT) and
    (EditBoxModes <> []))
    then
    begin
    InWaitForPaintEditor := FALSE;
    if FMemo.RTFData.RTFEngineParams.NeedReformat then
    try
    FNowReformat := TRUE;
    FMemo.RTFData.NeedReformat(false);
    here > FMemo.ReformatAll;
    UpdateEditBox;
    SetScrollBarSize(false);
    SetScrollBarSize(true);
    finally
    FNowReformat := FALSE;
    end;

    Do you have an idea what could be causing this ?

    Thank you,
    Attila