GNOME Bugzilla – Bug 404708
eog crashed with SIGSEGV in g_closure_invoke()
Last modified: 2007-02-09 14:16:18 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
+ Trace 108249
The corresponding line from the source code "if (window->priv->print_settings != NULL)", "window->priv = 0x0" from gdb
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.
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).
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.
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.
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!