feImage filter primitive crashes Inkscape when using an SVG file

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

Bug Description

Reproduced on Windows XP, Inkscape 0.48.4 and trunk revision 12782.
Steps:

1. Open Inkscape with the default options.
2. Draw a shape.
3. Open the Filter editor.
4. Create a new filter and add an Image primitive.
5. In the source image field, select an SVG file.
6. Select the shape and apply the filter.

Inkscape crashes with the following message:

** (inkscape.exe:2720): WARNING **: FilterImage::render: failed to load image: D:\Dev\SVG\New document 1.2013_11_08_17_47_36.0.svg

Trace:

D:\Dev\inkscape-12782>D:\Dev\MinGW-4.6\bin\gdb -e inkscape\inkscape.exe -s inkscape\inkscape.dbg
GNU gdb (GDB) 7.3
.....
Program received signal SIGSEGV, Segmentation fault.
0x004e2577 in Inkscape::Pixbuf::ensurePixelFormat(Inkscape::Pixbuf::PixelFormat) ()
(gdb) bt
#0 0x004e2577 in Inkscape::Pixbuf::ensurePixelFormat(Inkscape::Pixbuf::PixelFormat) ()
#1 0x0000037f in ?? ()
#2 0x0008037f in ?? ()
#3 0x0022ecd0 in ?? ()
#4 0x00b1e959 in Inkscape::UI::Dialog::InkscapePreferences::InkscapePreferences () ()

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

Not reproduced with current trunk (r12782) on OS X, based on the provided instructions - if I understood them correctly:

> 5. In the source image field, select an SVG file.

Are you referring to the button labelled 'Image File' (and to selecting an external SVG file saved earlier) or to the button labelled 'Selected SVG Element'? Using the latter and thus producing a circular reference to the SVG object does crash (different backtrace), and is already tracked in bug #195320. Using the former works for me (as long as I don't delete the path to the referenced file).

I can produce a crash (same backtrace) with these steps:
1) draw object
2) create new filter, add feImage primitive
3) select external SVG file (e.g. one with a rectangle)
4) apply filter to object¨
5) highlight the path to external SVG file in the text widget and delete it

-> crash (probably the same as reported by v1nce in bug #1249390)

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

> ** (inkscape.exe:2720): WARNING **: FilterImage::render: failed to load image:

Could this refer to an issue with gdk-pixbuf and a missing reference to the rsvg-based loader for SVG files (WIndows devlibs), as mentioned in the comments of bug #168244 (comment 27 ff)?

Revision history for this message
v1nce (vincent-pennec) wrote :

12777 ubuntu 12.04

external SVG file : the image is displayed OK

internal element :
A) refences another item => bug but no crash : the object with filter applied become transparent
B) self reference => crash with ** (inkscape:5067): WARNING **: More than 32 iteration while updating document '(null)'

empty string :
A) if you didn't choose a image before then there's no xlink:href on the feImage and it does nothing
B) if the path was filled once, then inkscape crashes with
** (inkscape:5024): WARNING **: FilterImage::render: Can not find:

which is not the same as bug #1249390 which crashed with

** (inkscape:4922): WARNING **: FilterImage::render: failed to load image:

When fixing circular references, one should pay attention that they probably may occur by inheritance. Object A got an image filter that references object B. Then you edit object B to add a filter that references object A...

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

v1nce wrote:
> empty string :
> (…)
> B) if the path was filled once, then inkscape crashes with
> ** (inkscape:5024): WARNING **: FilterImage::render: Can not find:
>
> which is not the same as bug #1249390 which crashed with
>
> ** (inkscape:4922): WARNING **: FilterImage::render: failed to load image:

Attaching full backtrace for crash B (r12782, OS X 10.7.5):
Please compare it with the backtrace attached to bug #1249390 (in my understanding, based on where the crash happens with which error message, it is the same one - just the trigger slightly differs).

Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Crunchbang Waldorf (Debian stable), Inkscape trunk revision 12782.

~suv> Could this refer to an issue with gdk-pixbuf and a missing reference to the rsvg-based loader for SVG files (WIndows devlibs), as mentioned in the comments of bug #168244 (comment 27 ff)?

Yes, there are chances the two issues are related. I've already investigated the rsvg loader issue on Windows many times, but with no success so far.

> in my understanding, based on where the crash happens with which error message, it is the same one - just the trigger slightly differs

Agreed. If we're lucky, it's just a missing test on the file handler...

Marking as duplicate of Bug #1249390.

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.