GNOME Bugzilla – Bug 579286
This SVG-File crashes nautilus/rsvg-view
Last modified: 2010-04-12 03:56:21 UTC
Steps to reproduce: Save the attached file to your desktop -> rename it to *.svg -> nautilus tries to create a thumbnail -> crash Or try to open this file with "rsvg-view ConicalgradientDMRD.svg.bak" -> crash Stack trace: Other information:
Created attachment 132824 [details] Crashing SVG-File This file is not broken, it works fine in Batik and Inkscape(laest SVN version).
Stacktrace from rsvg-view using git HEAD. Program received signal SIGSEGV, Segmentation fault.
+ Trace 214669
Thread 3072321312 (LWP 9533)
The gdb trace isn't particularly clear about this, but the actual crash is occurring in rsvg_filter_primitive_component_transfer_render, and adding a g_assert(functions[c]!=NULL) before line 2142 (temp = functions[c] (inval, channels[c]);) gets the following: librsvg:ERROR:rsvg-filter.c:2142:rsvg_filter_primitive_component_transfer_render: assertion failed: (functions[c]!=NULL) Program received signal SIGABRT, Aborted.
+ Trace 214670
Thread 3072329504 (LWP 2496)
Created attachment 133068 [details] [review] Change functions[c] to functions[ctx->channelmap[c]] In the default case of settings bits of functions[], the "c" index is used directly as opposed to in all the other cases which use ctx->channelmap[c]. I've therefore changed this, and the test image now renders. Also, there's the g_assert from my debugging added in there in case this hits again.
Comment on attachment 133068 [details] [review] Change functions[c] to functions[ctx->channelmap[c]] committed without g_assert().
(In reply to comment #4) > > In the default case of settings bits of functions[], the "c" index is used > directly as opposed to in all the other cases which use ctx->channelmap[c]. > I've therefore changed this, and the test image now renders. You are absolutely right. The channelmap order is different from RGBA so the fallback functions were not correctly set. Pushed. http://git.gnome.org/browse/librsvg/commit/?id=829eea4894ea816e48155d965ed8ea17d5c923bb
By the way, the image seems to be wrong even if it does not cause any crash, though.