After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 579286 - This SVG-File crashes nautilus/rsvg-view
This SVG-File crashes nautilus/rsvg-view
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
2.26.x
Other Linux
: Normal critical
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2009-04-17 13:13 UTC by tobias
Modified: 2010-04-12 03:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Crashing SVG-File (5.15 KB, text/plain)
2009-04-17 13:22 UTC, tobias
  Details
Change functions[c] to functions[ctx->channelmap[c]] (763 bytes, patch)
2009-04-21 19:29 UTC, palfrey
committed Details | Review

Description tobias 2009-04-17 13:13:07 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:
Comment 1 tobias 2009-04-17 13:22:51 UTC
Created attachment 132824 [details]
Crashing SVG-File

This file is not broken, it works fine in Batik and Inkscape(laest SVN version).
Comment 2 palfrey 2009-04-21 19:01:12 UTC
Stacktrace from rsvg-view using git HEAD.

Program received signal SIGSEGV, Segmentation fault.

Thread 3072321312 (LWP 9533)

  • #0 ??
  • #1 rsvg_filter_render
    at rsvg-filter.c line 83
  • #2 rsvg_cairo_pop_discrete_layer
    at rsvg-cairo-draw.c line 989
  • #3 rsvg_cairo_render_path
    at rsvg-cairo-draw.c line 638
  • #4 rsvg_render_path
    at rsvg-base.c line 1836
  • #5 _rsvg_node_rect_draw
    at rsvg-shapes.c line 441
  • #6 rsvg_node_draw
    at rsvg-structure.c line 68
  • #7 rsvg_node_svg_draw
    at rsvg-structure.c line 326
  • #8 rsvg_node_draw
    at rsvg-structure.c line 68
  • #9 rsvg_handle_render_cairo_sub
    at rsvg-cairo-render.c line 231
  • #10 rsvg_handle_get_pixbuf_sub
    at rsvg.c line 100
  • #11 pixbuf_from_data_with_size_data
    at test-display.c line 88
  • #12 main
    at test-display.c line 797

Comment 3 palfrey 2009-04-21 19:23:38 UTC
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.

Thread 3072329504 (LWP 2496)

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/tls/i686/cmov/libc.so.6
  • #2 abort
    from /lib/tls/i686/cmov/libc.so.6
  • #3 IA__g_assertion_message
  • #4 IA__g_assertion_message_expr
    at /data/tparker/builder/sources/glib2.0_2.20.0-2/glib/gtestutils.c line 1312
  • #5 rsvg_filter_primitive_component_transfer_render
    at rsvg-filter.c line 2142
  • #6 rsvg_filter_primitive_render
    at rsvg-filter.c line 83
  • #7 rsvg_filter_render
    at rsvg-filter.c line 486

Comment 4 palfrey 2009-04-21 19:29:09 UTC
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 5 Hiroyuki Ikezoe 2010-04-12 03:52:55 UTC
Comment on attachment 133068 [details] [review]
Change functions[c] to functions[ctx->channelmap[c]]

committed without g_assert().
Comment 6 Hiroyuki Ikezoe 2010-04-12 03:55:05 UTC
(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
Comment 7 Hiroyuki Ikezoe 2010-04-12 03:56:21 UTC
By the way, the image seems to be wrong even if it does not cause any crash, though.