Bug 89659 - EDITING: Input fields get corrupted while making any changes
Summary: EDITING: Input fields get corrupted while making any changes
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.8.2 release
Hardware: x86-64 (AMD64) All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Fields
  Show dependency treegraph
 
Reported: 2015-02-25 18:29 UTC by mchan223
Modified: 2020-01-13 09:11 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document - click on any field and mash keyboard, watch chaos ensue (14.74 KB, application/vnd.oasis.opendocument.text)
2015-02-25 18:29 UTC, mchan223
Details
Screenshot of chaos in 5.2.3 (4.57 KB, image/png)
2016-11-23 16:35 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mchan223 2015-02-25 18:29:18 UTC
Created attachment 113682 [details]
Sample document - click on any field and mash keyboard, watch chaos ensue

To replicate: 

1. Create multiple variables.
2. Insert multiple input fields for those variables in close proximity to each other (within 1-3 lines or so).
3. Click on one of the fields and type something in.
OR
3. Insert a variable field for one of these variables elsewhere in the document, double-click on that and edit it.


Current behavior:

Characters at the beginning and end of nearby(?) input fields get deleted, "pushed out" of the input field and turned into regular text, or replaced with "!!br0ken!!", or some combination of the foregoing.

Sometimes this starts happening even while inserting the input fields.


Expected behavior:

Editing one variable should never affect any other variable.

Inserting input fields outside of an input field should not affect either old or new input field's variable.

              
Operating System: Windows 7 Professional
Version: 4.4.0.3 release
Last worked in: 4.1.6 release (possibly 4.3? - definitely did not exist before inline input fields were introduced in any event)


Severity marked as "major" as this completely breaks numerous templates I have - I can re-do the template as to get rid of all input fields, but the end effect of that is that I can't use input fields at all.
Comment 1 Buovjaga 2015-03-03 15:42:38 UTC
Reproduced with attachment 113682 [details], but not with v. 4.2.0. Marking as regression.

Win 7 Pro 64-bit, LibO Version: 4.4.1.2
Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Locale: fi_FI

Version: 4.5.0.0.alpha0+
Build ID: 7c0eb12009496a35c927cd5b2520f9c34d50860b
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-03-03_10:52:12
Locale: fi_FI

Ubuntu 14.10 64-bit
Version: 4.4.1.2
Build ID: 40m0(Build:2)
Locale: en_US

Version: 4.2.0.4
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Comment 2 Björn Michaelsen 2015-03-03 23:57:47 UTC Comment hidden (obsolete)
Comment 3 Björn Michaelsen 2015-03-07 15:31:46 UTC
Was already broken even in 4.2.8
Comment 4 Matthew Francis 2015-03-28 12:47:32 UTC
OK, so I'm not sure exactly what is supposed to have been broken since 4.2.8 - if there is anything we'll need more exact reproduction instructions because I can't see it.

However, there is a clear bug which was introduced in mid 4.4 master, and that seems to be the one that results in the !!br0ken!! message. To reproduce it, 
- Load attachment 113682 [details]
- Move the cursor right one character (into the first field)
- Type "A"s for a while
- Undo

This specific bug was introduced by the below commit, so let's go with that for now.
Adding Cc: to mstahl@redhat.com; Could you possibly take a look at this? Thanks

    commit cd94a84b89c476760ad74bf088a5d6f8ba4ce209
    Author:     Oliver-Rainer Wittmann <orw@apache.org>
    AuthorDate: Fri Jun 13 14:08:22 2014 +0000
    Commit:     Michael Stahl <mstahl@redhat.com>
    CommitDate: Fri Jun 13 20:32:14 2014 +0200
    
        125044: - use field's content cache on <SwTxtFld> construction only
Comment 5 Robinson Tryon (qubit) 2015-12-13 11:12:10 UTC Comment hidden (obsolete)
Comment 6 Mike Kaganski 2016-11-19 08:28:32 UTC
While I played with the test file on different LO versions, I've seen characters "jumping" out of fields, unability to delete characters, wrong display.
But I cannot reproduce it anymore with 5.2.3.3. Everything seems OK.
Comment 7 Buovjaga 2016-11-23 16:35:35 UTC
Created attachment 128967 [details]
Screenshot of chaos in 5.2.3

Open document, move one step to the right, hold down the "a" key.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.3.3
Build ID: 5.2.3-1
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha1+
Build ID: 76683829204103446476443b099492c402929004
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4; Layout Engine: new; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 21st 2016
Comment 8 QA Administrators 2017-11-24 17:34:18 UTC Comment hidden (obsolete)
Comment 9 sdc.blanco 2020-01-12 23:36:15 UTC
Could not reproduce.  Used attachment 113682 [details].  Was able to change each input field, where only the other fields with the same variable changed, without affecting the other fields.  Also inserted a user field elsewhere and edited its value, which changed in the relevant input fields.

Version: 6.3.4.2 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US
Calc: threaded

(In reply to Matthew Francis from comment #4)
> > However, there is a clear bug which was introduced in mid 4.4 master, and
> that seems to be the one that results in the !!br0ken!! message. To
> reproduce it, 
> - Load attachment 113682 [details]
> - Move the cursor right one character (into the first field)
> - Type "A"s for a while
> - Undo

Could not reproduce.


(In reply to Buovjaga from comment #7)

> Created attachment 128967 [details]
> Screenshot of chaos in 5.2.3
> 
> Open document, move one step to the right, hold down the "a" key.

Why do you think it is chaos?   Note that the paragraph style for the first fields are Centered Bold Caps Heading.  If you change the style to Default (for example), then the screen will appear differently.

Maybe this is now WFM?
Comment 10 Buovjaga 2020-01-13 09:11:46 UTC
Ok, I guess I mistook the normal behaviour for chaos. Indeed, there is no !!br0ken!! or characters turning into regular text.

Arch Linux 64-bit
Version: 6.5.0.0.alpha0+
Build ID: a7afbbb86d4bb107dfbb24604c46ed9352bcb425
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: kf5; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 7 January 2020