Bug 47646 - EDITING: Crash after undo'ing multiple steps
Summary: EDITING: Crash after undo'ing multiple steps
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.5.1 release
Hardware: All All
: medium critical
Assignee: David Tardon
URL:
Whiteboard: BSA target:4.2.0 target:4.1.0.2
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2012-03-21 05:43 UTC by th.sammer
Modified: 2015-12-17 06:52 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Drawing with many objects, the right part is grouped together. (9.69 KB, application/vnd.oasis.opendocument.graphics)
2013-03-20 19:20 UTC, CassieLX
Details

Note You need to log in before you can comment on or make changes to this bug.
Description th.sammer 2012-03-21 05:43:35 UTC
Problem description: 

Steps to reproduce:
1. Mark any drawing wich consists of various lines, circles...
2. ...move it with the arrow buttons stepwise to another place...
3. ...undo as much steps as possible...
4. ...press any button and you're done!

Current behavior: LibreOffice crashes

Expected behavior: LibreOffice don't crashes

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Comment 1 sasha.libreoffice 2012-06-14 04:07:54 UTC
Thanks for bugreport
Please, verify if in last version of LibreOffice still reproducible
Comment 2 bfoman (inactive) 2012-08-24 07:40:17 UTC
Could you attach any example documents to allow others to check on different
system/build?
Comment 3 CassieLX 2013-03-20 19:20:10 UTC
Created attachment 76841 [details]
Drawing with many objects, the right part is grouped together.
Comment 4 CassieLX 2013-03-20 19:30:06 UTC
I can reproduce it in LibreOffice V4.0.1.2 in Windows XP SP3.

As an addition while undoing and redoing it seems to skips a step.
Perhaps it is related to grouping objects together.

I had upload a drawing to reproduce the bug:

1. open the file
2. move all objects around and place them everywhere
   (many steps 10 or 15)
3. ungroup all objects
4. undo all steps
5. redo all steps
6. undo all steps
7. redo all steps

You can see some objects disappear.

After closing Libre Office Draw it crashes and opens a windows to recover a document.

I think it has also something to do with grouping, perhaps bug 57628?

Can someone confirm this bug, please?
Comment 5 CassieLX 2013-03-20 19:57:54 UTC
In addition:

I cannot reproduce the bug in LibreOffice V3.5.7.2 in Ubuntu 12.04.2.
But I can reproduce the bug in LibreOffice V4.0.1.2 in Ubuntu 13.04 (Beta1) and has the same behavior like in WindowsXP.
Comment 6 Jorendc 2013-03-20 20:17:11 UTC
I see Papamatti reproduced the bug, add a file and add steps how to reproduce. Therefore we can mark this as NEW.

Thanks Papamatti for additional informion. Thanks @reporter for reporting.

We can set priority to Critical Medium [1].
Critical: crash
Medium: not reproducible by MANY or MOST users (unless there are more confirmations about this one).

Kind regards,
Joren

[1] https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg
Comment 7 sasha.libreoffice 2013-03-21 05:21:30 UTC
reproduced incorrect undo and crash using attachment and steps from comment 4
LO 4.0.1 installed from rpm files downloaded from libreoffice.org
OS: Russian Fedora Remix 64 bit
Comment 8 Caolán McNamara 2013-06-26 15:50:00 UTC
bibisect suggests the range 4d7cb46fa2f9552aa479483bde2fcf9c31e2ee13..44db691206bf8b413dd04ffb6c762a539d3f2dc1
Comment 9 Caolán McNamara 2013-06-26 15:57:09 UTC
commit 115054fef08998c56cba8f14472df1d15007f635

I don't get the crash, but there is a regression on the redo, move three arrows, ungroup three arrows, ctrl+z * 6, ctrl+y * 6 and final state is not the same as original state
Comment 10 David Tardon 2013-06-27 08:45:48 UTC
I think the problem is that the objects are moved from one objlist (a group) into another one (the page). The code is not prepared for this.
Comment 11 David Tardon 2013-06-27 10:06:57 UTC
Okay, so we need to stop listening when the object is removed from the objlist. The embarrassing thing about that is that I initially had done that, but then removed the code, because I thought it would not be necessary...
Comment 12 Commit Notification 2013-06-27 10:19:48 UTC
David Tardon committed a patch related to this issue.
It has been pushed to "master":

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

fdo#47646 fix undo of ungrouping



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 13 Commit Notification 2013-06-27 19:13:52 UTC
David Tardon committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=279e329c2d52940c759f40eb59b5f931c4e68b7c&h=libreoffice-4-1

fdo#47646 fix undo of ungrouping


It will be available in LibreOffice 4.1.

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 14 Robinson Tryon (qubit) 2015-12-17 06:52:00 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]