Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

Download or installation problems? Try these steps
Problems after upgrading to NeoOffice 2017? Try these steps


Support
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


RSS Feeds
· Announcements Only
· All Posts


  
NeoOffice :: View topic - Corrupted Embedded Items in Writer Docs
Corrupted Embedded Items in Writer Docs
 
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11911
Location: California, USA

PostPosted: Fri Apr 15, 2011 10:12 am    Post subject: Reply with quote

gbh wrote:
1. Not sure
2. Not that they can remember.
3. No. Pretty small spreadsheet.

Here is another guess. Some of these may have been old spreadsheets originally created in word documents that were converted to neoffice some time ago. While they have not been problematic to now, could that create corruptions that do not show up until much later?


I don't think the fact that original document was a Word document is the cause. If it was, the first time that you opened the Word document in NeoOffice would have resulted in a document with missing or mangled content.

What I think is happening is when saving, some error is occurring and the entire OpenOffice.org saving process is aborting. When you save a document in NeoOffice, the underlying OpenOffice.org code truncates the file and then resaves the entire document (including embedded objects) to file from scratch from the document content held in memory. So, if there is any failure for whatever reason, you can end up with only a partially saved document.

Since this is appears to be a difficult to reproduce bug and I suspect that it will also occur in OpenOffice.org and LibreOffice, I want to give you a workaround that will prevent this problem from occurring again in case it takes us a long time to find what triggers this behavior.

The safest workaround that I can recommend is to link your embedded spreadsheets instead of embedding them. Linking is safer because the linked spreadsheet is in a separate .ods file and, as a result, the underlying OpenOffice.org code will run a separate save process for each separate linked file in the document. Essentially, the saving process works in smaller, less risky chunks.

So, when using linked files, if the OpenOffice.org code aborts the saving process, this problem only affects the linked file that is currently being saved and not any of the other linked files.

The hassle, though, with linked files is that when you pass the document to other people for editing or viewing, you need to zip up all of the linked linked files and send the zip file.

If you are interested in this workaround, let me know and I can post steps for converting existing documents like yours to a linked group of files.

In the meantime, I need to brainstorm as to what might be causing the OpenOffice.org to abort during save that could cause this. After some more thought about this, I will probably have more questions for you.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11911
Location: California, USA

PostPosted: Fri Apr 15, 2011 10:29 am    Post subject: Reply with quote

Thank you for the backup document. Unfortunately, I do not see anything unusual in your document. Your spreadsheets are very small and use only simple formulas so I do not think the content in your embedded spreadsheets is the cause.

The bad news is that I edited, saved, and reopened your backup document several times and I could not reproduce the behavior that you see.

Does this behavior occur frequently for you? If so, does it appear to originate when the document is saved on a particular user's machine? I ask this because we know that the OpenOffice.org saving process is aborting but it is not easily reproducible so it may be fruitful for us to look at disk or hardware issues if this problem appears to occur when a document is saved on a specific machine.

Patrick
Back to top
View user's profile Send private message Visit poster's website
gbh
Councilperson


Joined: Jul 28, 2007
Posts: 172

PostPosted: Fri Apr 15, 2011 3:45 pm    Post subject: Reply with quote

Thanks Patrick. It happens on each of three different machines, a very new MacBook Pro running Snow Leopard, a MacBook Pro (earlier- year ago) running Leopard, and an iMac running Leopard. We use so many embedded spreadsheets in our docs it would probably be too much effort to link them.

This has just started happening in the past couple of months more frequently.

Update: One common thread about all our computers is that the hard drives on each are encrypted using PGP Whole Disk encryption software on each computer. Could this have any impact?
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11911
Location: California, USA

PostPosted: Fri Apr 15, 2011 6:45 pm    Post subject: Reply with quote

gbh wrote:
This has just started happening in the past couple of months more frequently.

Update: One common thread about all our computers is that the hard drives on each are encrypted using PGP Whole Disk encryption software on each computer. Could this have any impact?


The above two details made me double-check the code that I added in 2010 to ensure that all temporary are put in the ~/Library/Caches/soffice.bin folder so that all such files would get encrypted if you have FileVault running.

I retested that code and found that it has been failing for a while. I suspect that a Mac OS X system update at some point changed some of the variables I was fetching in the function that creates the ~/Library/Caches/soffice.bin folder. As a result, that folder is not created and NeoOffice was falling back to your user's standard temporary folder.

I don't know if the above is what is causing what you are seeing, but one of the original reasons that I moved temporary files out of the standard temporary folder was that Mac OS X periodically sweeps through and deletes any unopen temporary files in the standard temporary file even if NeoOffice is running. This, in turn, causes a very nasty OpenOffice.org bug where images in presentation documents would be lost when saved.

My thinking is that your case may be another symptom of that nasty OpenOffice.org bug and so I have fixed the code that creates the ~/Library/Caches/soffice.bin folder in the following test patch.

Can you try the test patch and see if this problem still occurs? I will go ahead and put the fix in test patch in NeoOffice 3.2 which will be released early next week as well as NeoOffice 3.1.2 Patch 8:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.2_Beta-Patch-3-Test-1-Intel.dmg

Patrick
Back to top
View user's profile Send private message Visit poster's website
gbh
Councilperson


Joined: Jul 28, 2007
Posts: 172

PostPosted: Sat Apr 16, 2011 6:40 am    Post subject: Reply with quote

Thanks. Will do. Will it work on the following?

3.1.4 patch 4, patch 7 and 3.2 beta patch 3.
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11911
Location: California, USA

PostPosted: Sat Apr 16, 2011 8:32 am    Post subject: Reply with quote

gbh wrote:
Thanks. Will do. Will it work on the following?

3.1.4 patch 4, patch 7 and 3.2 beta patch 3.


The test patch will only install on NeoOffice 3.2 Beta (it is basically Patch 3 plus my fix).

For NeoOffice 3.1.2, you will have to wait until Monday when I release NeoOffice 3.1.2 Patch 8 (it will basically be Patch 7 plus my fix).

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11911
Location: California, USA

PostPosted: Tue Apr 19, 2011 10:48 am    Post subject: Reply with quote

FYI. The fix for the failure to put NeoOffice's temporary files in the ~/Library/Caches where FileVault (and hopefully other disk encryption software packages) can encrypt them is included in NeoOffice 3.2 and NeoOffice 3.1.2 Patch 8. You can download either from the following URLs:

NeoOffice 3.2
NeoOffice 3.1.2 Patch 8

Please let us know if you see the original problem - the loss of embedded spreadsheets when saving - to reappear in either of the above and I will continue investigating the problem.

Patrick
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Goto page Previous  1, 2
Page 2 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.03 Seconds