Bug 133490 - Unwanted "Text box" movement after Undo'ing last Move
Summary: Unwanted "Text box" movement after Undo'ing last Move
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: x86-64 (AMD64) All
: high critical
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard: target:7.1.0 target:6.4.7 target:7.0.2
Keywords: bibisected, bisected, regression
: 135624 135649 (view as bug list)
Depends on:
Blocks: Textbox Undo-Redo
  Show dependency treegraph
 
Reported: 2020-05-29 08:23 UTC by fred4u
Modified: 2021-04-08 15:22 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Bibisect log (2.89 KB, text/plain)
2020-05-30 13:49 UTC, Telesto
Details
Redundant example file (9.89 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-08-18 22:08 UTC, Telesto
Details
Screencast (10.47 MB, video/mp4)
2020-08-31 12:41 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fred4u 2020-05-29 08:23:06 UTC
Description:
"Text box" performs unwanted movement after Undo'ing last Move.
In specific scenario, where there are three text boxes, moving one of these and undoing the move causes one of the other ones to move also.

Steps to Reproduce:
1.Create new Writer document (Doc1)
2.Insert a Text box here, type "Doc1 text box"
3.Keep Doc1 open, launch new Writer window
4.Insert a Text box here, type in "Doc2 text box"; locate in it upper-left corner
5.Copy & paste the "Doc2 text box", put the copy to the lower-right corner, change the text do "Doc2 text box copy"
6. Switch do Doc1, copy the text box from here (Ctrl+C)
7. Switch back to Doc2, paste the text box from Doc1, place it in the middle of the page
8. Move the just-pasted "Doc1 text box"
9. Undo the move (Ctrl+Z) and see how the "Doc2 text box copy" performs additional unwanted move

Actual Results:
Text box ("Doc2 textbox copy")that was supposed to stay where it was, moves around on page.

Expected Results:
Text box ("Doc2 textbox copy") stays where it was, and only the move of "Doc1 text box" is undone


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Wersja: 6.4.4.2 (x64)
Identyfikator kompilacji: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
Wątki CPU: 4; System operacyjny: Windows 10.0 Build 18363; Render UI: GL; VCL: win; 
Ustawienia regionalne: pl-PL (pl_PL); Język UI: pl-PL
Calc: threaded
Comment 1 BogdanB 2020-05-29 08:40:41 UTC
Repro. Exactly how described in the steps.

Version: 6.4.4.2 (x64)
Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: ro-RO (ro_RO); UI-Language: en-US
Calc: threaded
Comment 2 Telesto 2020-05-29 21:25:22 UTC
Introduced in 6.4
Comment 3 BogdanB 2020-05-30 05:20:28 UTC
bibisected:
 b9206a9145d071e12ca70f09b1f625feb2532549 is the first bad commit
commit b9206a9145d071e12ca70f09b1f625feb2532549
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Aug 20 22:23:44 2019 +0200

    source 8d84f32d55df06c2944da78e2b779de2dba21d50
    
    source 8d84f32d55df06c2944da78e2b779de2dba21d50

 instdir/program/libmswordlo.so | Bin 2815824 -> 2815984 bytes
 instdir/program/versionrc      |   2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
Comment 4 Telesto 2020-05-30 13:49:39 UTC
Created attachment 161428 [details]
Bibisect log

Bisected to
author	Vasily Melenchuk <vasily.melenchuk@cib.de>	2019-08-15 12:08:06 +0300
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2019-08-19 11:15:22 +0200
commit 09228fabe88f3457105cf26d83c003719a793114 (patch)
tree 7a3c75f27de075dba58932fe328c7bac1961719c
parent 92d1b0d10ec04f17d116bc54aada652f1c2cac4a (diff)
sw undo/redo: avoid usage of pointers as a style references
Style can be created on previous undo steps and so after undo/redo
pointer can became invalid. Style name as a reference looks like
a good alternative to pointers.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=09228fabe88f3457105cf26d83c003719a793114
Comment 5 Telesto 2020-05-30 13:51:09 UTC
Adding CC to: Vasily Melenchuk
Comment 6 Xisco Faulí 2020-08-13 15:25:14 UTC
*** Bug 135624 has been marked as a duplicate of this bug. ***
Comment 7 Xisco Faulí 2020-08-13 15:25:33 UTC
*** Bug 135623 has been marked as a duplicate of this bug. ***
Comment 8 Xisco Faulí 2020-08-13 15:32:46 UTC
*** Bug 135649 has been marked as a duplicate of this bug. ***
Comment 9 Telesto 2020-08-18 22:08:57 UTC
Created attachment 164432 [details]
Redundant example file

Having another example which smell like this bug where an image of page 3 is moving to page 11 after undo of a frame movement

1. open the attached file
2. Go to page 10
3. Move the frame to 3 different positions on the page (drag and drop)
4. Undo everything
Comment 10 Telesto 2020-08-18 22:14:03 UTC
Bumping priority up a little bit as the bug even results totally unrelated images moving across pages..

And the fix should ideally make it into 6.4 final
Comment 11 Commit Notification 2020-08-21 21:45:20 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a6c2a87612a10d55fc59fa01e44d67d95505834f

tdf#133490: set name for pasted frame format

It will be available in 7.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Vasily Melenchuk (CIB) 2020-08-24 18:36:00 UTC
Both described issues are no longer reproducible with master
Comment 13 BogdanB 2020-08-26 19:14:13 UTC
Great. Solved!

Verified in
Version: 7.1.0.0.alpha0+
Build ID: 217122387f6e0ef657b8ba85eae082b448901cec
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 14 Commit Notification 2020-08-27 08:22:49 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/8c0cf4e63c1522a58584f93f38cda71b87c9bb3a

tdf#133490: set name for pasted frame format

It will be available in 6.4.7.

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

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2020-08-27 11:01:48 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/42770e9c231bec7cec383b4c0d6979b0d7a329ee

tdf#133490: set name for pasted frame format

It will be available in 7.0.2.

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

Affected users are encouraged to test the fix and report feedback.
Comment 16 Telesto 2020-08-30 20:38:02 UTC
I'm still having issues see bug 136308 (and also when following STR of comment 9)
Comment 17 BogdanB 2020-08-31 09:52:22 UTC
Telesto, no repro in
Version: 7.1.0.0.alpha0+
Build ID: e2f4e65a7b8024c00b049eebf0d87637efda7f24
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 18 Telesto 2020-08-31 12:41:21 UTC
Created attachment 164919 [details]
Screencast

Version: 7.1.0.0.alpha0+ (x64)
Build ID: 1e0cfd5662d95cea84e80e4fe10d52c3b1101ae6
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

Ignore the bad font quality GDI mode (disappearing images with Skia)
Comment 19 Xisco Faulí 2020-09-06 14:42:54 UTC
(In reply to Telesto from comment #16)
> I'm still having issues see bug 136308 (and also when following STR of
> comment 9)

AS the commit says, set name for '''pasted''' frame format, so most likely you are facing a different issue. Please, create a follow-up report and bisect it again to make sure it was introduced by the same commit.
Closing this one as VERIFIED FIXED. Meanwhile, I'm working on a unittest for this.
Comment 20 Commit Notification 2020-09-06 16:29:26 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7b4b1cb7c753fadbc20892ef8cc961b7a61e8d19

tdf#133490: sw_uiwriter: Add unittest

It will be available in 7.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2020-09-15 13:27:27 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/6df6c300ea499b260af0daa4d9a97f320e3e161e

tdf#133490: sw_uiwriter: Add unittest

It will be available in 7.0.2.

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

Affected users are encouraged to test the fix and report feedback.