Emergency save modifies svg structure

Bug #916525 reported by Cedric Sagne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

After 5 years using Inkscape, I found my first bug.

I had designed a file with two layers (one was locked), but not yet saved it when Inkscape crashed (not too sure why, I was simply drawing curves, and it was still a small file, just a few minutes of work).
The recovery file had only one layer, and all the elements of both layers were grouped (apparently one group for each layer)

Specifically the bottom layer was locking an image which I was tracing manually on the top layer, although the bug is more about the autosave and what it saves in terms of SVG structure.
Oddly enough the bug happened again just a few minutes later.

OS is WinXP SP3, Inkscape 0.48
Will update Inkscape and will update bug if it happens again.
Not too sure if you guys can order Inkscape to crash.

Tags: crash saving
Revision history for this message
su_v (suv-lp) wrote :

> Crash autosave (…)
and
> The recovery file (…)
and
> the bug is more about the autosave

1) Could you please clarify whether this report is about the emergency save feature or the autosave feature? They are not the same.
2) Could you please attach the SVG file(s) which apparently lost the 'inskcape:groupmode' attribute of the layer groups?

Revision history for this message
su_v (suv-lp) wrote :

3) What file format did you last use when saving a document? Is it possible that you last saved as 'Plain SVG', before starting the new drawing?

Possibly related to
Bug #168961 in Inkscape: “Emergency save trys to save as non SVG format”

tags: added: crash saving
summary: - Crash autosave modifies svg structuer
+ Crash autosave modifies svg structure
su_v (suv-lp)
Changed in inkscape:
status: New → Incomplete
Revision history for this message
Cedric Sagne (cedricsagne) wrote : Re: Crash autosave modifies svg structure

This bug is about the emergency save feature.
I use the standard "Inkscape SVG" format to save files

Revision history for this message
Cedric Sagne (cedricsagne) wrote :

I provide you with a second file caused doing well exactly the same work, but after I had saved the file.
You will notice that it contains two layers, while the emergency file before the first save only contains one.

Both SVG files require a file which you can find there:
http://picasaweb.google.com/lh/photo/7I3crN5DVjtVG25c46wURA

I now notice that this file is actually a bmp, I am not sure if (incidentally) the file format may have caused the crash itself

Revision history for this message
Cedric Sagne (cedricsagne) wrote :
su_v (suv-lp)
Changed in inkscape:
status: Incomplete → New
Revision history for this message
su_v (suv-lp) wrote :

> You will notice that it contains two layers, while the
> emergency file before the first save only contains one.

I cannot confirm that: both attached files have two layers:
- Layer 1
- BK (locked)

The difference is that in 'LITTLE MERMAID.svg.2012_01_14_11_47_41.0.svg', the bitmap image on the locked layer 'BK' is inside a group which used to be an Inkscape layer earlier:

  <g
     inkscape:groupmode="layer"
     id="layer3"
     inkscape:label="BK"
     sodipodi:insensitive="true">
    <g
       id="layer2"
       inkscape:label="BK"
       transform="translate(2.9966698,5.9933396)">
      <image
         y="148.36218"
         x="-137"
         id="image2993"
         xlink:href="file:///C:/Documents%20and%20Settings/AC/Pulpit/Ariel-the-little-mermaid-348680_1024_768.bmp"
         height="768"
         width="1024"
         style="opacity:0.7" />
    </g>
  </g>

Could it be that the first file you attached ('New document 1.2012_01_14_11_39_49.0.svg') is not the one you filed this report for? Its layer structure is intact.

Revision history for this message
su_v (suv-lp) wrote :

<off-topic>
> I now notice that this file is actually a bmp, I am not sure if
> (incidentally) the file format may have caused the crash itself

I'm not aware of known issues with the BMP file format (should be supported ok in Inkscape), and the file size is not that large to cause Inkscape to crash (2.4 MB) in my experience, though it isn't small either (linking multiple bitmap images of that file size into one document might at some point exhaust the available memory resources when rendering the linked images on-canvas).
<off-topic>

Do you recall in which tool context you last had worked before the crash occurred?
(e.g. the pen (bezier) tool actively tracing the bitmap image, or the node tool to edit/adjust newly drawn paths)

Revision history for this message
su_v (suv-lp) wrote :

Additionally, could you please test with the latest bug-fix release 0.48.2?

> OS is WinXP SP3, Inkscape 0.48
and from the attached files:
> inkscape:version="0.48.0 r9654"

Latest stable release is 0.48.2:
<http://sourceforge.net/projects/inkscape/files/inkscape/0.48.2/>

For a list of fixed bugs since 0.48.0 was released, see
<https://launchpad.net/inkscape/0.48.x/0.48.1>
<https://launchpad.net/inkscape/0.48.x/0.48.2>

su_v (suv-lp)
summary: - Crash autosave modifies svg structure
+ Emergency save modifies svg structure
Revision history for this message
Cedric Sagne (cedricsagne) wrote :

The last tool was the bezier.
The first file, now loaded (with 0.48.2) has indeed two layers. its datetime shows it is indeed the crash file but when I opened it with 0.48.0 only one layer showed - so the issue might be with how 0.48.0 opened it (and fixed since with 0.48.2)
Worth testing if you guys have a 0.48.0 somewhere (is it ok to run concurrent versions on the same machine?)

As I don't expect you to address bugs of old versions I upgraded immediately after the bug report.
As the emergency file is indeed opened ok with 2 layers on 0.48.2, if the case described above (0.48.0 opening wrong) is not the explanation I would suggest closing the bug as solved and getting back to business.

Revision history for this message
su_v (suv-lp) wrote :

> Worth testing if you guys have a 0.48.0 somewhere

Inkscape 0.48.0 on Mac OS X shows the same 2 layers present in the file 'New document 1.2012_01_14_11_39_49.0.svg' as does 0.48.2 (see attached screenshot - I didn't update the path the the BMP image for the screenshot, but it doesn't make a difference if I adjust the path to the locally saved image before loading the SVG file in Inkscape).

Revision history for this message
su_v (suv-lp) wrote :

> he recovery file had only one layer, and all the elements of
> both layers were grouped (apparently one group for each layer)

Could it be that you (inadvertently) imported the emergency-saved file into an empty document instead of opening it itself?

Known issue:
Bug #502075 “Import Inkscape SVG loses layer and sub-layer information”
<https://bugs.launchpad.net/inkscape/+bug/502075>

Revision history for this message
jazzynico (jazzynico) wrote :

Tested on Windows XP, Inkscape 0.48.0 (in case it's a Windows specific bug). I confirm the two layers show as expected when opened with File>Open (or from the recent list). As explained by ~suv, if you use File>Import or drag and drop to import the file, all the original layers are grouped and lose their layer status.

Revision history for this message
Cedric Sagne (cedricsagne) wrote : Re: [Bug 916525] Re: Emergency save modifies svg structure

Hi JazzyNico

I was not aware that if it is imported then the layers are grouped, I rarely crash Inkscape at all, not a bug after all. Will need to look in documentation just in case it isn't there.

Cedric

________________________________
 From: JazzyNico <email address hidden>
To: <email address hidden>
Sent: Wednesday, 18 January 2012, 9:15
Subject: [Bug 916525] Re: Emergency save modifies svg structure

Tested on Windows XP, Inkscape 0.48.0 (in case it's a Windows specific
bug). I confirm the two layers show as expected when opened with
File>Open (or from the recent list). As explained by ~suv, if you use
File>Import or drag and drop to import the file, all the original layers
are grouped and lose their layer status.

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/916525

Title:
  Emergency save modifies svg structure

Status in Inkscape: A Vector Drawing Tool:
  New

Bug description:
  After 5 years using Inkscape, I found my first bug.

  I had designed a file with two layers (one was locked), but not yet saved it when Inkscape crashed (not too sure why, I was simply drawing curves, and it was still a small file, just a few minutes of work).
  The recovery file had only one layer, and all the elements of both layers were grouped (apparently one group for each layer)

  Specifically the bottom layer was locking an image which I was tracing manually on the top layer, although the bug is more about the autosave and what it saves in terms of SVG structure.
  Oddly enough the bug happened again just a few minutes later.

  OS is WinXP SP3, Inkscape 0.48
  Will update Inkscape and will update bug if it happens again.
  Not too sure if you guys can order Inkscape to crash.

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/916525/+subscriptions

Revision history for this message
su_v (suv-lp) wrote :

Linking as duplicate to Bug #502075 “Import Inkscape SVG loses layer and sub-layer information”, based on latest feedback by the reporter:

> I was not aware that if it is imported then the layers are
> grouped, I rarely crash Inkscape at all, not a bug after all.

Please add a comment here and revert the duplicate status if you think this was done in error, and the emergency-saved file had indeed a modified SVG structure (missing inkscape's custom groupmode attribute).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.