data loss when saving with no disk space left

Bug #167801 reported by Mastermitch on 2006-07-08
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
High
theAdib

Bug Description

System: Debian Sarge
Inkscape version: 0.43 (inkscape_0.43-3bpo1 from
backports.org)

Yesterday my /home partition ran full without me
noticing it. I had opened inkscape and was editing an
image. I saved it multiple times and got no error
message. After closing inkscape, I realized that my
saved image (Inkscape SVG compressed) had a size of
zero bytes. On the next start, inkscape complained
about a not-readable or not-xml-compliant configuration
file. ~/.inkscape/preferences.xml also had a size of 0
bytes.

Obviously both files have been corrupted because there
was no space left on the device. I expect inkscape to
at least show an error message in this situation -
something unspecific like "error saving file" would
have made me at least suspicious. A message like
"target device is full, please save at another
location" would be even better.

The main problem seems to be overwriting the old file
without creating a backup (applies to both images and
the preferences.xml). It looks to me that when the old
file gets overwritten and this leads to an error, the
old file is already lost. Perhaps it is possible to
move the old file to a backup filename, create and
write the new file and only if this succeeds erase the
old file (or keep it, if the user wants inkscape to
create backup files like your ordinary text editor does
). If something fails, the old file would still be
there, perhaps is could also be moved back to it's
original filename.

In any case, if saving really fails it should not do so
silently and data loss should be prevented.

hash (hash-g) on 2007-12-08
Changed in inkscape:
status: New → Incomplete

I'm setting this to incomplete because the lack of up-to-date information on this bug.

Tom Davidson (tjd-mit) wrote :

I just confirmed this in today's SVN (rev 16978), though the situation is slightly different. Steps to confirm/test:

1-choose a small device/partition (a small USB thumb drive works well), with some space on it, and copy an svg file there.
2-fill up the device with 'dd if=/dev/zero of=/path/to/thumbdrive/fillerfile bs=1k'
3-open the svg, and make it bigger (select all, copy, paste, paste, paste)
4-save the file and check the file size. you may have to repeat 3 and 4 until you see that the file is no longer growing in size, if the disk is not completely full to the brim.
5-close inkscape, then try to open the file from the thumbdrive. I got the following errors:

tmp.svg:270: parser error : Couldn't find end of Start Tag path line 261

 ^
tmp.svg:270: parser error : Premature end of data in tag g line 92

 ^
tmp.svg:270: parser error : Premature end of data in tag svg line 3

 ^

Setting high because of data loss with no warning.

Changed in inkscape:
status: Incomplete → Confirmed
Tom Davidson (tjd-mit) wrote :

Note the 0-byte file observed by MasterMitch could be due to bug 168510 , which is triggered when /tmp is full, if /tmp is on the same partition as /home

Changed in inkscape:
status: Confirmed → Triaged
Adam Smith (aasmith) wrote :

The same thing just happened to me, running 0.46 on intrepid. Ran out of space while I was working on a file, which I lost without any complaint whatsoever when I closed Inkscape. When I tried to open Inkscape again, I got the warning message about the missing preferences file (.inkscape/preferences.xml)--which was there, with size 0. But then I couldn't even modify the preferences file when I had disk space again. Even reinstalling Inkscape did nothing to fix this problem. I finally ended up finding an old copy of the file when I found a backup I had made a couple years previously.

theAdib (theadib) on 2009-08-02
Changed in inkscape:
status: Triaged → Confirmed
assignee: nobody → theAdib (theadib)
theAdib (theadib) wrote :

In the current revisions if save or SaveAs fails you get a warning dialogue.

HTH, Adib.

Changed in inkscape:
status: Confirmed → Fix Committed
jazzynico (jazzynico) on 2009-08-07
Changed in inkscape:
milestone: none → 0.47
ScislaC (scislac) on 2009-11-24
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers