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 404708 - eog crashed with SIGSEGV in g_closure_invoke()
eog crashed with SIGSEGV in g_closure_invoke()
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
2.17.x
Other Linux
: Normal critical
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-05 19:02 UTC by Sebastien Bacher
Modified: 2007-02-09 14:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Sebastien Bacher 2007-02-05 19:02:52 UTC
That bug has been opened on https://launchpad.net/ubuntu/+source/eog/+bug/83437

"Binary package hint: eog

Tried to print a document
...
Package: eog 2.17.90-0ubuntu2
...
(gdb) bt
  • #0 verb_Print_cb
    at eog-window.c line 592
  • #1 IA__g_closure_invoke
    at gclosure.c line 490
  • #2 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #3 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #4 IA__g_signal_emit
    at gsignal.c line 2243
  • #5 _gtk_action_emit_activate
    at gtkaction.c line 835
  • #6 IA__g_closure_invoke
    at gclosure.c line 490
  • #7 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #8 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #9 IA__g_signal_emit
    at gsignal.c line 2243
  • #10 IA__gtk_widget_activate
    at gtkwidget.c line 3946

The corresponding line from the source code "if (window->priv->print_settings != NULL)", "window->priv = 0x0" from gdb
Comment 1 Felix Riemann 2007-02-08 11:26:04 UTC
Confirming.

This happens if you try to close the window while we are not finished printing.

The window object gets destroyed (and withit its private members) although we still need it.

I am not sure if locking the UI while printing is sufficient.
We should also try to give some feedback on what is happening.
Comment 2 Claudio Saavedra 2007-02-09 04:01:18 UTC
It's strange. The printing dialog is not supposed to return until the printing is done, so it's unlikely that we are able to close the main window before we finish printing.

Can you still reproduce this crash? I did a small commit (Rev.3535) to initialize and finish properly the printing related objects in the EogWindow class, which was missing (although I don't think it's related to the crash as you describe it).
Comment 3 Felix Riemann 2007-02-09 13:19:05 UTC
Yes, it is still reproducable and yes you are right the dialog only returns after finishing printing.  But apparently the gtk main loop takes over directly after that and destroys the window.

But I think I might have a fix for that.
Comment 4 Felix Riemann 2007-02-09 13:47:37 UTC
Okay, I just committed my fix (rev. 3539 + 3540). It simply refs the window before printing and unrefs it afterwards. This postpones the finalization until we don't require it in our printing function.

As this can make EOG look like it's hanging we should nevertheless give some feedback on whats going on.
Comment 5 Claudio Saavedra 2007-02-09 14:16:18 UTC
Great! I thought something like that would make it, but was unable to reproduce the crash :-/

We shall open a new bug regarding the UI blocking which printing produces. Thanks Felix!