Issue 34830

Summary: Repeat insert on a paragraph hangs Writer
Product: Writer Reporter: sshreyas <sshreyas>
Component: editingAssignee: eric.savary
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P2 CC: issues
Version: OOo 1.1.3Keywords: crash, oooqa
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description sshreyas 2004-09-30 11:45:20 UTC
Description of Problem: Open Office crashes when a redo insert operation is
performed after some text is pasted in the writer.

Steps to reproduce the problem:
1. Copy some text( I had copied the commands and the data from the terminal
and pasted it on the writer) and paste it in the writer. 
2. Select some small portion of the text(say two words) from the text
already pasted. 
3. Then perform the redo insert operation. 

Actual Results: Open Office crashes.

Expected Results: It should perform redo of the insert.

How often does this happen? always

Further details at http://bugzilla.ximian.com/show_bug.cgi?id=66707
Comment 1 mci 2004-09-30 12:50:48 UTC
hhmmm, thisd is not reproduceable here on Solaris using the installset from OOo...
Comment 2 eric.savary 2004-09-30 14:53:28 UTC
I cannot reproduce it either.

Please detail step by step how you copy/paste (keyboard, context menu, menu,
icons... if you paste or paste special)
Can you confirm if you execute a *Redo* or ar "Repeat"? Following your
description, it shouldn't be possible to "redo" if you have not "undone"
something first.
What is yur system?
Comment 3 eric.savary 2004-09-30 15:02:37 UTC
.
Comment 4 sshreyas 2004-10-01 06:46:28 UTC
---Test Data---
They are just looking at me so I continue: “The problem, the contradiction the
scientists are stuck with, is that of mind. Mind has no matter or energy but
they can't escape its predominance over everything they do. Logic exists in the
mind. Numbers exist only in the mind. I don't get upset when scientists say that
ghosts exist in the mind.

It's that only that gets me. Science is only in your mind too; it's just that
that doesn't make it bad. Or ghosts either.

“Laws of nature are human inventions, like ghosts. Laws of logic, of mathematics
are also human inventions, like ghosts. The whole blessed thing is a human
invention, including the idea that it isn't a human invention. The world has no
existence whatsoever outside the human imagination. It's all a ghost, and in
antiquity was so recognized as a ghost, the whole blessed world we live in. It's
run by ghosts."
---/Test Data---

Ack: Robert Pirsig, "Zen and the Art of Motorcycle Maintenance"

1) Copy the test data above into Writer. 
2) Copy the second paragraph including the _line break_ after the end of the
paragraph and paste it into the middle (2/3rd and so on line) of any other
paragraph.
3) Keep the cursor within/select some text *in the newly pasted region*
4) Click Edit->"Repeat: Insert Clipboard" or "Repeat: Insert $1" hangs Writer.

Tested on Windows 1.1.0 and OpenOffice.org 1.9.51 on Linux.

Hope that helps :-)> 
Comment 5 andreschnabel 2004-10-12 15:14:18 UTC
I could verify, using the description on Win XP, OOo 1.1.3 german (Setting to NEW).

NOTE:
I cannot confirm for 1.9m54, as Edit -> Repeat does not become active, but this
seems to be another bug (and not the solution), as Edit -> Paste is'nt active
either (although I'm able to paste via keyboard)
Comment 6 eric.savary 2004-10-12 17:43:16 UTC
I have to confess that I cannot really follow the last description to reproduce
the crash but what I have found must be near or even the same.

Tested on Linux SuSE 9.1 with OOo1.1.1, ...1.1.2, ...1.1.3 and src680m56 build 8814.

Test:
1) dt+f3 to insert the dummy text in a new document
2) set the cursor in the middle of the paragraph, at he end of a line
3) press Return to create 2 paragraphs
4) select a piece of text including the created paragraph mark
5) Copy (Ctrl+C)
6) Edit - Paste Special - Unformatted text

A-> at this point, the Edit menu - in the src680m56 only - shows "Repeat: insert
$1" which is a small string bug but...

B-> ...if I now execute "Repeat: insert $1" and then undo this repeat, I get a
crash (stack id 89268).

C-> ...if I execute "Repeat: insert" in OOo1.1.x, OOo freezes with the menu
open. I have to kill it.

Now if you have not yet tried B), in the src680m56, you can go further and:

7) select again a piece of text between the 2 paragraphs
8) Copy again (Ctrl+C) and keep the text selected.
9) Execute "Edit - Repeat: insert $1"

C-> at this point, the menu stays open, OOo src680m56 freezes like OOo1.1.x.
The only small difference is that I have to change to another tty to kill OOo
because *the whole X* freezes...
Comment 7 eric.savary 2004-10-12 17:46:54 UTC
ES->hbrinkm: can you please investigate on my findings?
I guess we have different bugs here (A, B, C). Tell me which one you want as a
separate issue.
As there's at least a freeze in OOo1.1.3, we could think about an OOo1.1.5
(though it's not a regression)
Comment 8 eric.savary 2004-10-12 17:47:21 UTC
.
Comment 9 frank.meies 2004-10-13 10:07:02 UTC
I'll have a look on behalf of hbrinkm.
Comment 10 frank.meies 2004-10-13 10:07:48 UTC
.
Comment 11 thackert 2004-10-17 16:46:26 UTC
I have tried to reproduce this issue under SuSE 9.1 with OOo-1.9.56 different
times, but could not reproduce it. Is this only an issue depending on special
distributions/windows?
Comment 12 frank.meies 2004-10-19 09:59:30 UTC
FME->ES: B)  seems to be fixed with 117740 (swqbugfixes07).
Comment 13 eric.savary 2004-10-19 14:32:04 UTC
->thackert: maybe you didn't follow the description step by step... I have a
SuSE 9.1 too.
Anyway, thanx for tracking this but the developpers could reproduce it and are
now aware about it.
Comment 14 eric.savary 2004-10-19 14:41:49 UTC
To sum up a little bit, there are multiple problems in this issue:

1) as described in 9), problem C: the total freeze in build 680m56 will be fixed
by simply disabling the Edit - Repeat after pasting/paste special.
A second issue (issue 35785) has been filed which aims to enable anew the entry
and fix the freeze (OOo later).
2) issue 35776 addresses problem A (wrong string)
3) internal task 117740 has been fixed in cws swqbugfixes07 (problem B)
4) issue 35781 deals with problem C, at step 6 (freeze in OOo 1.1.x)
Comment 15 frank.meies 2004-10-19 14:46:57 UTC
FME: 'Fixed' (i.e., disabled 'repeat' for 'paste special' by handling 'paste
special' like regular 'paste') in swdtflvr.cxx rev. 1.82.10.1 cws swqbugfixes09.
Comment 16 frank.meies 2004-11-04 11:42:40 UTC
Ready for QA.
Comment 17 frank.meies 2004-11-04 11:43:07 UTC
.
Comment 18 frank.meies 2004-11-04 11:43:31 UTC
.
Comment 19 michael.ruess 2004-11-09 13:42:47 UTC
Verified fix in CWS swqnugfixes09.
Comment 20 eric.savary 2004-11-26 07:55:40 UTC
Ok in src680m63