Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#126 Xournal Crashes when Attempting to Print


Xournal crashes when attempting to print a file. A working example is attached, along with a core dump from my system.

The problem is not format dependent - converting the pdf to a ps doesn't change anything, nor does a pdf->ps->pdf conversion.

The file does print in gimp, without errors or warnings.

1 Attachments


  • Denis Auroux
    Denis Auroux

    I can't reproduce the problem on my distribution -- the file loads and prints fine, both with File -> Export to PDF (which converts it to a bitmap since this is a compressed PDF that xournal's own parser can't process, but that's increasingly common these days) and File -> Print (which preserves the PDF structure).

    Unfortunately your core file won't load properly on my system due to different libraries. Based on the version numbers of gcc and poppler, you're obviously using a cutting-edge distribution, and while there may be a bug in xournal, it's also quite possible that the bug is in poppler or some other library.

    Can you provide the backtrace information? I.e. run in a terminal:
    gdb xournal blah.dump
    then type "bt"
    That would at least give some idea of where the crash occurred.

    Also, does the file load and print fine in evince?

    Other than that, all we can do is wait for others to reproduce the bug and get a sense of whether there's really something special about this PDF file, or a bug in some library on your system, or a bug in xournal.


  • j3doucet

    Running Arch, so it's very possibly a problem with one of the other packages.

    Here's my gdb output:

    (gdb) bt

    0 0x00007f36920394b0 in ?? () from /usr/lib/libcairo.so.2

    1 0x00007f36920ae552 in ?? () from /usr/lib/libcairo.so.2

    2 0x00007f36920aead1 in ?? () from /usr/lib/libcairo.so.2

    3 0x00007f36920aefcb in ?? () from /usr/lib/libcairo.so.2

    4 0x00007f36920468a4 in ?? () from /usr/lib/libcairo.so.2

    5 0x00007f369204d4bb in ?? () from /usr/lib/libcairo.so.2

    6 0x00007f36920381d8 in ?? () from /usr/lib/libcairo.so.2

    7 0x00007f36920391c7 in ?? () from /usr/lib/libcairo.so.2

    8 0x00007f369201b52e in ?? () from /usr/lib/libcairo.so.2

    9 0x00007f369201b6fc in ?? () from /usr/lib/libcairo.so.2

    10 0x00007f3692046e8b in cairo_surface_show_page ()

    from /usr/lib/libcairo.so.2

    11 0x00007f3692008b10 in ?? () from /usr/lib/libcairo.so.2

    12 0x00007f3691ffae45 in cairo_show_page () from /usr/lib/libcairo.so.2

    13 0x00007f3692fc2c6a in gtk_print_operation_draw_page_finish ()

    from /usr/lib/libgtk-x11-2.0.so.0

    14 0x00007f3692fc354b in ?? () from /usr/lib/libgtk-x11-2.0.so.0

    15 0x00007f3692bbe637 in ?? () from /usr/lib/libgdk-x11-2.0.so.0

    16 0x00007f3691187f06 in g_main_context_dispatch ()

    from /usr/lib/libglib-2.0.so.0

    17 0x00007f3691188258 in ?? () from /usr/lib/libglib-2.0.so.0

    18 0x00007f369118865a in g_main_loop_run () from /usr/lib/libglib-2.0.so.0

    19 0x00007f3692fc207d in ?? () from /usr/lib/libgtk-x11-2.0.so.0

    20 0x00007f3692fc3874 in gtk_print_operation_run ()

    from /usr/lib/libgtk-x11-2.0.so.0

    21 0x0000000000434a96 in ?? ()

    22 0x00007f3691450458 in g_closure_invoke ()

    from /usr/lib/libgobject-2.0.so.0

    23 0x00007f369146140d in ?? () from /usr/lib/libgobject-2.0.so.0

    24 0x00007f3691469219 in g_signal_emit_valist ()

    from /usr/lib/libgobject-2.0.so.0

    25 0x00007f3691469462 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0

    26 0x00007f36930a3f2b in ?? () from /usr/lib/libgtk-x11-2.0.so.0

    27 0x00007f3691450458 in g_closure_invoke ()

    from /usr/lib/libgobject-2.0.so.0

    28 0x00007f369146140d in ?? () from /usr/lib/libgobject-2.0.so.0

    29 0x00007f3691468e52 in g_signal_emit_valist ()

    from /usr/lib/libgobject-2.0.so.0

    30 0x00007f3691469462 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0

    31 0x00007f3692ec7085 in gtk_accel_group_activate ()

    from /usr/lib/libgtk-x11-2.0.so.0

    32 0x00007f3692ec83cd in gtk_accel_groups_activate ()

    from /usr/lib/libgtk-x11-2.0.so.0

    33 0x00007f36930bc666 in gtk_window_activate_key ()

    from /usr/lib/libgtk-x11-2.0.so.0

    34 0x00007f36930bc6f9 in ?? () from /usr/lib/libgtk-x11-2.0.so.0

    35 0x00007f3692f8d229 in ?? () from /usr/lib/libgtk-x11-2.0.so.0

    36 0x00007f3691450458 in g_closure_invoke ()

    from /usr/lib/libgobject-2.0.so.0

    37 0x00007f36914611cb in ?? () from /usr/lib/libgobject-2.0.so.0

    38 0x00007f3691468e52 in g_signal_emit_valist ()

    from /usr/lib/libgobject-2.0.so.0

    39 0x00007f3691469462 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0

    40 0x00007f36930a53ee in ?? () from /usr/lib/libgtk-x11-2.0.so.0

    41 0x00007f3692f8b667 in gtk_propagate_event ()

    from /usr/lib/libgtk-x11-2.0.so.0

    42 0x00007f3692f8b8fb in gtk_main_do_event ()

    from /usr/lib/libgtk-x11-2.0.so.0

    43 0x00007f3692bfc53c in ?? () from /usr/lib/libgdk-x11-2.0.so.0

    44 0x00007f3691187f06 in g_main_context_dispatch ()

    from /usr/lib/libglib-2.0.so.0

    45 0x00007f3691188258 in ?? () from /usr/lib/libglib-2.0.so.0

    46 0x00007f369118865a in g_main_loop_run () from /usr/lib/libglib-2.0.so.0

    ---Type <return> to continue, or q <return> to quit---

    47 0x00007f3692f8a8f7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0

    48 0x000000000040c56a in main ()

    Last edit: j3doucet 2013-05-21
  • Denis Auroux
    Denis Auroux

    Thanks! The crash occurs the cairo rendering library when the page is
    done drawing, when gtkprint asks cairo to finalize the output so it can
    be sent to the printer (or to file if you are printing to a file). It is
    in principle possible that xournal is requesting to print something
    unreasonable that would cause the crash, but most likely the issue is in
    either gtk or cairo, or in poppler (since the drawing requests
    corresponding to the PDF background are made directly by the poppler
    library to gtk-print and cairo, without passing through xournal).

    The fact that other files print fine without crashing encourages me to
    hope that there's nothing wrong with xournal and this will fix itself
    once the various libraries evolve... if you wanted to be sure, you'd try
    to downgrade cairo or poppler to older versions to see if the problem
    disappears; or same with gtk but it has more dependencies so it's harder
    to downgrade.

    In any case let's keep this bug open for now and hope that things will
    get clarified one way or another.