self made SVG crashes on loading

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
PhiSch
Posts: 2
Joined: Wed May 05, 2010 4:58 pm

self made SVG crashes on loading

Postby PhiSch » Wed May 05, 2010 5:23 pm

Hi!

I got the following problem. I created a logo:
http://www.mediafire.com/?2yj1wxm0jdv
on Inkscape 0.47 (stable) on Win32 (Windows 7) and saved a a few days ago. Now whenever I try to open it the software crashes. This already happens if I have the filedialog open long enough (so the preview crashes) or after clicking ok. Same for directly clicking on it. The error message caption is "Microsoft Visual C++ Runtime Library" and the message: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for further information". Afterwards another message pops up "Inkscape has encountered an internal error and will close now."

However, if I run Inkscape from gdb the bt command does not reveal anything:

Code: Select all

(gdb) run
Starting program: c:\program files\inkscape\inkscape.exe
[New Thread 1844.0x1444]
[New Thread 1844.0x14c8]
[New Thread 1844.0xc04]
[New Thread 1844.0x146c]
[New Thread 1844.0xb5c]
[New Thread 1844.0x14ac]
[New Thread 1844.0x13fc]
[New Thread 1844.0x1374]
[New Thread 1844.0x1488]
[New Thread 1844.0x10e0]
[New Thread 1844.0x109c]
[New Thread 1844.0xb4c]
[New Thread 1844.0x119c]
[New Thread 1844.0x9a0]
warning: Invalid parameter passed to C runtime function.

warning: Invalid parameter passed to C runtime function.


Program exited with code 03.
(gdb) bt
No stack.


The newest compiled version for windows (2010-04-30) behaves similarly. It does not show any error but crashes silently. The svg itself does howeve show up if you open it in firefox. Because I cannot gather more information I do not know, if I can submit it to launchpad. Maybe someone else has also observed something similar. By the way the file is in principal a pretty exact reconstruction of the following tutorial (http://troy-sobotka.blogspot.com/2007/11/inkscape-tutorial-1-chrome-effect.html), so it contains some layers, text and gradients. So any ideas what I can do?

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: self made SVG crashes on loading

Postby sas » Thu May 06, 2010 12:07 am

It's OK to post a bug report on this, since you have a sample file for people to test.

I ran your file through Jeff Schiller's scour script, and the resulting SVG file loads in Inkscape without problem, so the problem is probably caused by one of the Inkscape-specific attributes (which scour removes). If you want to try this, you'll find scour.py in your Inkscape extensions directory (or you can get the latest version from http://codedread.com/scour/).

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: self made SVG crashes on loading

Postby ~suv » Thu May 06, 2010 12:51 am

IMHO «the crash is related to the sequence in which svg elements are declared. The original file Ex.svg had the sequence : path, path, path, text. (where the paths all have an xlink:href reference to the text before it is declared.)» applies to this file as well and has been reported for other files created by following one of Troy's (text) tutorials - see Bug #345371 in Inkscape: “stroked and scaled Linked Offset text causes a crash upon open file” and its duplicates.

PhiSch
Posts: 2
Joined: Wed May 05, 2010 4:58 pm

Re: self made SVG crashes on loading

Postby PhiSch » Thu May 06, 2010 11:39 pm

Thank you guys! it was exactly the bug ~suv wrote about. After interchanging the order in the svg-file I was able to load the file again! I hope this bug gets fixed soon...

CrimsonUte

Re: self made SVG crashes on loading

Postby CrimsonUte » Wed Aug 18, 2010 3:21 pm

The problem with the solution presented is layer order. I have the path defined in the SVG file before the text because I want the path to appear under the text. In my case, I'm using a linked offset, which is larger than the text, and if I just switch the element order my text is no longer visible.

However, I discovered a work-around that allows you to maintain your layer order and avoid this Inkscape bug. Inkscape doesn't like <path /><text />, where the path is referencing the text. (This is an odd bug, however, as it seems, at least for me, to allow <path /><text /> once but not a second time. But I digress...)

The trick is to take the reference to the text element out of your path element, then add it back in after the text element. For example, change:

Code: Select all

    <path
       sodipodi:type="inkscape:offset"
       inkscape:radius="11.372463"
       inkscape:original="blah blah blah"
       xlink:href="#text3607"
       inkscape:href="#text3607"
     />
    <text
       id="text3607"
       y="1066.1431"
       x="121.57013"
       xml:space="preserve"><tspan
         sodipodi:role="line">Insert text here</tspan>
    </text>


to something like:

Code: Select all

    <path
       sodipodi:type="inkscape:offset"
       inkscape:radius="11.372463"
       inkscape:original="blah blah blah"
       xlink:href="#text3607"
       inkscape:href="#text3607"
     />
    <text
       id="text3607"
       y="1066.1431"
       x="121.57013"
       xml:space="preserve"><tspan
         sodipodi:role="line">Insert text here</tspan>
    </text>
    <path id="path3611"
       xlink:href="#text3607"
       inkscape:href="#text3607"
    />


Return to “Discuss Software Issues”

Who is online

Users browsing this forum: No registered users and 4 guests