Writer crashes on save when merging documents.

Discuss the word processor
Post Reply
thefuzzy0ne
Posts: 20
Joined: Thu Apr 14, 2011 12:52 pm

Writer crashes on save when merging documents.

Post by thefuzzy0ne »

Hi, everyone. I'm currently trying to help a friend publish a book on Amazon, which unfortunately means that I won't be able to upload the source.

I've been trying to merge his modified copy with mine (via Edit => Compare Documents), and everything goes fine using the Accept/Reject Changes window, until either the autosave kicks in, or I inevitably click the Save button. That's when OpenOffice Writer crashes with an "unknown error", and recovery of the document always fails. This is driving my nuts, as I've lost hours of work as a result now. The document is openable and looks just fine. The problem only comes when I try to merge changes in the document using Edit => Compare Document.

I thought I'd try to validate the document, using the service here, to see if I could get a clearer idea of what is causing the problem. The only error I get is this:

My Book.odt/content.xml[2,3637]: Fatal: Attribute "name" bound to namespace "urn:oasis:names:tc:opendocument:xmlns:office:1.0" was already specified for element "style:style".

When I go to that offset in content.xml, all I can see is style:name="Table34", which doesn't appear to be duplicated. I might even be barking completely up the wrong tree, but it's all I have to go on for now.

I tried removing that attribute to see what happened. Now I get the same error, but with an earlier offset, which now seems to point to office:name="__Annotation__16658_1985421151".

Now I feel I'm just going around in circles.

Can anyone please explain what might be happening? I'm unsure when this error crept in, but it's becoming a real painus in the anus.
Last edited by thefuzzy0ne on Sat Feb 21, 2015 2:37 pm, edited 2 times in total.
OpenOffice.org 3.3.0
Windows 7 Basic
John_Ha
Volunteer
Posts: 9606
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: OpenOffice crashes when saving document.

Post by John_Ha »

I cannot help with identifying the problem you report. Some ideas:

If you save after each few changes, you should quickly identify which change is causing the problem.

Is there a workaround where you separate the accept/reject of changes from the merge? By that I mean can you accept/reject his changes in his document so that you are happy with his document. Now merge his document with yours, accepting every change.

Can you merge the documents Yours into His, rather than His into Yours?

What happens if you cut the documents into, say, two bits, where each is only half the size and has only half the changes. Does it now work?

Does the manual Ch3 - Working with Text or Help throw any light on it?

Also can I suggest you edit your original post title to something like "Writer crashes when merging documents with accept/reject changes" as it might alert someone with merge experience.

Does a search of the forum with merge help?
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
thefuzzy0ne
Posts: 20
Joined: Thu Apr 14, 2011 12:52 pm

Re: OpenOffice crashes when saving document.

Post by thefuzzy0ne »

John_Ha, thanks for your reply.
John_Ha wrote:If you save after each few changes, you should quickly identify which change is causing the problem.
Unfortunately, the problem occurs before I even accept or reject any changes. As soon as I go Edit -> Compare Documents, the Accept/Reject changes window opens. Even saving at this point causes an error.
John_Ha wrote:Is there a workaround where you separate the accept/reject of changes from the merge? By that I mean can you accept/reject his changes in his document so that you are happy with his document. Now merge his document with yours, accepting every change.
I'm not quite sure I fully understand what you mean. Would that not be the same as your suggestion below?
John_Ha wrote:Can you merge the documents Yours into His, rather than His into Yours?
I think that's a bloody good idea. Funnily enough, I was contemplating giving that a bash. :)
John_Ha wrote:What happens if you cut the documents into, say, two bits, where each is only half the size and has only half the changes. Does it now work?
I'd also considered that, but I wanted to save that as a last resort, as I suspect it's going to be a very long and tedious task, closing in on exactly where the error is, in the midst of almost 250 pages.
John_Ha wrote:Does the manual Ch3 - Working with Text or Help throw any light on it?
Unfortunately not. With regard to comparing documents, it only shows you how to get the process started.
John_Ha wrote:Also can I suggest you edit your original post title to something like "Writer crashes when merging documents with accept/reject changes" as it might alert someone with merge experience.
Excellent suggestion! I'll do that now. :)
John_Ha wrote:Does a search of the forum with merge help?
Unfortunately not. I Googled that heck out of this before coming on the forum as a last resort. :)

I'll try merging in the other direction, and see where that gets me. I just hope it doesn't merge the error into his document. xD

Many, many thanks for trying to help. I really appreciate it.
OpenOffice.org 3.3.0
Windows 7 Basic
thefuzzy0ne
Posts: 20
Joined: Thu Apr 14, 2011 12:52 pm

Re: Writer crashes on save when comparing documents.

Post by thefuzzy0ne »

Unfortunately, your suggested subject line didn't fit, so I've had to cut it down a bit. :)
OpenOffice.org 3.3.0
Windows 7 Basic
John_Ha
Volunteer
Posts: 9606
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Writer crashes on save when comparing documents.

Post by John_Ha »

Keep trying!

If possible, try to get merge into the subject line ...

More thoughts. Reject all the changes in the first half of his document, and now try merge. Now merge with the original to pick up the first half changes.

What I cannot work out is whether it is the quantity of changes causing the problem; or whether just one or two changes are mangled and they cause the problem.

Create a simple two page test document. Make changes in it (ideally ask him to make the changes). Now try to merge the two documents - does it work? If so, your method is OK and it looks like a fault in the document.

That being said, splitting both documents into, say, 4, should at least confine the problem to 1/4 and the other 3/4 should be OK. Test splitting with your 2 page test document.

I am sure I don't need to say only work on copies - whatever else you do don't mangle the only originals :-(
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9606
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Writer crashes on save when merging documents.

Post by John_Ha »

A quick thought. Isn't merge based on having two "normal documents with no changes" in them? You now merge them, which produces a document with changes, which you now accept/reject.

So do try accepting/rejecting all his changes in his document. Now merge it as a "normal document" with your document.

How about Crash when merging documents with changes for a subject - the three important words are crash, merge and changes!
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
thefuzzy0ne
Posts: 20
Joined: Thu Apr 14, 2011 12:52 pm

Re: Writer crashes on save when comparing documents.

Post by thefuzzy0ne »

John_Ha wrote:If possible, try to get merge into the subject line ...
Done! :)

Good news! Merging in the opposite direction, seems to be working (for now, anyway).
John_Ha wrote:More thoughts. Reject all the changes in the first half of his document, and now try merge. Now merge with the original to pick up the first half changes.
Another excellent idea. I will get back to giving this a go, but I only have 9 days left to get this book sorted, and there's a heck of a lot to sort out still.
John_Ha wrote:What I cannot work out is whether it is the quantity of changes causing the problem; or whether just one or two changes are mangled and they cause the problem.

Create a simple two page test document. Make changes in it (ideally ask him to make the changes). Now try to merge the two documents - does it work? If so, your method is OK and it looks like a fault in the document.
I had been thinking along the same lines, but it never occured to me to try rejecting some of the changes first.

There's definitely an fatal error in the document, (according to the validator, anyway). I thought I could fix it manually, but the offsets it provides don't seem to match up with what I have.
John_Ha wrote:That being said, splitting both documents into, say, 4, should at least confine the problem to 1/4 and the other 3/4 should be OK. Test splitting with your 2 page test document.
John_Ha wrote:I am sure I don't need to say only work on copies - whatever else you do don't mangle the only originals :-(
Some time ago, I learnt the hard way that it's always wise to keep backups, but it's sound advice nonetheless, and definitely worth mentioning, as you can never be too sure. :)

Many, many thanks for your help again.

As soon as I can find the time, I'll see if I can drill it down to one particular change. It might even benefit me to try that out now, as I'd had to merge an error into my (currently) working document.
John_Ha wrote:A quick thought. Isn't merge based on having two "normal documents with no changes" in them? You now merge them, which produces a document with changes, which you now accept/reject.

So do try accepting/rejecting all his changes in his document. Now merge it as a "normal document" with your document.
I think I might have confused the issue a bit here. For some reason I was never able to get Edit -> Changes -> Merge Document... to work correctly. I always god some kind of error stating that they couldn't be merged.

Although I do record the changes he makes, and manually OK them all first, I then use Edit -> Compare Documents, and then go through the Accept/Reject changes list. The second step shouldn't be necessary, but we went through a period of forgetting to enable the Record Changes facility, so some unrecorded changes have snuck through.

I thought I'd give a merge a go again, and Writer crashes during the merge, irrespective of the direction of the merge.
OpenOffice.org 3.3.0
Windows 7 Basic
thefuzzy0ne
Posts: 20
Joined: Thu Apr 14, 2011 12:52 pm

Re: Writer crashes on save when merging documents.

Post by thefuzzy0ne »

I *think* I've found the problem. It looks like one of the comment IDs in the edited document, clashed with one in the my master document.

I'm not entirely convinced, but it seems to be working. I can save without the crashing. However, when I closed the document and tried to reopen it, I got a whole new error. This time it's a formatting error and it point blank refused to open the document, so I reverted to a backup.

A merge still says "Could not merge documents.", but this is a darn sight better than just out-right crashing.

I'm gonna keep trying. Hopefully, persistence will prevail in the end.

Many, many thanks again for your time and effort.
OpenOffice.org 3.3.0
Windows 7 Basic
John_Ha
Volunteer
Posts: 9606
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Writer crashes on save when merging documents.

Post by John_Ha »

thefuzzy0ne wrote:we went through a period of forgetting to enable the Record Changes facility, so some unrecorded changes have snuck through.
Can you send him the file with the Record changes already ticked?

Also, it is very useful for him to toggle Edit > Changes > Show changes > Off when things get too complex as it displays what it looks like if all the changes he had made have been accepted. He can still make changes but it gets slow with many changes in a big document so set to ON to continue if necessary.

If you are going to do another round with him, I would suggest splitting to document into several smaller ones.

If this solves the problem, please edit your original post title to [Solved].
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
thefuzzy0ne
Posts: 20
Joined: Thu Apr 14, 2011 12:52 pm

Re: Writer crashes on save when merging documents.

Post by thefuzzy0ne »

I could, but that's why I said we. My memory is like a bottomless, Teflon coated sieve. ;)

Here are some test results (just to confuse the issue even more).

Without accepting/rejecting any changes.
- Writer crashes towards the end of the save.

Accepting all changes.
- Saving was successfull.

Rejecting all changes.
- Saving was successfull.

Accepting the first half of the changes only
- Saving was successfull.

Rejecting the first half of the changes only
- Saving was successfull.

Accepting the second half of the changes only
- Writer crashes towards the end of the save.

Rejecting the second half of the changes only
- Writer crashes towards the end of the save.

Accepting the first half of the changes and rejecting the second half
- Saving was successfull.

Accepting the second half of the changes and rejecting the first half
- Saving was successfull.

I don't know what to make of it. I would have thought there was a problem in the second half of the changes somewhere. There are literally over a thousand changes, which makes it difficult to whittle it down to a single change. It also makes it harder if it turns out that the problem is several changes. It would be nice if there was some debugging output I could use to aid finding the fault. "An unknown error has occured" just doesn't cut it. What that really means, is that the error was unexpected and unhandled. There's no reason why I couldn't have been given a bit more information - perhaps the debug info.

At one point, I did break it down into smaller documents, but it quickly became apparent that my friend was finding it very difficult and problematic to work with. He's well-educated, but a total technophobe. Unfortunately, he's also a bit of a perfectionist, too. So when he starts making tiny modifications, he does so relentlessly.
OpenOffice.org 3.3.0
Windows 7 Basic
John_Ha
Volunteer
Posts: 9606
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Writer crashes on save when merging documents.

Post by John_Ha »

thefuzzy0ne wrote:There are literally over a thousand changes, which makes it difficult to whittle it down to a single change.
If you break it down as a binary tree, it takes only 10 loops to identify one faulty item in 1,024.

START
Cut it into two.
CHECK
Test first half - is the error here?.
- if YES, cut first half into two and go to CHECK
- if NO, cut second half into two and go to CHECK
END

Unfortunately I cannot suggest anything from the multiple results you posted - you need to track down what is causing it before we can decide if it is a bug or user error or something else like Writer limit.

One point - Are you sure you are both on the same level of AOO, preferably 4.1.1? AOO made quite a few changes to how Edit > Change works in 4.0? or 4.1.1? - in particular adding the ability to highlight a phrase and attach a comment to it, which was (pre?)released buggy, but fixed. I have just spotted your footer as AOO 3.3.0.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Writer crashes on save when merging documents.

Post by acknak »

@thefuzzy0ne:

Are you still using OO 3.3? If so, you may want to try the current version. I know there have been some bugs fixed recently that deal with annotations.

Also, if you have a document that completed the merge but will not open, it may be possible to fix the document, but you'll have to make a copy available: either attach it here or PM/email me and I'll let you know where to send it.
AOO4/LO5 • Linux • Fedora 23
thefuzzy0ne
Posts: 20
Joined: Thu Apr 14, 2011 12:52 pm

Re: Writer crashes on save when merging documents.

Post by thefuzzy0ne »

@John_Ha @acknak

Thank you both for your responses, and @acknak for your offer (I'm using v4.1 by the way, I just can't find where to change it in my signature).

I had another idea, and thought I should test my RAM, because over the course of my experiments, I started getting other errors, such as format errors that prevented me from opening the document, and "Bad Allocation" errors, which led me to believe that RAM was my problem.

I switched over to Libre Office, just in case the problem had been fixed there. Now I get "SEH Exception: ACCESS VIOLATION". I'm going to have to give up on this for now, as I simply don't have time to continue trouble-shooting. Clearly there is some kind of underlying bug in OpenOffice, which is inherent in Libre Office. I suspect it has something to do with the comments. I have a friend who uses Word, and I was thinking of using that, but according to Microsoft, comments are only partially supported. (Source)
OpenOffice.org 3.3.0
Windows 7 Basic
John_Ha
Volunteer
Posts: 9606
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Writer crashes on save when merging documents.

Post by John_Ha »

If it's an odt file, stick with Writer. Mixing between systems is bad enough - mixing something with comments invites disaster.

I am now confused. I think what you are doing is. If this is incorrect, please explain EXACTLY what you are doing.

1 You have original.odt with no comments or changes in it.
2 You send original.odt to friend, who adds comments and changes, and sends back changed.odt
3 You accept all changes in changed.odt
4 You now merge original into changed, or changed into original.

If so, changes and comments in the two files aren't the problem - the problem is with the changes created by the merge process.

What level of AOO is he using? Is it the same as yours? Don't use the change which highlights a text string and adds a comment associated with the text string as it was buggy. Just use the comment with an arrow to a position in text.

I doubt your problem is with the RAM - if it was it would manifest itself in all applications and in Windows - not just in the AOO changes. I googled SEH Exception: ACCESS VIOLATION and the second hit was a bug report I raised for AOO - there do seems to be e few problems. I think it means that AOO is trying to write something to memory it does not "own".
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Writer crashes on save when merging documents.

Post by acknak »

thefuzzy0ne wrote:... (I'm using v4.1 by the way, I just can't find where to change it in my signature). ...
See: How to update your software information signature
AOO4/LO5 • Linux • Fedora 23
Post Reply