Bug 1382521 - applications crash in print preview / print in cairo due to webkitgtk3
Summary: applications crash in print preview / print in cairo due to webkitgtk3
Keywords:
Status: CLOSED DUPLICATE of bug 1238955
Alias: None
Product: Fedora
Classification: Fedora
Component: webkitgtk3
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-06 21:52 UTC by Feng Yu
Modified: 2016-10-10 08:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-10 08:46:16 UTC


Attachments (Terms of Use)

Description Feng Yu 2016-10-06 21:52:57 UTC
Description of problem:

evolution mail crashes print preview / print in cairo

Version-Release number of selected component (if applicable):

evolution 3.20.5

How reproducible:

Always

Steps to Reproduce:
1. Start a new email.
2. Write "吳稚暉全集" in the content. Use Plain Text format.
3. Click either Print / Print Preview

Actual results:

Evolution crashes.

Expected results:

Printing works.

Additional info:

Seems to be related to cairo. I do recall xournal may suffer from similar issues when CJK characters are present in the text. Feel free to move this to cairo if indeed it is.

openjdk version "1.8.0_102"
OpenJDK Runtime Environment (build 1.8.0_102-b14)
OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)
evolution: cairo-array.c:182: _cairo_array_index: Assertion `index < array->num_elements' failed.
Aborted (core dumped)

(gdb) bt
#0  0x00007fffec9556f5 in raise () at /lib64/libc.so.6
#1  0x00007fffec9572fa in abort () at /lib64/libc.so.6
#2  0x00007fffec94df97 in __assert_fail_base () at /lib64/libc.so.6
#3  0x00007fffec94e042 in  () at /lib64/libc.so.6
#4  0x00007fffed802486 in  () at /lib64/libcairo.so.2
#5  0x00007fffed874fb2 in _cairo_cff_subset_init () at /lib64/libcairo.so.2
#6  0x00007fffed8c60e5 in _cairo_pdf_surface_emit_unscaled_font_subset () at /lib64/libcairo.so.2
#7  0x00007fffed876eeb in _cairo_scaled_font_subsets_foreach_internal () at /lib64/libcairo.so.2
#8  0x00007fffed8c1ee8 in _cairo_pdf_surface_finish () at /lib64/libcairo.so.2
#9  0x00007fffed85ae96 in _cairo_surface_finish () at /lib64/libcairo.so.2
#10 0x00007fffed85baa7 in cairo_surface_finish () at /lib64/libcairo.so.2
#11 0x00007fffed82fcff in _cairo_paginated_surface_finish () at /lib64/libcairo.so.2
#12 0x00007fffed85ae96 in _cairo_surface_finish () at /lib64/libcairo.so.2
#13 0x00007fffed85baa7 in cairo_surface_finish () at /lib64/libcairo.so.2
#14 0x00007fffee8e1a95 in preview_print_idle_done () at /lib64/libgtk-3.so.0
#15 0x00007fffee3c1ea8 in gdk_threads_dispatch_free () at /lib64/libgdk-3.so.0
#16 0x00007fffecd29198 in g_source_callback_unref () at /lib64/libglib-2.0.so.0
#17 0x00007fffecd2a976 in g_source_destroy_internal () at /lib64/libglib-2.0.so.0
#18 0x00007fffecd2c758 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#19 0x00007fffecd2ca70 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#20 0x00007fffecd2cd92 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#21 0x00007fffee8e3164 in print_pages () at /lib64/libgtk-3.so.0
#22 0x00007fffee8e4212 in gtk_print_operation_run () at /lib64/libgtk-3.so.0
#23 0x00007ffff02189df in webkit_web_frame_print_full () at /lib64/libwebkitgtk-3.0.so.0
#24 0x00007fffc6acc1fb in mail_printer_print_timeout_cb () at /usr/lib64/evolution/libevolution-mail.so
#25 0x00007fffecd2d133 in g_timeout_dispatch () at /lib64/libglib-2.0.so.0
#26 0x00007fffecd2c6ba in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#27 0x00007fffecd2ca70 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#28 0x00007fffecd2cd92 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#29 0x00007fffc6ae5429 in em_utils_composer_print_cb () at /usr/lib64/evolution/libevolution-mail.so
#30 0x00007fffed0003e5 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#31 0x00007fffed012432 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#32 0x00007fffed01b05f in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#33 0x00007fffed01b43f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#34 0x00007fffc684478b in msg_composer_print_cb () at /usr/lib64/evolution/libevolution-mail-composer.so
#35 0x00007fffed2b7b67 in g_simple_async_result_complete () at /lib64/libgio-2.0.so.0
#36 0x00007fffc684232d in composer_get_message_ready () at /usr/lib64/evolution/libevolution-mail-composer.so
#37 0x00007fffed2b7b67 in g_simple_async_result_complete () at /lib64/libgio-2.0.so.0
#38 0x00007fffc684a6e8 in composer_build_message () at /usr/lib64/evolution/libevolution-mail-composer.so
#39 0x00007fffed0003e5 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#40 0x00007fffed012432 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#41 0x00007fffed01b05f in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#42 0x00007fffed01b43f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#43 0x00007fffee7169d0 in _gtk_action_emit_activate () at /lib64/libgtk-3.so.0
#44 0x00007fffed0003e5 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#45 0x00007fffed011e03 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#46 0x00007fffed01b05f in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#47 0x00007fffed01b43f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#48 0x00007fffee9d6dee in gtk_widget_activate () at /lib64/libgtk-3.so.0
#49 0x00007fffee8adfb6 in gtk_menu_shell_activate_item () at /lib64/libgtk-3.so.0
#50 0x00007fffee8ae2eb in gtk_menu_shell_button_release () at /lib64/libgtk-3.so.0
#51 0x00007fffee8925e1 in _gtk_marshal_BOOLEAN__BOXEDv () at /lib64/libgtk-3.so.0
---Type <return> to continue, or q <return> to quit---
#52 0x00007fffed000614 in _g_closure_invoke_va () at /lib64/libgobject-2.0.so.0
#53 0x00007fffed01a8b3 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#54 0x00007fffed01b43f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#55 0x00007fffee9d49fc in gtk_widget_event_internal () at /lib64/libgtk-3.so.0
#56 0x00007fffee88f75e in propagate_event () at /lib64/libgtk-3.so.0
#57 0x00007fffee891692 in gtk_main_do_event () at /lib64/libgtk-3.so.0
#58 0x00007fffee3cc0c5 in _gdk_event_emit () at /lib64/libgdk-3.so.0
#59 0x00007fffee3f90b2 in gdk_event_source_dispatch () at /lib64/libgdk-3.so.0
#60 0x00007fffecd2c6ba in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#61 0x00007fffecd2ca70 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#62 0x00007fffecd2cd92 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#63 0x00007fffee890815 in gtk_main () at /lib64/libgtk-3.so.0
#64 0x0000555555557d31 in main ()

Comment 1 Milan Crha 2016-10-07 08:23:05 UTC
Thanks for a  bug report. I can reproduce this in a virtual machine, but not in my real machine with Fedora 24. I also cannot reproduce it from gedit on both systems, thus it can be related to the way how webkitgtk3 encodes the string when printing. I'm moving this to webkit for now.

Comment 2 Feng Yu 2016-10-07 21:03:50 UTC
I tried 

env LANG=zh_CN evolution
env LANG=zh_CN.gbk evolution


Each time if I click on print preview it crashes. So regardless how Evolution think about local the printing crashes.

Comment 3 Feng Yu 2016-10-07 21:08:27 UTC
I can confirm if I try to print from epiphany a webpage that contains chinese. The same crash happens.

Comment 4 Feng Yu 2016-10-07 21:11:19 UTC
1. Launch webkitgtk3
2. Visit zh.wikipedia.org/
3. Print to PDF.

Result:

The page crashes.

Console output:

WebKitWebProcess: cairo-array.c:182: _cairo_array_index: Assertion `index < array->num_elements' failed.

Comment 5 Feng Yu 2016-10-07 21:12:01 UTC
Sorry I meant epiphany.

Comment 6 Tomas Popela 2016-10-10 08:11:04 UTC
OK, I can confirm the issue. I will look at it.

Comment 7 Tomas Popela 2016-10-10 08:46:16 UTC

*** This bug has been marked as a duplicate of bug 1238955 ***


Note You need to log in before you can comment on or make changes to this bug.