Bug 95096 - ibus keyboarding solution - kmfl characters are not "swallowed" for cell in row with "table in table"
Summary: ibus keyboarding solution - kmfl characters are not "swallowed" for cell in r...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0 target:5.0.4
Keywords: bibisected, regression
Depends on:
Blocks: VCL-Scheduler
  Show dependency treegraph
 
Reported: 2015-10-15 19:04 UTC by Justin L
Modified: 2018-10-21 02:50 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
most places on page2 crash. Page1 content does not crash (859.50 KB, application/msword)
2015-10-15 19:04 UTC, Justin L
Details
minimal document demonstrating the bugs (9.16 KB, application/vnd.oasis.opendocument.text)
2015-10-23 05:35 UTC, Justin L
Details
backtrace from gdb - following the steps in comment 5. (7.44 KB, text/plain)
2017-10-20 06:05 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2015-10-15 19:04:55 UTC
Created attachment 119649 [details]
most places on page2 crash.  Page1 content does not crash

Several related problems
1.)  Writer exits with an exclamation mark OK box.  (ibus kmfl sequence like ;a turning into ä) because somehow the text context is lost.
2.)  Not all of the characters are swallowed up when 3 or more characters make up a kmfl sequence.  Each character is deleted one at a time, and when the text context is lost, further deletes are dropped.

This is a hard bug to test because it requires something like KMFL keyboards configured.
Comment 1 Justin L 2015-10-16 19:17:37 UTC
submitted patch to resolve #1:  https://gerrit.libreoffice.org/19414 tdf#95096 avoid invalid cursor position exception

I'm still trying to track down #2.  Somehow the text is getting invalidated, and so the remaining "delete character" commands are dropped because the string context has become invalidated.
Comment 2 Justin L 2015-10-17 09:09:09 UTC
problem #2 appears when there is a table in table somewhere in that row.

On page 1, all of the text is in a table-in-table.  That means that for those rows, there is not another table somewhere in the row - it is already the "inside" row.

On Page 2, the pictures were place inside a table-in-table.  So the text was in the "outside" row, and thus affected.

Removing the table-in-tables in a row allows ibus kmfl to swallow all the composing characters anywhere in that row.
Comment 3 Justin L 2015-10-17 10:29:13 UTC
for the record: #1 was bibisected to a week's worth of "catch uncaught exceptions".  #2 showed up when OOo accessibility code was imported, so neither of those two are helpful in discovering a complete fix.

This is such an unlikely combination that it likely isn't worth putting more effort into it.
Comment 4 Commit Notification 2015-10-17 11:56:29 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d9cf47449e88032803aa4fa3429cd607a074d5ad

tdf#95096 avoid invalid cursor position exception

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Justin L 2015-10-23 05:35:38 UTC
Created attachment 119897 [details]
minimal document demonstrating the bugs

Steps to reproduce part #2:

First, you must have something like ibus/kmfl setup with GE keyboard.
(see  bug 91641) as well as using LO patched for problem #1.

-open the test .odt and turn on the GE keyboard
-in the "working cells", type ;;~a.  Notice that this sequence all converts to ä̃
-in the "broken cell", type ;;~a.  Notice that only ~ is deleted, and ;; remains behind.
Comment 6 Justin L 2015-10-23 05:49:58 UTC
I'm running pretty stuck on resolving part#2. I have some SAL_WARN debugging set up on gerrit (https://gerrit.libreoffice.org/19415)

Visibly, the problem is that a kmfl character composing sequence (like ;;~a for ä̃) doesn't delete all of the composing sequence in a table cell when the row contains a table-in-table.  Code-wise, the problem is something like the accessible PortionData loses the focus after the first character is deleted, and thus the two remaining signalIMDeleteSurrounding calls do nothing because they can't find the focus/cursor context.  The problem apparently comes from external layout calls - it doesn't seem to be a logic failure in the direct code path.

Potential fix concepts are a.) locking outside changes until ibus's 3xdelete + add character is done, b.) preventing loss of focus / requiring FocusWin to actually have a focused portion, or c.) falling back to cursor position if no portion has the focus.
Comment 7 Commit Notification 2015-10-27 11:29:52 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9f008e2ae5e9d090ca011e5a6146e221e6799531&h=libreoffice-5-0

tdf#95096 avoid invalid cursor position exception

It will be available in 5.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Justin L 2015-12-09 13:54:30 UTC Comment hidden (no-value)
Comment 9 Robinson Tryon (qubit) 2015-12-14 04:50:44 UTC Comment hidden (obsolete)
Comment 10 Justin L 2016-02-10 10:21:43 UTC Comment hidden (no-value)
Comment 11 Björn Michaelsen 2016-04-19 14:27:06 UTC
(In reply to Justin L from comment #8)
> same "not swallowing composing characters" problem in Writer's comments.  Bibisected back to LO 3.5.
(In reply to Justin L from comment #10)
> part2 (table-in-table kmfl) was working today in 5.2dev.

Is there anything left in this bug? Aka not a dupe of bug 91641 as per comment #8, not "part2" as per comment #10 and not fixed by commit d9cf47449e88032803aa4fa3429cd607a074d5ad?

Please describe what is still open as I have lost track. => NEEDINFO
Also please update version as appropriate (comment #8 suggests this is maybe 3.5?)
Comment 12 Justin L 2016-05-10 14:06:10 UTC
This bug is still a problem - best described by Comment 5.

ignore Comment8: common problem for many different reasons. This bug not connected to others AFAIK.
ignore Comment 10: Poor testing on my part - only fixed for "two character" sequences.

I bibisected the "two character" sequence "fix" (from Comment 10) way back to 2015-03-06 and a series of commits by Tobias Madl related to Idle/Timer handling.  That makes sense.  I just noticed that if I SLOWED DOWN my typing, then a two-character sequence ALWAYS was properly swallowed, but if I typed them very fast it wasn't working until Tobias' changes.

The four character sequence is still not swallowed completely, although Tobias' changes did help with that too.  Before his changes I could never get it to swallow more the two characters.  I can now get three characters swallowed, but never four.

Set version to 4.3: Bibisected problem #2 to commit 76c549eb01dcb7b5bf28a271ce00e386f3d388ba - "Integrate branch of IAccessible2" Nov 29 2013.
Comment 13 Justin L 2017-10-20 06:05:34 UTC
Created attachment 137130 [details]
backtrace from gdb - following the steps in comment 5.

visually, the ";;" remained on screen and the ~a had already been "swallowed" by the time the assert halted everything.

Tested with Ubuntu 16.04 and LO 6.0alpha1.
Comment 14 QA Administrators 2018-10-21 02:50:56 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug