Corrupted files on USB stick

Discuss the spreadsheet application
Post Reply
fredcl
Posts: 9
Joined: Tue May 26, 2009 2:25 pm

Corrupted files on USB stick

Post by fredcl »

I have noticed it several times that whenever saving a ods file on my USB stick it first seems right but after some time (hours) it's corrupted.
This happens frequently when saving the fiels in the main directory. Saving them to a dubdirectory gave no problem (untill now....).
I'm using OOO version 3.1 (US version). I had the same problem using OoO version 3.0 US.
It happened only to the ODS files and not to other files so the USB stick seems to be ok. Also the PC is ok because it happened in the office and at home on different laptops.
Also I experienced the problem with different spreadsheets.

This is a very odd problem (and very annoying). Anybody else a similar experience or workaround ?

BTW It's no virus, I double checked with different scanners.
OOo 3.1.X on MS Windows Vista + Ubuntu
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: corrupted files on USB stick

Post by Hagar Delest »

I've noticed sometimes that files saved in the root folder of a USB stick can be damaged, especially if there are some special characters (spaces, ...).

But you should never save directly to a USB stick. Such transfer is not that reliable and if something wrong occurs, nothing left. Better save on the HD and then transfer the file with the file browser. If there is a problem, you still have the file and you can retry.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted files on USB stick

Post by RoryOF »

It is possible that you have a sick USB stick, which doesn't hold its data. In that case, data from other applications will also vanish. When your stick is away, is it sheathed (i.e., contacts covered)? Static electricity can conceivably upset a stick.

As Hagar said, make sure you save to the main computer in OpenOffice format, then copy the file to your USB. Do _not_ remove the USB stick without going through the formal Eject procedure (and if you don't know what that is, that is the cause of your problem!)
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
fredcl
Posts: 9
Joined: Tue May 26, 2009 2:25 pm

Re: corrupted files on USB stick

Post by fredcl »

Hi Hagar,

This is of course the most reliable solution. But also then I noticed that files created with MS Excel do not have the problem and the ODF files are sometimes corrupted.
The files copied from the explorer did have the same problem, no difference.

I do not think this is solved.

Hagar de l'Est wrote:I've noticed sometimes that files saved in the root folder of a USB stick can be damaged, especially if there are some special characters (spaces, ...).

But you should never save directly to a USB stick. Such transfer is not that reliable and if something wrong occurs, nothing left. Better save on the HD and then transfer the file with the file browser. If there is a problem, you still have the file and you can retry.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
OOo 3.1.X on MS Windows Vista + Ubuntu
fredcl
Posts: 9
Joined: Tue May 26, 2009 2:25 pm

Re: Corrupted files on USB stick

Post by fredcl »

RoryOF wrote:It is possible that you have a sick USB stick, which doesn't hold its data. In that case, data from other applications will also vanish. When your stick is away, is it sheathed (i.e., contacts covered)? Static electricity can conceivably upset a stick.

As Hagar said, make sure you save to the main computer in OpenOffice format, then copy the file to your USB. Do _not_ remove the USB stick without going through the formal Eject procedure (and if you don't know what that is, that is the cause of your problem!)
Hi RoryOF,

Thanks for your reply.
The USB stick could be faulty but then I would expect the same behaviour whenever copying other files to the stick. All the other files are just ok, no problem writing neither reading. Just the problems with the ODF files.......
OOo 3.1.X on MS Windows Vista + Ubuntu
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: corrupted files on USB stick

Post by Hagar Delest »

fredcl wrote:I noticed that files created with MS Excel do not have the problem and the ODF files are sometimes corrupted.
The files copied from the explorer did have the same problem, no difference.
Do you mean saving in MS Excel file format? or really using MS Excel?

How are they corrupted exactly? They don't open or do you lose data?
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupted files on USB stick

Post by RoryOF »

It should not matter to OO or to any application what media one writes to, as the write is (or ought be!) performed by system routines, not by customised read/write routines within the program.

Perhaps OO has delayed buffering on closure of a file. You are formally ejecting the USB device using the close down routine in the system tray? This procedure will not say to remove the drive until all buffers are flushed.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
fredcl
Posts: 9
Joined: Tue May 26, 2009 2:25 pm

Re: Corrupted files on USB stick

Post by fredcl »

Hi Hagar

I mean MS Excel files created by MS Excel (Office 2003), just as a comparison.

Due to the fact that I use macro's, queries etc in the OoO Calc files do I need to save them in the original format. This gives me a problem.
Trying to open the file gives me an error message "The file xxx.ods is corrupt and therefor can not be opened, should OpenOffice.Org repair the file ?"
Using the "Yes" option of the messagebox it results into an empty spreadsheet and a messagebox that the file can not be repaired.
I did some searching on the intranet and it seems to be connected to corruption of the file format (zip archive container), however repairing manually (as described in these posts) did not work.
I'm puzzled and hope that i'm the only one with this problem.... :roll:
OOo 3.1.X on MS Windows Vista + Ubuntu
Dave
Posts: 1011
Joined: Sun Dec 23, 2007 6:53 pm

Re: Corrupted files on USB stick

Post by Dave »

fredcl wrote:I'm puzzled and hope that i'm the only one with this problem.... :roll:
Be puzzled no longer. I spent days, weeks, months recording my old LPs and 45s to MP3 format and storing on disks for my own listening pleasure while travelling [tough to change LPs when driving.] With a ton of listening time, it was some time before I realised that some were entirely spoiled during the process; some, but not all by any means. It happens, and welcome to the wonderful world of the computer. "Anything made by man ..."

Do what I did. Shrug, and start over, and get a new memory stick to see if the error is consistent across them, and so be more accurate as to what to blame. You can likely get one with enough space for an OO file for testing for around $2 now. You won't need 16Gb.

David.
cjwd
Posts: 1
Joined: Thu Aug 06, 2009 5:22 pm

Re: Corrupted files on USB stick

Post by cjwd »

Interesting thread - just found it while searching for an answer to (I think) the same problem. I've had four Writer files saved to USB sticks that are fine one day and then 'empty' the next time i try to open them. First two files lost and I ditched the USB stick and bought a Kingston Data Travellar with a guarantee - same thing, still got several other .odt files that aren't corrupt yet and never had problem with Word or Excel files...though reading the posts maybe I've just been lucky!
open office version 3.1.0
Installed on XP Pro on desktop and Ubuntu 9 on netbook
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Corrupted files on USB stick

Post by Hagar Delest »

cjwd wrote:and never had problem with Word or Excel files...
That's what is worrying me in fact. In all the topics about such data loss, there is no file in MS Office file format. Of course saving to the HD is a basic process but I'm not sure there is nothing wrong with the management of ODF files on an external drive.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Corrupted files on USB stick

Post by acknak »

Trying to open the file gives me an error message "The file xxx.ods is corrupt ...repairing [automatically or] manually (as described in these posts) did not work.
You can attach a copy of the file if you like. Sometimes--with documents in ODF format--it is possible to recover at least some part of the file.

You can use the "Upload Attachment" link (below the message entry area after you click "POST REPLY"). [Forum] How to attach a document here
AOO4/LO5 • Linux • Fedora 23
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: Corrupted files on USB stick

Post by jrkrideau »

Hagar de l'Est wrote:
cjwd wrote:and never had problem with Word or Excel files...
That's what is worrying me in fact. In all the topics about such data loss, there is no file in MS Office file format. Of course saving to the HD is a basic process but I'm not sure there is nothing wrong with the management of ODF files on an external drive.

I've been using USBs for the last year and except for one that physically fell apart ( it rattles when shaken) I have had no problem. My USBs currently are both Kingston DataTraveler.
LibreOffice 7.3.7. 2; Ubuntu 22.04
fredcl
Posts: 9
Joined: Tue May 26, 2009 2:25 pm

Re: Corrupted files on USB stick

Post by fredcl »

I'm sorry but the corrupted fiels contain confidential information (at least if readable..... :mrgreen: ), I can not attach it.
However as mentioned did I have a look to the file and tried to repair the file. All the hints and tips on repairing archieves or OpenOffice files did not help. I could not get any data back.

To add some more strange things the following. I kept a copy of the corrupted file in a sub directory n the USB stick. This files is not corrupted. This file seems to be ok, also after updating the files seems to stay ok. :bravo: :knock:
OOo 3.1.X on MS Windows Vista + Ubuntu
Post Reply