Undo History doesn't work if open before file is opened

Bug #1071082 reported by Rena Kunisaki on 2012-10-25
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

If I have the Undo History window open before opening a file, it will never update (always shows only "Unchanged"). It works only if opening it after opening a file. (20121024 trunk build, lubuntu x86, seen with earlier versions as well.)

su_v (suv-lp) on 2012-10-25
tags: added: ui undo
su_v (suv-lp) wrote :

Reproduced with Inkscape and 0.48+devel r11826 on OS X 10.7.4:

Steps to reproduce:
1) mv ~/.config/inkscape{,-bkp}
2) launch inkscape (without document)
3) open 'Edit > Undo history'
4) open existing document (e.g. from 'File > Open Recent')
5) edit an object

-> list in 'Undo History' does not get updated.

AFAICT this is only triggered if the document window (based on the default template) is reused to load an existing document.

su_v (suv-lp) wrote :

Undo/Redo using keyboard shortcuts or menu entries still works (doesn't break 'Undo' history itself, only the GUI for it) -> importance set to 'Low' for now.

The problem is aggravated in current trunk (dialog state is remembered across sessions) if combined with a workflow based on launching inkscape by itself, and opening existing files from within Inkscape.

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
su_v (suv-lp) wrote :

Results in crash with these steps:

Steps to reproduce in current trunk:
1) default (new) prefs:
   mv ~/.config/inkscape{,-bkp}
2) launch inkscape (without document)
3) open 'Edit > Undo history'
4) quit inkscape, relaunch
5) edit current doc (draw rectangle)
6) close window (Ctrl+W)
--> in new empty doc, 'Undo' history has old entries
7) click on top-most entry in 'Undo' history ([Unchanged])
--> crash

tags: added: crash
Changed in inkscape:
importance: Low → High
jazzynico (jazzynico) wrote :

Bug and crash confirmed on Windows XP, Inkscape trunk revision 11915.

Crash error message:

ERROR:src/document-undo.cpp:244:static gboolean Inkscape::DocumentUndo::undo(SPDocument*): assertion failed: (doc->priv != NULL)

Changed in inkscape:
status: Confirmed → Triaged
vaifrax (vaifrax) wrote :

By removing the entries when the document is closed, there won't be a crash any more as there are no more gui elements to click on which trigger the crash, see partial patch attached.
Unfortunately, after closing the window (ctrl + w) the gui still doesn't show the entries.

jazzynico (jazzynico) wrote :

Patch tested successfully on Debian testing, Inkscape trunk revision 12054.
Instead of having a outdated list of actions, the list is now empty and it's not possible to trigger a crash.

Just found a workaround that could give hints on the root of the remaining issue :

1. Start with step 5 from comment #1.
2. Release the dialog so that it is floating.
3. Open another (existing or new) document.
4. Select the original document -> the Undo history dialog is correctly updated.

It means that the undo action are correctly recorded in the event log, but the dialog is not updated.

jazzynico (jazzynico) wrote :

I suggest we test the patch again for regression and commit to the trunk.
It doesn't actually fix the bug, but at least prevents Inkscape from crashing.

jazzynico (jazzynico) wrote :

Partial fix committed revision 12225.
Lowering importance to Medium now that the application doesn't crash anymore.

Changed in inkscape:
importance: High → Medium
Rena Kunisaki (i-am-inuyasha) wrote :

Maybe worth noting, with this patch the actions list starts with "[Unchanged]" when Inkscape is first started, then when a document is opened, the list becomes completely empty.

Rena Kunisaki (i-am-inuyasha) wrote :

Noticed another interesting maybe-related issue. If I edit a document so some items are listed in undo history, then open a duplicate window, two unusual things happen:

1) The duplicate window comes with a duplicate Fill & Stroke, Layers, and other dialogs (which seems odd), but not a duplicate Undo History.
2) The undo history's "current position" moves to the beginning of the list once another item is added to it.

The exact behaviour seems to be somewhat inconsistent (sometimes I have a duplicate Undo History open, sometimes it reverts to the beginning immediately), but in general what happens is the cursor will move back to "unchanged" at the beginning of the list. Then, performing a redo or anything that adds to the undo history moves the cursor down, and undo moves it back up - exactly as expected, except it's in the wrong place.

Jabiertxof (jabiertxof) wrote :

It happens also in reverted files

jazzynico (jazzynico) wrote :

Reproduced on Windows 7 with Inkscape 0.48.5.
Not reproduced with 0.91 and 0.92.1, same operating system.

The crash issue occurred again with recent versions and is now reported in a separate report (bug #1670688 "Internal error on closing or saving").

Changed in inkscape:
milestone: none → 0.91
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers