New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nemo crashing on generating SVG preview #2000

Open
loleg opened this Issue Dec 10, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@loleg
Copy link

loleg commented Dec 10, 2018

 * Nemo version 4.0.2
 * Windowed. (I dare not put this file on my desktop ;-)
 * Distribution - Fedora 29 (package nemo-4.0.2-1.fc29)
 * Graphics hardware - Intel Corporation HD Graphics 5500 - full System Info at https://paste.fedoraproject.org/paste/2qCn7vN36TMuIRKebG37nw
 * 64 bit

Issue

Nemo is crashing consistently when trying to open a folder with this SVG image file, made with Inkcape and containing some fancy filters.

Steps to reproduce

Make sure thumbnails are enabled, Nemo will crash when the folder containing this file is opened.

Other information

Although Nemo should avoid crashing on any kind of SVG, and I thought this might be caused by the combination of usinig Inkscape's Snow Crest Protrusions filter and mask to produce this SVG. But another SVG made the same way, also with a weird document size, did not cause a crash.

Looking through the crash dump, the root cause seems to be an exception in librsvg, though at the moment I'm not set up to debug this more thoroughly.

Similar to #836

@leigh123linux

This comment has been minimized.

Copy link
Member

leigh123linux commented Dec 10, 2018

Issue reproduces with nemo-4.0.4-1.fc29.x86_64

Core was generated by `nemo'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	  return ret;
[Current thread is 1 (Thread 0x7fd5ae1e7700 (LWP 24604))]
(gdb) bt full
#0  0x00007fd5c34a053f in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
        set = {__val = {0, 140555284404409, 0, 0, 140555725990659, 0, 3819193039296527680, 140555284444162, 140555287700160, 140555287700160, 140555287700160, 0, 3, 140556082879916, 3, 1}}
        pid = <optimized out>
        tid = <optimized out>
#1  0x00007fd5c348a895 in __GI_abort () at abort.c:79
        save_stage = 1
        act = 
          {__sigaction_handler = {sa_handler = 0x3, sa_sigaction = 0x3}, sa_mask = {__val = {0, 140555287465736, 140555725975704, 9, 1, 140555286346120, 140555284334520, 0, 140555725975248, 3, 0, 140555287705888, 2, 140555286357104, 1, 140555725975384}}, sa_flags = 1, sa_restorer = 0x0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007fd593e2c406 in std::sys::unix::abort_internal () at /lib64/librsvg-2.so.2
#3  0x00007fd593cb4951 in std::sys_common::util::abort () at /lib64/librsvg-2.so.2
#4  0x00007fd593c85369 in rust_panic () at /lib64/librsvg-2.so.2
#5  0x00007fd593c85224 in std::panicking::rust_panic_with_hook () at /lib64/librsvg-2.so.2
#6  0x00007fd593b5dfd7 in std::panicking::begin_panic (msg=..., file_line_col=0x7fd5c34a053f <__GI_raise+271>) at /builddir/build/BUILD/rustc-1.30.0-src/src/libstd/panicking.rs:411
#7  0x00007fd593b0ee6c in rsvg_internals::surface_utils::iterators::PixelRectangle::new (surface=<optimized out>, bounds=..., rectangle=..., edge_mode=rsvg_internals::surface_utils::None) at rsvg_internals/src/surface_utils/iterators.rs:78
        output_pixel = <optimized out>
        initial = <optimized out>
        kernel_bounds = rsvg_internals::filters::context::IRect {x0: 30, y0: 29, x1: 27, y1: 73}
        output_data = <optimized out>
        output_stride = 548
        output_surface = <optimized out>
        ry = 5.340211808681488
        rx = -2.5025424957275391
        ry = <optimized out>
        rx = <optimized out>
        input = <optimized out>
#8  0x00007fd593b0ee6c in <rsvg_internals::filters::morphology::Morphology as rsvg_internals::filters::Filter>::render (self=<optimized out>, _node=<optimized out>, ctx=<optimized out>, draw_ctx=<optimized out>) at rsvg_internals/src/filters/morphology.rs:133
        output_pixel = <optimized out>
        initial = <optimized out>
        kernel_bounds = rsvg_internals::filters::context::IRect {x0: 30, y0: 29, x1: 27, y1: 73}
        output_data = <optimized out>
        output_stride = 548
        output_surface = <optimized out>
        ry = 5.340211808681488
        rx = -2.5025424957275391
        ry = <optimized out>
        rx = <optimized out>
        input = <optimized out>
#9  0x00007fd593cfabd3 in rsvg_internals::filters::render::{{closure}} (filter_ctx=0x7fd5ae1e3ad0) at rsvg_internals/src/filters/mod.rs:346
        draw_ctx = 0x7fd59c001900
#10 0x00007fd593cfa05d in rsvg_internals::filters::render (filter_node=<optimized out>, computed_from_node_being_filtered=<optimized out>, source=<optimized out>, draw_ctx=<optimized out>) at rsvg_internals/src/filters/mod.rs:370
        rr = <optimized out>
        iter = <optimized out>
        filter_ctx = <optimized out>
        source_surface = <optimized out>
        filter_node = <optimized out>
#11 0x00007fd593b060da in rsvg_internals::drawing_ctx::DrawingCtx::run_filter (self=0x7fd59c0146f0, values=<optimized out>, child_surface=<optimized out>, filter_uri=..., node=<optimized out>) at rsvg_internals/src/drawing_ctx.rs:503
        filter_node = 0x7fd5ae1e3ed8
        acquired = <optimized out>
        output = <optimized out>
        filter_uri = <optimized out>
        res = <optimized out>
        clip_units = <optimized out>
        enable_background = <optimized out>
        opacity = <optimized out>
        clip_uri = <optimized out>
        original_cr = <optimized out>
#12 0x00007fd593b060da in rsvg_internals::drawing_ctx::DrawingCtx::with_discrete_layer (self=0x7fd59c0146f0, node=<optimized out>, values=<optimized out>, clipping=<optimized out>, draw_fn=...) at rsvg_internals/src/drawing_ctx.rs:427
        filter_uri = <optimized out>
        res = <optimized out>
        clip_units = <optimized out>
        enable_background = <optimized out>
        opacity = <optimized out>
        clip_uri = <optimized out>
        original_cr = <optimized out>
#13 0x00007fd593b67f7b in <rsvg_internals::structure::NodeGroup as rsvg_internals::node::NodeTrait>::draw (self=<optimized out>, node=0x7fd5ae1e2cf0, cascaded=<optimized out>, draw_ctx=0x2, clipping=<optimized out>) at rsvg_internals/src/structure.rs:44
        values = 0x0
#14 0x00007fd593b4a68b in rsvg_internals::node::Node::draw (self=<optimized out>, node=<optimized out>, cascaded=<optimized out>, draw_ctx=<optimized out>, clipping=false) at rsvg_internals/src/node.rs:548
        cr = <optimized out>
#15 0x00007fd593b086e8 in rsvg_internals::drawing_ctx::DrawingCtx::draw_node_from_stack (self=0x7fd59c0146f0, cascaded=0x7fd5ae1e2cf0, node=<optimized out>, clipping=<optimized out>) at rsvg_internals/src/drawing_ctx.rs:833
        values = <optimized out>
        stack_top = <optimized out>
        res = core::result::Result<(), rsvg_internals::error::RenderingError>::Err({<<variants>> = {<<discriminant>> = 45, Cairo = {__0 = 45}, CircularReference = void}})
#16 0x00007fd593b4cde6 in rsvg_internals::node::Node::draw_children (self=<optimized out>, cascaded=0x7fd5ae1e4ac0, draw_ctx=0x7fd59c0146f0, clipping=<optimized out>) at rsvg_internals/src/node.rs:600
        child = <optimized out>
        __next = <optimized out>
        iter = <optimized out>
#17 0x00007fd593b05f65 in rsvg_internals::drawing_ctx::DrawingCtx::with_discrete_layer (self=0x7fd5ae1e2cf0, node=<optimized out>, values=<optimized out>, clipping=<optimized out>, draw_fn=...) at rsvg_internals/src/drawing_ctx.rs:421
        clip_units = <optimized out>
        enable_background = <optimized out>
        opacity = <optimized out>
        clip_uri = <optimized out>
        original_cr = <optimized out>
#18 0x00007fd593b67f7b in <rsvg_internals::structure::NodeGroup as rsvg_internals::node::NodeTrait>::draw (self=<optimized out>, node=0x7fd5ae1e2cf0, cascaded=<optimized out>, draw_ctx=0x2, clipping=<optimized out>) at rsvg_internals/src/structure.rs:44
        values = 0x0
#19 0x00007fd593b4a68b in rsvg_internals::node::Node::draw (self=<optimized out>, node=<optimized out>, cascaded=<optimized out>, draw_ctx=<optimized out>, clipping=false) at rsvg_internals/src/node.rs:548
        cr = <optimized out>
#20 0x00007fd593b086e8 in rsvg_internals::drawing_ctx::DrawingCtx::draw_node_from_stack (self=0x7fd59c0146f0, cascaded=0x7fd5ae1e2cf0, node=<optimized out>, clipping=<optimized out>) at rsvg_internals/src/drawing_ctx.rs:833
        values = <optimized out>
        stack_top = <optimized out>
        res = core::result::Result<(), rsvg_internals::error::RenderingError>::Err({<<variants>> = {<<discriminant>> = 45, Cairo = {__0 = 45}, CircularReference = void}})
#21 0x00007fd593b4cde6 in rsvg_internals::node::Node::draw_children (self=<optimized out>, cascaded=0x7fd5ae1e5510, draw_ctx=0x7fd59c0146f0, clipping=<optimized out>) at rsvg_internals/src/node.rs:600
        child = <optimized out>
        __next = <optimized out>
        iter = <optimized out>
#22 0x00007fd593b5cdb1 in rsvg_internals::viewport::draw_in_viewport::{{closure}} (dc=0x7fd59c0146f0) at rsvg_internals/src/viewport.rs:83
        _params = <optimized out>
        preserve_aspect_ratio = rsvg_internals::aspect_ratio::AspectRatio {defer: false, align: {<<variants>> = {<<discriminant>> = {x = {__0 = (unknown: 160)}, y = {__0 = (rsvg_internals::aspect_ratio::Mid | rsvg_internals::aspect_ratio::Max | unknown: 164)}, fit = (rsvg_internals::aspect_ratio::Slice | unknown: 68)}, Some = {__0 = {x = {__0 = (unknown: 160)}, y = {__0 = (rsvg_internals::aspect_ratio::Mid | rsvg_internals::aspect_ratio::Max | unknown: 164)}, fit = (rsvg_internals::aspect_ratio::Slice | unknown: 68)}}, None = void}}}
        vh = 3.1620201333839779e-322
        vw = 1.7422457186352297e+41
        vy = 7.0295528039738442e+159
        vx = 4.6970851655477332e+108
        clip_mode = rsvg_internals::viewport::ClipToViewport
        do_clip = false
#23 0x00007fd593b05f65 in rsvg_internals::drawing_ctx::DrawingCtx::with_discrete_layer (self=0x7fd5ae1e2cf0, node=<optimized out>, values=<optimized out>, clipping=<optimized out>, draw_fn=...) at rsvg_internals/src/drawing_ctx.rs:421
        clip_units = <optimized out>
        enable_background = <optimized out>
        opacity = <optimized out>
        clip_uri = <optimized out>
        original_cr = <optimized out>
#24 0x00007fd593b6904c in rsvg_internals::viewport::draw_in_viewport (vx=0, vy=0, vw=137.45220947265625, vh=48.949325561523438, clip_mode=rsvg_internals::viewport::ClipToViewport, node=<optimized out>, values=<optimized out>, draw_ctx=<optimized out>, clipping=<optimized out>, do_clip=<optimized out>, vbox=..., preserve_aspect_ratio=..., affine=..., draw_fn=...) at rsvg_internals/src/viewport.rs:44
        nh = 48.949325561523438
        nw = 137.45220947265625
        ny = 0
        nx = 0
        params = <optimized out>
        values = <optimized out>
#25 0x00007fd593b6904c in <rsvg_internals::structure::NodeSvg as rsvg_internals::node::NodeTrait>::draw (self=<optimized out>, node=0x7fd5a002b5b0, cascaded=<optimized out>, draw_ctx=0x7fd59c0146f0, clipping=<optimized out>) at rsvg_internals/src/structure.rs:206
        nh = 48.949325561523438
        nw = 137.45220947265625
        ny = 0
        nx = 0
        params = <optimized out>
        values = <optimized out>
#26 0x00007fd593b4a68b in rsvg_internals::node::Node::draw (self=<optimized out>, node=<optimized out>, cascaded=<optimized out>, draw_ctx=<optimized out>, clipping=false) at rsvg_internals/src/node.rs:548
        cr = <optimized out>
#27 0x00007fd593b086e8 in rsvg_internals::drawing_ctx::DrawingCtx::draw_node_from_stack (self=0x7fd59c0146f0, cascaded=0x7fd5ae1e2cf0, node=<optimized out>, clipping=<optimized out>) at rsvg_internals/src/drawing_ctx.rs:833
        values = <optimized out>
        stack_top = <optimized out>
        res = core::result::Result<(), rsvg_internals::error::RenderingError>::Err({<<variants>> = {<<discriminant>> = 45, Cairo = {__0 = 45}, CircularReference = void}})
#28 0x00007fd593b08b05 in rsvg_drawing_ctx_draw_node_from_stack (raw_draw_ctx=raw_draw_ctx@entry=0x7fd59c0146f0, raw_tree=0x7fd5a002b5b0) at rsvg_internals/src/drawing_ctx.rs:1085
        tree = 0x7fd5a002b5b0
        draw_ctx = 0x7fd59c0146f0
#29 0x00007fd593b00590 in rsvg_handle_render_cairo_sub (id=<optimized out>, cr=0x56008545a7a0, handle=0x560085621860 [RsvgHandle]) at librsvg/rsvg-handle.c:1114
        draw = 0x7fd59c0146f0
        dimensions = {width = 137, height = 49, em = 137, ex = 49}
        drawsub = 0x0
        res = <optimized out>
        __func__ = "rsvg_handle_render_cairo_sub"
        status = <optimized out>
        __func__ = "rsvg_handle_render_cairo_sub"
#30 0x00007fd593b00590 in rsvg_handle_render_cairo_sub (handle=0x560085621860 [RsvgHandle], cr=0x56008545a7a0, id=<optimized out>) at librsvg/rsvg-handle.c:1070
        status = <optimized out>
        __func__ = "rsvg_handle_render_cairo_sub"
#31 0x00007fd593b009c1 in rsvg_handle_get_pixbuf_sub (id=0x0, handle=0x560085621860 [RsvgHandle]) at librsvg/rsvg-handle.c:1404
        dimensions = {width = 137, height = 49, em = 137, ex = 49}
        output = <optimized out>
        surface = 0x7fd5a0032b40
        cr = 0x56008545a7a0
        __func__ = "rsvg_handle_get_pixbuf_sub"
        __func__ = "rsvg_handle_get_pixbuf_sub"
#32 0x00007fd593b009c1 in rsvg_handle_get_pixbuf_sub (handle=0x560085621860 [RsvgHandle], id=0x0) at librsvg/rsvg-handle.c:1379
        __func__ = "rsvg_handle_get_pixbuf_sub"
#33 0x00007fd5ac161495 in gdk_pixbuf__svg_image_stop_load (error=0x7fd5ae1e5980, data=0x7fd5a001db80) at io-svg.c:163
        pixbuf = <optimized out>
        result = <optimized out>
        context = 0x7fd5a001db80
#34 0x00007fd5ac161495 in gdk_pixbuf__svg_image_stop_load (data=0x7fd5a001db80, error=0x7fd5ae1e5980) at io-svg.c:143
        context = 0x7fd5a001db80
#35 0x00007fd5c3ee1ee3 in gdk_pixbuf_loader_close (loader=loader@entry=0x560084dc48c0 [GdkPixbufLoader], error=error@entry=0x0) at ../gdk-pixbuf/gdk-pixbuf-loader.c:846
        tmp = 0x0
        priv = 0x7fd5a0024ed0
        retval = 1
        __func__ = "gdk_pixbuf_loader_close"
#36 0x00007fd5c4941685 in _gdk_pixbuf_new_from_uri_at_scale (uri=uri@entry=0x560085714620 "file:///home/leigh/Downloads/logo5.svg", width=width@entry=256, height=height@entry=256, preserve_aspect_ratio=1) at ../libcinnamon-desktop/gnome-desktop-thumbnail.c:460
        result = 1
        buffer = "e;stroke-width:1.91454351;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\"/>\n    </g>\n  </g>\n</svg>y=\"0\" inkscape:window-maximized=\"1\" inkscape:snap-global=\"false\" fit-margin-top=\"0\" fit-ma"...
        bytes_read = 0
        loader = 0x560084dc48c0 [GdkPixbufLoader]
        pixbuf = <optimized out>
        animation = <optimized out>
        iter = <optimized out>
        has_frame = <optimized out>
        info = {width = 256, height = 256, input_width = 137, input_height = 49, preserve_aspect_ratio = 1}
        file = 0x560084db7640
        file_info = <optimized out>
        input_stream = 0x56008518d9b0 [GLocalFileInputStream]
        error = 0x0
        __func__ = "_gdk_pixbuf_new_from_uri_at_scale"
#37 0x00007fd5c4941cbe in gnome_desktop_thumbnail_factory_generate_thumbnail (factory=<optimized out>, uri=0x560085714620 "file:///home/leigh/Downloads/logo5.svg", mime_type=<optimized out>) at ../libcinnamon-desktop/gnome-desktop-thumbnail.c:1279
        pixbuf = <optimized out>
        scaled = <optimized out>
        tmp_pixbuf = <optimized out>
        script = <optimized out>
        expanded_script = <optimized out>
        width = <optimized out>
        height = <optimized out>
        size = 256
        original_width = 0
        original_height = 0
        dimension = "\001\000\000\000\001\000\000\000\000\000\000"
        scale = <optimized out>
        exit_status = 134
        tmpname = 0x7fd5a002cb70 "P\266\002\240\325\177"
        disabled = <optimized out>
        __func__ = "gnome_desktop_thumbnail_factory_generate_thumbnail"
#38 0x00005600849d38ef in thumbnail_thread (task=0x7fd5a400d270 [GTask], source_object=<optimized out>, task_data=<optimized out>, cancellable=<optimized out>) at ../libnemo-private/nemo-thumbnails.c:555
        info = 0x560085872f00
        pixbuf = <optimized out>
        current_orig_mtime = 1544439734
        current_time = 1544439738
        node = <optimized out>
        __func__ = "thumbnail_thread"
#39 0x00007fd5c3db9a07 in g_task_thread_pool_thread (thread_data=0x7fd5a400d270, pool_data=<optimized out>) at gtask.c:1331
        task = 0x7fd5a400d270 [GTask]
#40 0x00007fd5c3c27e93 in g_thread_pool_thread_proxy (data=<optimized out>) at gthreadpool.c:307
        task = 0x7fd5a400d270
        pool = 0x560084c6d0f0
#41 0x00007fd5c3c2748a in g_thread_proxy (data=0x5600852995e0) at gthread.c:784
        thread = 0x5600852995e0
        __func__ = "g_thread_proxy"
#42 0x00007fd5c363858e in start_thread (arg=<optimized out>) at pthread_create.c:486
        ret = <optimized out>
        pd = <optimized out>
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140555725993728, -6741719618165537881, 140729851149454, 140729851149455, 140729851149584, 140555725990976, 6763216441001247655, 6763033895709180839}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#43 0x00007fd5c35656a3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment