Windows Crash Encountered and Solved

Post questions on how to use or achieve an effect in Inkscape.
rygle
Posts: 16
Joined: Mon Jan 07, 2008 9:18 pm

Windows Crash Encountered and Solved

Postby rygle » Sat Aug 21, 2010 12:26 pm

The short story is that from within Inkscape I saved an SVG file into the Inkscape program directory on Windows 7, and it caused a crash that was a little difficult to fix, even after uninstalling and reinstalling Inkscape. Lesson learned: Don't save files into the Inkscape program directory within Windows 7 or probably Windows Vista too. If you need to put them in there, save them elsewhere and copy them in manually.

Here's the long story for those who are interested...

I've only just gotten around to mucking around with the Filter Editor and I really like it. I read on the Inkscape Wiki here (href=http://wiki.inkscape.org/wiki/index.php/ReleaseNotes047) that you could save your own filters to use later by saving them into the filters directory of Inkscape.
Simply place any SVG file with the filters to the filters subdirectory of your config directory (~/.config/Inkscape/ on Linux) and the filters will be picked up from it when you start Inkscape.


Having read that, from within Inkscape I saved an SVG file which contained only my new filter into "C:\Program Files (x86)\Multimedia\Inkscape\share\filters" (Note: I am using Windows 7 x64, which is why the (x86) appears in there, but it is irrelevant to this problem). After that, I tried to restart Inkscape and got a message that "Inkscape has encountered an internal error and will now close" or very similar.

I realised straight away went to find the offending file and remove it, but it was gone. I tried uninstalling Inkscape and deleting all traces of it from my system, both the program and preferences directories, but every time I reinstalled it, the same thing would happen. I could, however, run a copy from another directory location apart from the original location.

So how did I solve it? Well, Windows doesn't like files being saved into either the "C:\Program Files" or "C:\Program Files (x86)" directories, and so it had put the file I save into a virtual folder that mapped any files it contained into the Inkscape program directory, but which couldn't be seen from within the Inkscape directory itself.

I tried searching for the file (MikesFilters.svg) using Windows Search, but it doesn't search the Virtual folder that the file was in. I eventually booted into Ubuntu and from the terminal did something like this "ls -R | grep -i -H MikesFilters.svg" (can't remember the case of the -R switch, but it's the one that makes ls do recursive listings, and the -H will display the full location when grep finds it). This found the file in about 2 seconds flat. Turns out that from the Windows side, it was in "C:\Users\Mike\AppData\Local\VirtualStore\Program Files (x86)\Multimedia\Inkscape\share\filters". So I then deleted it and was able to run Inkscape happily again.

Now, I've still got to figure out the proper format for custom filter files, but at least my Inkscape is running.

Lesson learned: If you're using Windows Vista or newer and need to save something into "C:\Program Files (x86)\Multimedia\Inkscape\share\filters" (or wherever it is on your system), don't save it from within Inkscape itself, because windows will nab it and stick it away somewhere else and you'll have a hard time finding it! Save the file on the desktop and then copy it in manually.

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

Re: Windows Crash Encountered and Solved

Postby ~suv » Sat Aug 21, 2010 1:57 pm

rygle wrote:(…) that you could save your own filters to use later by saving them into the filters directory of Inkscape.
Simply place any SVG file with the filters to the filters subdirectory of your config directory (~/.config/inkscape/ on Linux) and the filters will be picked up from it when you start Inkscape.

The equivalent location on Windows for Inkscape user configuration files and resources is
Windows XP
    C:\Documents and Settings\{username}\Application Data\Inkscape
Windows Vista / 7
    C:\Users\{username}\AppData\Roaming\Inkscape

Custom preset filters stored in %APPDATA%\Inkscape\filters will be loaded by Inkscape and listed under 'Filters > Personal'.

rygle
Posts: 16
Joined: Mon Jan 07, 2008 9:18 pm

Re: Windows Crash Encountered and Solved

Postby rygle » Sat Aug 21, 2010 8:29 pm

Excellent ~suv!

I was thinking of trying that next, but hadn't had a chance.

Much appreciated. Rygle.

rygle
Posts: 16
Joined: Mon Jan 07, 2008 9:18 pm

Re: Windows Crash Encountered and Solved

Postby rygle » Sun Aug 22, 2010 1:45 am

Hi,

Saving the svg file into the Windows 7 "C:\Users\{username}\AppData\Roaming\Inkscape\filters" directory no longer crashes things after modifying the file. But no joy in terms of adding anything to the menu.

Here's the contents of the file I've made named MikesFilters.svg. I've compared the structure to the existing filters.svg file inside the main app directory and removed a few things about transforms and spiro effects that may have been causing the crash. Also added menu entry items, but still seems to have no effect...

Any thoughts??

Cheers, Rygle

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1024"
height="768"
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
sodipodi:docname="MikesFilters.svg"
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="1006"
id="namedview1264"
showgrid="false"
inkscape:zoom="0.16"
inkscape:cx="372.045"
inkscape:cy="1050"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:current-layer="svg2"
inkscape:window-maximized="1" />
<defs
id="defs4">
<filter
id="filter9999"
inkscape:label="Wide Glow"
height="1.5"
y="-0.25"
inkscape:menu="Shadows and Glows"
inkscape:menu-tooltip="Ideal for text drop shadow"
color-interpolation-filters="sRGB">
<feGaussianBlur
stdDeviation="21"
id="feGaussianBlur5753"
result="result1" />
<feComposite
id="feComposite5755"
result="result2"
in2="result1" />
<feComposite
id="feComposite5757"
in2="result2" />
<feColorMatrix
id="feColorMatrix5759"
result="result3" />
<feBlend
blend="normal"
id="feBlend5761"
in2="result3"
result="result4"
mode="normal" />
<feBlend
blend="normal"
id="feBlend5763"
in2="result4"
result="result5" />
<feBlend
blend="normal"
id="feBlend5765"
in2="result5"
result="result6" />
<feComposite
id="feComposite5767"
in2="result6"
result="result7" />
<feComposite
id="feComposite5769"
in2="result7" />
</filter>
</defs>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
</svg>

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

Re: Windows Crash Encountered and Solved

Postby ~suv » Sun Aug 22, 2010 2:44 am

rygle wrote:Here's the contents of the file I've made named MikesFilters.svg. I've compared the structure to the existing filters.svg file inside the main app directory and removed a few things about transforms and spiro effects that may have been causing the crash. Also added menu entry items, but still seems to have no effect...

  1. What you pasted here doesn't even open in Inkscape - I don't know if the corruption of the file content happened when you copy&paste'd it or when you edited it to add the menu item/entry. Please attach SVG files, or at least use [ code ] brackets if you prefer pasting (otherwise all white-space formatting gets lost, which makes it harder to read the source and detect syntax errors).

  2. test the attached file: main fix was adding back the missing '>' after
      sodipodi:docname="MikesFilters.svg"
    You should find the entry as 'Filters > Shadows and Glows > Mike's Wide Glow'.

  3. The preset filter in your file gives repeated console warnings - maybe you have to look at each of the settings for each used filter primitive again.

    Code: Select all

    ** (inkscape-bin:85587): WARNING **: ColorMatrix: values parameter error. Wrong size: 0.

    ** (inkscape-bin:85587): WARNING **: Missing source image for feBlend (in=-1 in2=2)

    ** (inkscape-bin:85587): WARNING **: Missing source image for feBlend (in=-1 in2=3)

    ** (inkscape-bin:85587): WARNING **: Missing source image for feBlend (in=-1 in2=4)

    ** (inkscape-bin:85587): WARNING **: Missing source image for feComposite (in=-1 in2=5)

    ** (inkscape-bin:85587): WARNING **: Missing source image for feComposite (in=-1 in2=6)
Attachments
MikesFilters-plain.svg
(2 KiB) Downloaded 228 times

rygle
Posts: 16
Joined: Mon Jan 07, 2008 9:18 pm

Re: Windows Crash Encountered and Solved

Postby rygle » Mon Aug 23, 2010 5:08 pm

Thanks ~suv. Your help is greatly appreciated.

My apologies for using quote, rather than code or attach - point taken.

I did doctor that file a bit because it was crashing Inkscape. To make the version that crashed, I opened a new file and created a new filter in a document, but then deleted the graphics I had created in testing the filter and saved as an SVG. Because this file caused Inkscape to crash when placed in either the app or user filters directory, I compared my filter file to {Inkscape app location}\share\filters\filters.svg and tried to get rid of any elements not in the bundled filters file, and add in menu entries. Obviously I deleted one ">" too many, but my bad hacking just seems to have prevented Inkscape from loading the file at all, as opposed to the crashing from the Inkscape generated SVG file. I did get rid of lots of stuff that seemed unnecessary, like;

Code: Select all

<svg
   inkscape:export-filename="{path}"
   inkscape:export-xdpi="90"
   inkscape:export-ydpi="90">


Code: Select all

  <g
     transform="translate(0,-284.36218)"
     id="layer1"
     inkscape:groupmode="layer"
     inkscape:label="Layer 1" />


Code: Select all

    <inkscape:path-effect
       effect="skeletal"
       id="path-effect5805"
       is_visible="true"
       pattern="M 0,0 0,10 10,5 z"
       copytype="single_stretched"
       prop_scale="1"
       scale_y_rel="false"
       spacing="0"
       normal_offset="0"
       tang_offset="0"
       prop_units="false"
       vertical_pattern="false"
       fuse_tolerance="0" />
    <inkscape:path-effect
       effect="spiro"
       id="path-effect5803"
       is_visible="true" />
    <inkscape:path-effect
       effect="skeletal"
       id="path-effect5799"
       is_visible="true"
       pattern="M 0,0 0,10 10,5 z"
       copytype="single_stretched"
       prop_scale="1"
       scale_y_rel="false"
       spacing="0"
       normal_offset="0"
       tang_offset="0"
       prop_units="false"
       vertical_pattern="false"
       fuse_tolerance="0" />
    <inkscape:path-effect
       effect="spiro"
       id="path-effect5797"
       is_visible="true" />


The file you attached seems to work as I wanted it to. This was a very prelimary attempt to get a filter working, but now I can take things further.

When I get time, I might add some further documentation to the wiki about this area to help others, as it's a bit sparse at the moment.

Cheers,

Rygle.


Return to “Help with using Inkscape”