Apache OpenOffice (AOO) Bugzilla – Issue 119681
Crash when undo a RegExp change
Last modified: 2012-07-25 09:07:18 UTC
Tested with both, AOO 3.4.0 and a recent deb build for 3.4.1, on openSUSE 11.4, 64 bits. On a Writer document, type several lines like Text text text text text text text text text text Now, open Search/Replace dialogue. On "Search for" type $, on "Replace by" a single space. Check "Regular expressions" under "More options" and hit "Replace all". Here comes a first problem: instead of a single line with all the words separated by a space, you get Text texttext texttext texttext texttext text Now the second problem: back to the document, hit Ctrl-Z a couple of times and you'll get a crash. Running from a terminal, I obtain a segment fault message for soffice on line 122: 7684 that ends with "$sd_prog/$sd_binary" "$@"
According to the test I did for bug 119526 the cursor insertion point influences the behavior, if I change the cursor position before undoing as described in https://issues.apache.org/ooo/show_bug.cgi?id=119526#c3 the crash does not happen. For example: - type two lines: Text Text - before replacing, the cursor position is at the end of the last line - search and replace - place the cursor at the beginning of the first line - undo There is no crash
can reproduce crash after double times Ctrl+Z, when cursor position at the end of text. cursor position may have different behavior, learn it.
*** Issue 120000 has been marked as a duplicate of this issue. ***
Requesting release blocker status: it's a crash
Write the content Text Text Text with cursor after the last word. Call find&replace with search for $ replace with blank RegExp checked backwards checked A warning pops up: To proceed with this action, you must first turn off the "undo" function. Do you want to turn off the "undo" function? [ Yes ] [ No ] [Cancel] Clicking "Yes" makes AOO hang with 100% CPU.
In a debug build I get an endless loop containing the message: Error: ### illegal index of sequence! C:/AOO_2012_05_git_Calc/trunk/main/solver/340/wntmsci12/inc\com/sun/stat/uno/Sequence.hxx at Line 174 (The one backslash is no typo, but this way in the error message.)
Doing as in 'Description' I get the error message: Error: operator[]: Index ausserhalb From File c:/AOO_2012_05_git_Calc/trunk/main/sw/source/core/bastyp/bparr.cxx at Line 138
Verified it on Aoo_Trunk_20120616.1800.1350879 and it also reproduces.
I have reproduced the described two defects on Windows 7 in OOo 3.4 Beta and AOO 3.4
Investigation reveals that fix for bug 102333 causes this defect. I will look for a solution which fits both - bug 102333 and this regression
set 3.4.1 release blocker flag
Investigation reveals that for these Search&Replace use cases the code which has been removed by fix for bug 102333 is needed, while it is wrong for the use cases of bug 102333. These use cases can be already distinguished internally. Thus, I will bring back the removed code, but guarding it with corresponding conditions.
fixed on branch AOO34 - changed file: /sw/source/core/doc/docedt.cxx, rev. 1352456
merged fix from branch AOO34 into trunk, revision 1352469
*** Issue 119526 has been marked as a duplicate of this issue. ***
*** Issue 120130 has been marked as a duplicate of this issue. ***
Verify steps: 1)New a Writer document 2)type servel strings, like test test test test 3)Open Find/Replace dialog, 4)On "Search for" type $, on "Replace by" a single space. 5)Check "Regular expressions" under "More options" 6)Click "Replace ALL" 7)Ctrl+Z serval times. result: On WindowsXP with AOO341 branch 1354891 1)after step 6, a single line with all the words separated by a space 2)after step 7, no crash.
Suggest Regina Henschel to open another defect about AOO hang. I also reproduce it.
Verified pass on trunk r1362376
set target milestone AOO 3.4.1