feImage filter not rendering properly after document reopened

Bug #195312 reported by Felipe "Juca" Sanches
10
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Johan Engelen

Bug Description

This bug was introduced by revision 17484
http://inkscape.svn.sourceforge.net/viewvc/inkscape?view=rev&revision=17484

The feature works when you create and use the filter, but does not render correctly after the file is reopened.

steps to reproduce:

* create a star
* create a square
* open filter effects dialog
* create a new filter
* add an Image filter primitive
* select the star
* click on "Selected SVG Element"
* select the square
* apply the filter to the square

You will see that the filter correctly renders the star in the square object.

*now save it.
*close it
*reopen it.

you will see the square and the star. If you look at the filters dialog, the filter is applied, but not rendering correctly. Even if you reapply it, it won't render. The only way to rendering correctly is by editing the node id in the gtk::Entry

description: updated
Changed in inkscape:
assignee: nobody → felipe-sanches
Revision history for this message
Felipe "Juca" Sanches (felipe-sanches) wrote :

after fixing bug #195314, at revision 17490 this bug has become a crash bug.

Now, when you try to reopen the file, inkscape crashes with:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47553884623088 (LWP 12090)]
0x00002b3ffd8cac9e in sigc::signal_base::impl () from /usr/lib/libsigc-2.0.so.0
(gdb) bt
#0 0x00002b3ffd8cac9e in sigc::signal_base::impl ()
   from /usr/lib/libsigc-2.0.so.0
#1 0x00002b3ffd8cad69 in sigc::signal_base::connect ()
   from /usr/lib/libsigc-2.0.so.0
#2 0x0000000000586f5c in sp_feImage_set (object=0x50e20c0, key=12,
    value=<value optimized out>)
    at /usr/include/sigc++-2.0/sigc++/signal.h:1916
#3 0x000000000049e153 in sp_object_invoke_build (object=0x50e20c0,
    document=0x114ba80, repr=0x3f5e2d0, cloned=<value optimized out>)
    at sp-object.cpp:854
#4 0x000000000049fa7c in sp_object_build (object=0x4dcda80,
    document=0x114ba80, repr=<value optimized out>) at sp-object.cpp:797
#5 0x000000000047d461 in sp_filter_build (object=0x4dcda80,
    document=0x114ba80, repr=0x61) at sp-filter.cpp:132
#6 0x000000000049e153 in sp_object_invoke_build (object=0x4dcda80,
    document=0x114ba80, repr=0x3f5e3d0, cloned=<value optimized out>)
    at sp-object.cpp:854
#7 0x000000000049fa7c in sp_object_build (object=0x4e19820,
    document=0x114ba80, repr=<value optimized out>) at sp-object.cpp:797
#8 0x000000000049e153 in sp_object_invoke_build (object=0x4e19820,
    document=0x114ba80, repr=0x3f5e5d0, cloned=<value optimized out>)
    at sp-object.cpp:854
#9 0x000000000049fa7c in sp_object_build (object=0x17e6ac0,

reference:
 http://inkscape.svn.sourceforge.net/viewvc/inkscape?view=rev&revision=17490

Revision history for this message
Alexander Clausen (alex-gc-web) wrote :

it crashes in sp-feimage.cpp:155 because feImage->SVGElemRef->getObject() returns NULL, as the referenced object is not yet accessible,
because it is located after the filter in the document

the same code segment calls g_free on SVGElem_uri, which was allocated using new, might cause trouble

Revision history for this message
Alexander Clausen (alex-gc-web) wrote :
Changed in inkscape:
status: New → Confirmed
Revision history for this message
Johan Engelen (johanengelen) wrote :

I think I've fixed the bug, but I can't see whether inkscape renders the filter effect correctly. Is it supposed to be just a black rectangle?
It would be very cool if someone could add a clear testcase for our testsuite (you can put the files here too).

Changed in inkscape:
status: Confirmed → Incomplete
Revision history for this message
Felipe "Juca" Sanches (felipe-sanches) wrote :

yes, it is fixed, thanks!

Changed in inkscape:
status: Incomplete → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

> yes, it is fixed, thanks!

@Felipe - can you confirm the correct rendering (maybe provide a test file)? Also, is it fixed in current trunk (state of 2011-06-20) or in the latest stable release (0.48.1)? If your confirmation of the fix referred to the latest stable release at the time (Inkscape 0.48.1), we could really close the report, instead of keeping it 'Fix Committed' without any milestone or revision number associated.

Revision history for this message
jazzynico (jazzynico) wrote :

Fixed revision 7405 (0.47) by Johan.

Changed in inkscape:
assignee: Felipe "Juca" Sanches (felipe-sanches) → Johan Engelen (johanengelen)
milestone: none → 0.47
status: Fix Committed → Fix Released
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.