Page 1 of 1

Android crash in Hide after I added a toolbar

Posted: Fri Jul 11, 2025 11:33 pm
by whisper1980
I added a toolbar based entirely on your Editor2 demo. It works great on iOS, but crashes Android when I do a rve.Clear (even though your demo does not crash).

In fmxRVSelectionHandlesFM, procedure TRVFMXSelectionHandles.Hide, line 594 you have this:

Code: Select all

  if CaretPt <> nil then
    CaretPt.Visible := False;
The first time I go to load the TRichViewEdit, I invoke Clear, and the value of CaretPt is: $b400007b0f1108d0 (your demo has a value that is also not nil ($b400007b0f0d2970).

If I set it to nil using the debugger this one time, it continues just fine and does not crash, and I can continue to clear and load new content into the TRichViewEdit without fail. I must not be doing something after adding the toolbar, but I can't find what that might be.

Some other things: I also don't get that little balloon popup to move the caret precisely as in your demo. On iOS only, my app doesn't crash at all, but I can't place the caret in a word... it puts the caret at the start or end of the word I tap on.

Got any ideas?
Eric