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 755810 - crash in Document Viewer: opening an eps file
crash in Document Viewer: opening an eps file
Status: RESOLVED NOTGNOME
Product: evince
Classification: Core
Component: general
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-29 20:54 UTC by Richard B. Kreckel
Modified: 2016-09-29 17:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot rendering test case (26.02 KB, image/png)
2016-09-29 14:31 UTC, Germán Poo-Caamaño
Details

Description Richard B. Kreckel 2015-09-29 20:54:50 UTC
The file at http://in.terlu.de/~kreckel/add.eps produces a segmentation fault in evince 3.16.1.
Comment 1 Germán Poo-Caamaño 2015-09-29 21:24:45 UTC
Backtrace:

Program received signal SIGSEGV, Segmentation fault.
bits_image_fetch_separable_convolution_affine (repeat_mode=PIXMAN_REPEAT_NONE, format=PIXMAN_x8r8g8b8, convert_pixel=<optimized out>, mask=0x0, buffer=0xd7d010, width=<optimized out>, line=<optimized out>, offset=<optimized out>, image=0xcab300)
    at ../../pixman/pixman-fast-path.c:2813
2813	../../pixman/pixman-fast-path.c: No such file or directory.
(gdb) thread apply all bt

Thread 1 (Thread 0x7ffff7fb8880 (LWP 3376))

  • #0 bits_image_fetch_separable_convolution_affine
    at ../../pixman/pixman-fast-path.c line 2813
  • #1 bits_image_fetch_separable_convolution_affine_none_x8r8g8b8
    at ../../pixman/pixman-fast-path.c line 3153
  • #2 general_composite_rect
    at ../../pixman/pixman-general.c line 211
  • #3 pixman_image_composite32
    at ../../pixman/pixman.c line 707
  • #4 composite_boxes
    at cairo-image-compositor.c line 538
  • #5 composite_aligned_boxes
    at cairo-spans-compositor.c line 683
  • #6 clip_and_composite_boxes
    at cairo-spans-compositor.c line 882
  • #7 clip_and_composite_boxes
    at cairo-spans-compositor.c line 901
  • #8 _cairo_spans_compositor_paint
    at cairo-spans-compositor.c line 983
  • #9 _cairo_compositor_paint
    at cairo-compositor.c line 65
  • #10 _cairo_surface_paint
    at cairo-surface.c line 2117
  • #11 _cairo_surface_offset_paint
    at cairo-surface-offset.c line 85
  • #12 render_pattern
    at cairo-xlib-source.c line 305
  • #13 _cairo_xlib_source_create_for_pattern
    at cairo-xlib-source.c line 1165
  • #14 composite_aligned_boxes
    at cairo-traps-compositor.c line 1292
  • #15 clip_and_composite_boxes
    at cairo-traps-compositor.c line 1792
  • #16 clip_and_composite_boxes
    at cairo-traps-compositor.c line 1742
  • #17 _cairo_traps_compositor_paint
    at cairo-traps-compositor.c line 2063
  • #18 _cairo_compositor_paint
    at cairo-compositor.c line 65
  • #19 _cairo_surface_paint
    at cairo-surface.c line 2117
  • #20 _cairo_gstate_paint
    at cairo-gstate.c line 1067
  • #21 INT_cairo_paint
    at cairo.c line 2003
  • #22 draw_surface
    at ev-view.c line 6620
  • #23 draw_one_page
    at ev-view.c line 6731
  • #24 ev_view_draw
    at ev-view.c line 4564
  • #25 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #26 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1100
  • #27 _g_closure_invoke_va
    at gclosure.c line 864
  • #28 g_signal_emit_valist
    at gsignal.c line 3216
  • #29 g_signal_emit
    at gsignal.c line 3363
  • #30 _gtk_widget_draw_internal
    at gtkwidget.c line 6976
  • #31 _gtk_widget_draw_internal
    at gtkwidget.c line 6954
  • #32 _gtk_widget_draw_windows
    at gtkwidget.c line 7077
  • #33 _gtk_widget_draw
    at gtkwidget.c line 7148
  • #34 gtk_container_propagate_draw
    at gtkcontainer.c line 3748
  • #35 gtk_container_draw
    at gtkcontainer.c line 3583
  • #36 gtk_scrolled_window_draw
    at gtkscrolledwindow.c line 2232
  • #37 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #38 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1100
  • #39 _g_closure_invoke_va
    at gclosure.c line 864
  • #40 g_signal_emit_valist
    at gsignal.c line 3216
  • #41 g_signal_emit
    at gsignal.c line 3363
  • #42 _gtk_widget_draw_internal
    at gtkwidget.c line 6976
  • #43 _gtk_widget_draw_internal
    at gtkwidget.c line 6954
  • #44 _gtk_widget_draw_windows
    at gtkwidget.c line 7077
  • #45 _gtk_widget_draw
    at gtkwidget.c line 7148
  • #46 gtk_container_propagate_draw
    at gtkcontainer.c line 3748
  • #47 gtk_container_draw
    at gtkcontainer.c line 3583
  • #48 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #49 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1100
  • #50 _g_closure_invoke_va
    at gclosure.c line 864
  • #51 g_signal_emit_valist
    at gsignal.c line 3216
  • #52 g_signal_emit
    at gsignal.c line 3363
  • #53 _gtk_widget_draw_internal
    at gtkwidget.c line 6976
  • #54 _gtk_widget_draw_internal
    at gtkwidget.c line 7163
  • #55 _gtk_widget_draw
    at gtkwidget.c line 7154
  • #56 gtk_container_propagate_draw
    at gtkcontainer.c line 3748
  • #57 gtk_container_draw
    at gtkcontainer.c line 3583
  • #58 gtk_box_draw
    at gtkbox.c line 448
  • #59 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #60 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1100
  • #61 _g_closure_invoke_va
    at gclosure.c line 864
  • #62 g_signal_emit_valist
    at gsignal.c line 3216
  • #63 g_signal_emit
    at gsignal.c line 3363
  • #64 _gtk_widget_draw_internal
    at gtkwidget.c line 6976
  • #65 _gtk_widget_draw_internal
    at gtkwidget.c line 7163
  • #66 _gtk_widget_draw
    at gtkwidget.c line 7154
  • #67 gtk_container_propagate_draw
    at gtkcontainer.c line 3748
  • #68 gtk_container_draw
    at gtkcontainer.c line 3583
  • #69 gtk_paned_draw
    at gtkpaned.c line 1756
  • #70 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #71 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1100
  • #72 _g_closure_invoke_va
    at gclosure.c line 864
  • #73 g_signal_emit_valist
    at gsignal.c line 3216
  • #74 g_signal_emit
    at gsignal.c line 3363
  • #75 _gtk_widget_draw_internal
    at gtkwidget.c line 6976
  • #76 _gtk_widget_draw_internal
    at gtkwidget.c line 6954
  • #77 _gtk_widget_draw_windows
    at gtkwidget.c line 7077
  • #78 _gtk_widget_draw
    at gtkwidget.c line 7173
  • #79 gtk_container_propagate_draw
    at gtkcontainer.c line 3748
  • #80 gtk_container_draw
    at gtkcontainer.c line 3583
  • #81 gtk_box_draw
    at gtkbox.c line 448
  • #82 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #83 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1100
  • #84 _g_closure_invoke_va
    at gclosure.c line 864
  • #85 g_signal_emit_valist
    at gsignal.c line 3216
  • #86 g_signal_emit
    at gsignal.c line 3363
  • #87 _gtk_widget_draw_internal
    at gtkwidget.c line 6976
  • #88 _gtk_widget_draw_internal
    at gtkwidget.c line 7163
  • #89 _gtk_widget_draw
    at gtkwidget.c line 7154
  • #90 gtk_container_propagate_draw
    at gtkcontainer.c line 3748
  • #91 gtk_container_draw
    at gtkcontainer.c line 3583
  • #92 gtk_window_draw
    at gtkwindow.c line 9812
  • #93 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #94 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1100
  • #95 _g_closure_invoke_va
    at gclosure.c line 864
  • #96 g_signal_emit_valist
    at gsignal.c line 3216
  • #97 g_signal_emit
    at gsignal.c line 3363
  • #98 _gtk_widget_draw_internal
    at gtkwidget.c line 6976
  • #99 _gtk_widget_draw_internal
    at gtkwidget.c line 6954
  • #100 _gtk_widget_draw_windows
    at gtkwidget.c line 7077
  • #101 _gtk_widget_draw
    at gtkwidget.c line 7148
  • #102 gtk_widget_send_expose
    at gtkwidget.c line 7625
  • #103 gtk_main_do_event
    at gtkmain.c line 1678
  • #104 _gdk_window_process_updates_recurse_helper
    at gdkwindow.c line 3556
  • #105 gdk_window_process_updates_internal
    at gdkwindow.c line 3681
  • #106 gdk_window_process_updates_with_mode
    at gdkwindow.c line 3882
  • #107 _g_closure_invoke_va
    at gclosure.c line 864
  • #108 g_signal_emit_valist
    at gsignal.c line 3216
  • #109 g_signal_emit_by_name
    at gsignal.c line 3403
  • #110 gdk_frame_clock_paint_idle
    at gdkframeclockidle.c line 430
  • #111 gdk_threads_dispatch
    at gdk.c line 717
  • #112 g_timeout_dispatch
    at gmain.c line 4545
  • #113 g_main_dispatch
    at gmain.c line 3122
  • #114 g_main_context_dispatch
    at gmain.c line 3737
  • #115 g_main_context_iterate
    at gmain.c line 3808
  • #116 g_main_context_iteration
    at gmain.c line 3869
  • #117 g_application_run
    at gapplication.c line 2308
  • #118 main
    at main.c line 316

Comment 2 José Aliste 2015-09-30 08:44:05 UTC
So the traces look like a problem with either cairo or other underlying library used to render eps. Can you check versions and whether there are similar traces in their bugzillas?
Comment 3 Richard B. Kreckel 2015-09-30 22:54:30 UTC
Found nothing yet in a quick search. But isn't this trace pointing to libevview3?


Program received signal SIGSEGV, Segmentation fault.
INT_cairo_surface_set_device_scale (surface=0x0, x_scale=1, y_scale=1) at ../../../../src/cairo-surface.c:1686
1686	../../../../src/cairo-surface.c: No such file or directory.
(gdb) thread apply all bt

Thread 1 (Thread 0x7ffff7fb9980 (LWP 3465))

  • #0 INT_cairo_surface_set_device_scale
    at ../../../../src/cairo-surface.c line 1686
  • #1 ??
    from /usr/lib/libevview3.so.3
  • #2 ??
    from /usr/lib/libevview3.so.3
  • #3 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #4 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #5 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #6 ??
    from /usr/lib/libevview3.so.3
  • #7 g_main_context_dispatch
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #8 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #9 g_main_context_iteration
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #10 g_application_run
    from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
  • #11 ??
  • #12 __libc_start_main
    at libc-start.c line 287
  • #13 ??

Comment 4 Richard B. Kreckel 2015-09-30 22:56:09 UTC
(Referring to Debian's libevview3 3.14.1 package.)
Comment 5 José Aliste 2015-10-01 06:28:50 UTC
oh, traces are different. yes, for some reason we are assuming that backends will always render a correct surface. that is not always the case. For your trace there is a patch in other bug I can't remember atm
Comment 6 Richard B. Kreckel 2015-10-01 07:38:25 UTC
(In reply to Germán Poo-Caamaño from comment #1)
After upgrading to 3.18.0, I'm seeing your trace to the segfault in pixman-fast-path.c.
Comment 7 Oded Gabbay 2015-10-01 08:08:29 UTC
Which distribution are you using ?
Could you please post pixman's version ?
Comment 8 Richard B. Kreckel 2015-10-01 08:29:53 UTC
To get line numbers correct, here is a new bt, created with pibpixman-1-0_0.33.3-2 from Debian testing:

Program received signal SIGSEGV, Segmentation fault.
bits_image_fetch_separable_convolution_affine (repeat_mode=PIXMAN_REPEAT_NONE, format=PIXMAN_x8r8g8b8,
convert_pixel=<optimized out>, mask=0x0, buffer=0x7fffffff35c0, width=<optimized out>,
line=<optimized out>, offset=<optimized out>, image=0x555555d85060)
at ../../pixman/pixman-fast-path.c:2815

  • #0 bits_image_fetch_separable_convolution_affine
    at ../../pixman/pixman-fast-path.c line 2815
  • #1 bits_image_fetch_separable_convolution_affine_none_x8r8g8b8
    at ../../pixman/pixman-fast-path.c line 3155
  • #2 general_composite_rect
    at ../../pixman/pixman-general.c line 222
  • #3 pixman_image_composite32
    at ../../pixman/pixman.c line 709
  • #4 composite_boxes
    at ../../../../src/cairo-image-compositor.c line 538
  • #5 composite_aligned_boxes
    at ../../../../src/cairo-spans-compositor.c line 683
  • #6 clip_and_composite_boxes
    at ../../../../src/cairo-spans-compositor.c line 882
  • #7 clip_and_composite_boxes
    at ../../../../src/cairo-spans-compositor.c line 901
  • #8 _cairo_spans_compositor_paint
    at ../../../../src/cairo-spans-compositor.c line 983
  • #9 _cairo_compositor_paint
    at ../../../../src/cairo-compositor.c line 65
  • #10 _cairo_surface_paint
    at ../../../../src/cairo-surface.c line 2117
  • #11 _cairo_surface_offset_paint
    at ../../../../src/cairo-surface-offset.c line 85
  • #12 render_pattern
    at ../../../../src/cairo-xlib-source.c line 305
  • #13 _cairo_xlib_source_create_for_pattern
    at ../../../../src/cairo-xlib-source.c line 1165
  • #14 composite_aligned_boxes
    at ../../../../src/cairo-traps-compositor.c line 1292
  • #15 clip_and_composite_boxes
    at ../../../../src/cairo-traps-compositor.c line 1792
  • #16 clip_and_composite_boxes
    at ../../../../src/cairo-traps-compositor.c line 1742
  • #17 _cairo_traps_compositor_paint
    at ../../../../src/cairo-traps-compositor.c line 2063
  • #18 _cairo_compositor_paint
    at ../../../../src/cairo-compositor.c line 65
  • #19 _cairo_surface_paint
    at ../../../../src/cairo-surface.c line 2117
  • #20 _cairo_gstate_paint
    at ../../../../src/cairo-gstate.c line 1067
  • #21 INT_cairo_paint
    at ../../../../src/cairo.c line 2003
  • #22 ??
    from /usr/lib/libevview3.so.3
  • #23 ??
    from /usr/lib/libevview3.so.3
  • #24 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #25 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #26 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #27 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #28 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #29 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #30 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #31 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #32 gtk_container_propagate_draw
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #33 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #34 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #35 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #36 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #37 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #38 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #39 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #40 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #41 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #42 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #43 gtk_container_propagate_draw
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #44 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #45 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #46 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #47 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #48 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #49 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #50 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #51 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #52 gtk_container_propagate_draw
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #53 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #54 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #55 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #56 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #57 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #58 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #59 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #60 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #61 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #62 gtk_container_propagate_draw
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #63 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #64 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #65 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #66 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #67 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #68 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #69 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #70 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #71 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #72 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #73 gtk_container_propagate_draw
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #74 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #75 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #76 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #77 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #78 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #79 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #80 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #81 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #82 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #83 gtk_container_propagate_draw
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #84 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #85 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #86 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #87 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #88 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #89 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #90 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #91 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #92 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #93 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #94 gtk_widget_send_expose
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #95 gtk_main_do_event
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #96 ??
    from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
  • #97 ??
    from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
  • #98 ??
    from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
  • #99 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #100 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #101 g_signal_emit_by_name
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #102 ??
    from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
  • #103 ??
    from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
  • #104 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #105 g_main_context_dispatch
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #106 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #107 g_main_context_iteration
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #108 g_application_run
    from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
  • #109 ??
  • #110 __libc_start_main
    at libc-start.c line 287
  • #111 ??

Comment 9 Oded Gabbay 2015-10-01 08:33:22 UTC
I would like to suggest two things:

1. Open a bug on pixman in freedesktop.org bugzilla. That's where pixman contributes are looking, so it would get more responses.

2. I would try to install the previous pixman version, 0.32.6, and see if the bug reproduce and post the result to the bug.

  Oded
Comment 10 Richard B. Kreckel 2015-10-01 09:22:26 UTC
(In reply to Oded Gabbay from comment #9)
> 1. Open a bug on pixman in freedesktop.org bugzilla. That's where pixman
> contributes are looking, so it would get more responses.

https://bugs.freedesktop.org/show_bug.cgi?id=92210

> 2. I would try to install the previous pixman version, 0.32.6, and see if
> the bug reproduce and post the result to the bug.

Reproduced in 0.32.6, cf. bt in pixman bugreport.
Comment 11 Siarhei Siamashka 2015-10-03 00:54:43 UTC
"valgrind evince add.eps" says:

==26671== Thread 1:
==26671== Invalid read of size 4
==26671==    at 0xA7E98CB: convert_x8r8g8b8 (pixman-fast-path.c:3081)
==26671==    by 0xA7F4271: bits_image_fetch_separable_convolution_affine (pixman-fast-path.c:2813)
==26671==    by 0xA7F4271: bits_image_fetch_separable_convolution_affine_none_x8r8g8b8 (pixman-fast-path.c:3153)
==26671==    by 0xA807E5F: general_composite_rect (pixman-general.c:209)
==26671==    by 0xA61F93A: pixman_image_composite32 (pixman.c:707)
==26671==    by 0x651E8AE: composite_boxes (cairo-image-compositor.c:538)
==26671==    by 0x6571BE3: composite_aligned_boxes (cairo-spans-compositor.c:683)
==26671==    by 0x657246C: clip_and_composite_boxes (cairo-spans-compositor.c:882)
==26671==    by 0x6572807: _cairo_spans_compositor_paint (cairo-spans-compositor.c:983)
==26671==    by 0x650E92F: _cairo_compositor_paint (cairo-compositor.c:65)
==26671==    by 0x6528E8E: _cairo_image_surface_paint (cairo-image-surface.c:927)
==26671==    by 0x657868C: _cairo_surface_paint (cairo-surface.c:2117)
==26671==    by 0x657F4E1: _cairo_surface_offset_paint (cairo-surface-offset.c:85)
==26671==  Address 0x255591c0 is 0 bytes after a block of size 3,121,536 alloc'd
==26671==    at 0x4C28F00: malloc (vg_replace_malloc.c:296)
==26671==    by 0x1CD350B6: spectre_presize (spectre-device.c:75)
==26671==    by 0x1D1E657F: display_open (in /usr/lib64/libgs.so.9.15)
==26671==    by 0x1D373265: gs_opendevice (in /usr/lib64/libgs.so.9.15)
==26671==    by 0x1D0DA48B: display_set_callback (in /usr/lib64/libgs.so.9.15)
==26671==    by 0x1D0D6130: gs_main_init2aux (in /usr/lib64/libgs.so.9.15)
==26671==    by 0x1D0D65F0: gs_main_init2 (in /usr/lib64/libgs.so.9.15)
==26671==    by 0x1D0D93C7: gs_main_init_with_args (in /usr/lib64/libgs.so.9.15)
==26671==    by 0x1CD348C4: spectre_gs_run (spectre-gs.c:190)
==26671==    by 0x1CD35430: spectre_device_render (spectre-device.c:264)
==26671==    by 0x1CD3580B: spectre_page_render (spectre-page.c:164)
==26671==    by 0x1CB2DA6C: ps_document_render (in /usr/lib64/evince/4/backends/libpsdocument.so)


Then setting breakpoints in gdb on 'spectre_presize' and 'cairo_image_surface_create_for_data' reveals the following:

Breakpoint 1, spectre_presize (handle=0x7fffc8026a90, device=0x7fffc814c298, width=1055, height=739, raster=4224, format=6359172) at spectre-device.c:67
67		if (!handle)
(gdb) 
Continuing.

Breakpoint 2, INT_cairo_image_surface_create_for_data (data=0x7fffc75da010 "\377\377\377", format=CAIRO_FORMAT_RGB24, width=739, height=1055, stride=4224) at /usr/src/debug/x11-libs/cairo-1.14.2/cairo-1.14.2/src/cairo-image-surface.c:514
514	    if (! CAIRO_FORMAT_VALID (format))
(gdb) 
Continuing.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7f928c0 (LWP 24493)]
0x00007ffff22218cb in convert_x8r8g8b8 (row=0x7fffc7974f90 "\230A ", x=0) at /usr/src/debug/x11-libs/pixman-0.32.8/pixman-0.32.8/pixman/pixman-fast-path.c:3081
3081	    return *(((uint32_t *)row) + x);
(gdb) 

Looks like 'width' and 'height' are just swapped somewhere. So that cairo and then pixman receive the image buffer of incorrect size and crash trying to access pixels, which had not been properly allocated.
Comment 12 Paul Menzel 2016-06-27 18:42:26 UTC
My current guess is, that it happens in Evince’s `libview/ev-view.c` in the function below.

```
void
_get_page_size_for_scale_and_rotation (EvDocument *document,
                                       gint        page,
                                       gdouble     scale,
                                       gint        rotation,
                                       gint       *page_width,
                                       gint       *page_height)
{
        gdouble w, h;
        gint    width, height;

        ev_document_get_page_size (document, page, &w, &h);

        width = (gint)(w * scale + 0.5);
        height = (gint)(h * scale + 0.5);

        if (page_width)
                *page_width = (rotation == 0 || rotation == 180) ? width : height;
        if (page_height)
                *page_height = (rotation == 0 || rotation == 180) ? height : width;
}
```
Comment 13 Jason Crain 2016-06-27 19:01:45 UTC
I can't tell because the link is returning a 404, but this is possibly the same as bug 755776 where the scaling calculations are bad for rotated PS documents.  The scaling calculation should be fixed now, but it could still have other problems due to the interaction of libspectre and ghostscript.
Comment 14 Richard B. Kreckel 2016-06-27 19:37:00 UTC
For reference, here is the related bug report on freedesktop.org:
https://bugs.freedesktop.org/show_bug.cgi?id=76450
(Freedesktop.org bugs 87588 and 92210 are duplicates of this one.)
Comment 15 Germán Poo-Caamaño 2016-09-29 14:10:50 UTC
The file add.eps is not available anymore. However, the bug reported in freedesktop was marked as duplicated of other ones as pointed in #c14.
Original report: https://bugs.freedesktop.org/show_bug.cgi?id=92210

The documents attached in those documents do not make evince crash anymore with libspectre 0.2.8.

So I am closing this bug as NOTGNOME
Comment 16 Siarhei Siamashka 2016-09-29 14:17:45 UTC
Hi, could you please also have a look at https://bugs.freedesktop.org/show_bug.cgi?id=96615 and try the test case from there?
Comment 17 Germán Poo-Caamaño 2016-09-29 14:31:41 UTC
Created attachment 336525 [details]
Screenshot rendering test case

The screenshot shows Evince displaying the document (not crashing)

The test case from https://bugs.freedesktop.org/show_bug.cgi?id=96615
Comment 18 Richard B. Kreckel 2016-09-29 17:41:18 UTC
Indeed, this was fixed with libspectre 0.2.8:
https://bugs.freedesktop.org/show_bug.cgi?id=76450
Comment 19 Siarhei Siamashka 2016-09-29 17:43:56 UTC
OK, thanks a lot. I guess, we can finally close all these bugreports now.