Inkscape: A Vector Drawing Tool

crash when importing an SVG file

Reported by sas on 2008-06-19
2
Affects Status Importance Assigned to Milestone
Inkscape
High
Johan Engelen

Bug Description

SVN revision 18985, on Windows XP.

Steps to reproduce:

  1) Choose a file to use. The file http://launchpadlibrarian.net/12626830/blue.svg is suitable, but I think any SVG file will do.
  2) Start Inkscape.
  3) Import the file (File -> Import).
  4) Click the "new document" button.
  5) Import the file into the new document.

Inkscape crashes, with the following error message on stderr:

** ERROR:(src/xml/simple-node.cpp:409):virtual void Inkscape::XML::SimpleNode::_bindDocument(Inkscape::XML::Document&): assertion failed: (!_document || _document == &document)

As far as I can tell, the problem is that, on the second import, the call
  desktop->currentLayer()
in src/file.cpp returns a layer in the wrong document (it returns the same layer as it did on the first import).

(By the way, I'm also getting the error message

** (inkscape.exe:1760): CRITICAL **: gdouble sp_document_height(SPDocument*): assertion `document->root != NULL' failed

But I wasn't getting that with yesterday's SVN, so it's probably some unrelated breakage.)

sas (sas-sas) wrote :

Assigning to MenTaLguY, as this is the same assertion failure as in bug 239092.

description: updated
Changed in inkscape:
assignee: nobody → mental
Alvin Penner (apenner) wrote :

original crash message reproduced on Win32 nightly build June 13, except for the second message :
gdouble sp_document_height(SPDocument*): assertion `document->root != NULL' failed

Changed in inkscape:
status: New → Confirmed
sas (sas-sas) wrote :

Trying this with SVN revision 19629, it still crashes, but the error message is now:

** ERROR:(src/xml/simple-node.cpp:362):virtual void Inkscape::XML::SimpleNode::addChild(Inkscape::XML::Node*, Inkscape::XML::Node*): assertion failed: (generic_child->document() == _document)

Changed in inkscape:
importance: Undecided → High
bbyak (buliabyak) wrote :

no crash for me, rev 20771

can anyone confirm this with recent svn?

Alvin Penner (apenner) wrote :

running Windows XP, rev 20711, I get a crash with the message :
C:\Python25\APP>inkcl.py
return code: 3
**
ERROR:src/xml/simple-node.cpp:362:virtual void Inkscape::XML::SimpleNode::addChild(Inkscape::XML::Node*, Inkscape::XML::Node*): assertion failed: (generic_child->document() == _document)

Emergency save activated!

Alvin Penner (apenner) wrote :

interesting that this crash does not occur if I use two File | Opens instead of File | Import - New - File | Import

Johan Engelen (johanengelen) wrote :

The import dialog was constructed once, and therefore it always belongs to the desktop from which it was first called. the dialog should be recreated all the time (like the open dialog). So that's what I did, and it fixed this bug (svn rev 20803).

Changed in inkscape:
assignee: mental → johanengelen
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers