Bug 37405

Summary: Undo is broken
Product: LibreOffice Reporter: clio <fyvaao>
Component: BASICAssignee: Noel Power <nopower>
Status: RESOLVED FIXED    
Severity: normal CC: c4.smithereens, chris, cno, freedesktopbmw, joelvanderwerf, LibreOffice, lml, r0polach, sasha.libreoffice, timofeev.i.s, v_mil
Priority: medium Keywords: regression
Version: 3.4.0 RC1   
Hardware: Other   
OS: All   
See Also: https://www.libreoffice.org/bugzilla/show_bug.cgi?id=40179
Whiteboard: bibisected35 bibisected35older target:3.7.0 target:3.6.0.0.beta3 target:3.5.6
Crash report or crash signature: Regression By:
Attachments: backtrace
backtrace

Description clio 2011-05-20 06:58:23 UTC
To reproduce:
1) Open Basic IDE
2) Type the following text:
qwe
rty
uio

3) Press Ctrl Z a few times.

Result: Nothing happens, but if you switch to another module and then return back, you can see that only Paragraph chars were removed by Undo. The text became "qwertyuio".

Regression against LibO 3.3.2 apparently caused by the fix for baside2b.cxx at 17-Feb-2011 ab81: #i108119# Fixed undo slot handling (that actually doesn't fix anything but adds new bugs, see i#108119# – Undo and Redo buttons don't work in OOo Basic in OOO320m8 http://openoffice.org/bugzilla/show_bug.cgi?id=108119).
Comment 1 Rainer Bielefeld Retired 2011-05-21 01:25:43 UTC
[Reproducible] with "LibreOffice 3.4.0RC1  – WIN7  Home Premium  (64bit) English UI [OOO340m1 (Build:11)]"

Undo is not completely broken, in some cases it works (a little), for example:

If you type "a b c d e" <ctrl+z> and also menu 'Edit > undo' will work, <ctrl+y> is broken, Menu 'Edit > Restore' (curiously called "Redo") works, but might mess up former order of letters.

If you delete result of latest test, now type something similar, but separate letters by <enter>, you will also see a reaction to <ctrl+z>, but after several useless attempts, and results will be unexpected, no one by one undo. <ctrl+y> also is broken, restore from menu works, but with unexpected results. 

Undo and Restore Icons work similar to menu items (with unexpected results).

It seems that undo stack and / or access to that stack are damaged.

<ctrl+y> problem is already reported as
Bug 36830 - Ctrl Y doesn't work in Basic IDE 

@Noel:
I saw you assigned in similar bug reports.
Please feel free to reassign if it's not your area!
Comment 2 clio 2011-05-21 13:11:05 UTC
Created attachment 46981 [details]
backtrace

If you press Backspace and Enter a few times after Ctrl ZZZZZZZZZ, you get a freeze/loop (on Linux)
Comment 3 clio 2011-05-23 13:20:23 UTC
The crash doesn't happen on the latest libreoffice-3-4 branch for me.
Comment 4 clio 2011-05-27 09:47:02 UTC
Created attachment 47234 [details]
backtrace

No, sorry, it was reproducible with libreoffice-3-4, and with LibO 3.4.0 rc2.
To reproduce:
1) Open Basic IDE
2) Type a long text by keyboard with paragraphs (i.e., somtimes press Enter)
3) Then press Ctrl ZZZZZZZZZZ, until no undo available
4) Press Backspace

Result: Crash
Comment 5 Viktor Mileikovskyi 2012-04-26 08:58:17 UTC
LibreOffice 3.5.2 @ Linux x86_64 doesn't crash. But only paragraph character removed.
There is a similar UNDO bug:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=40179
Is it a duplication - ???
Comment 6 Cor Nouws 2012-06-24 14:18:30 UTC
Undo just works fine in 3.5.4 for normal work.
Clio, is that regular work you report the problem with?
I would close this issue...
Comment 7 Ivan Timofeev (retired) 2012-06-28 03:28:29 UTC
fixed now, it's a general undo problem.
Comment 8 Ivan Timofeev (retired) 2012-06-28 03:29:53 UTC
*** Bug 40165 has been marked as a duplicate of this bug. ***
Comment 9 Ivan Timofeev (retired) 2012-06-28 03:35:40 UTC
*** Bug 45749 has been marked as a duplicate of this bug. ***
Comment 10 Ivan Timofeev (retired) 2012-06-28 03:40:59 UTC
*** Bug 40179 has been marked as a duplicate of this bug. ***
Comment 11 Ivan Timofeev (retired) 2012-06-28 03:42:40 UTC
*** Bug 42301 has been marked as a duplicate of this bug. ***
Comment 12 Ivan Timofeev (retired) 2012-06-28 03:51:43 UTC
*** Bug 49034 has been marked as a duplicate of this bug. ***
Comment 13 Ivan Timofeev (retired) 2012-06-28 03:53:06 UTC
*** Bug 48911 has been marked as a duplicate of this bug. ***
Comment 14 Ivan Timofeev (retired) 2012-06-28 03:55:45 UTC
*** Bug 51089 has been marked as a duplicate of this bug. ***
Comment 15 Ivan Timofeev (retired) 2012-06-28 04:12:35 UTC
*** Bug 41855 has been marked as a duplicate of this bug. ***