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 696553 - Crash in avahi_create_browsers
Crash in avahi_create_browsers
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-03-25 12:10 UTC by Carlos Garcia Campos
Modified: 2013-03-25 14:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (5.01 KB, patch)
2013-03-25 12:10 UTC, Carlos Garcia Campos
none Details | Review
Updated patch (7.29 KB, patch)
2013-03-25 13:26 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2013-03-25 12:10:39 UTC
Created attachment 239754 [details] [review]
Patch

In avahi_request_printer_list() a new connection to the DBus system bus is started synchrounously, but it's not cancellable and it's not taking any reference of the GtkPrintBackendCups. This means that when the callback is called, the object might have been destroyed already.

(lt-WebKitWebProcess:9813): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkPrintBackendCups'

  • #0 g_simple_async_result_set_check_cancellable
    at gsimpleasyncresult.c line 1101
  • #1 g_dbus_connection_call_internal
    at gdbusconnection.c line 5404
  • #2 g_dbus_connection_call
    at gdbusconnection.c line 5694
  • #3 avahi_create_browsers
    at gtkprintbackendcups.c line 2899
  • #4 g_simple_async_result_complete
    at gsimpleasyncresult.c line 777
  • #5 complete_in_idle_cb
    at gsimpleasyncresult.c line 789
  • #6 g_idle_dispatch
    at gmain.c line 5205
  • #7 g_main_dispatch
    at gmain.c line 3054
  • #8 g_main_context_dispatch
    at gmain.c line 3630
  • #9 g_main_context_iterate
    at gmain.c line 3701
  • #10 g_main_loop_run
    at gmain.c line 3895
  • #11 WebCore::RunLoop::run()
    from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.22
  • #12 WebProcessMainGtk
    from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.22
  • #13 main

Comment 1 Marek Kašík 2013-03-25 13:11:23 UTC
The patch looks good. I'll wait for the actualized version you've told me about.
Comment 2 Carlos Garcia Campos 2013-03-25 13:26:28 UTC
Created attachment 239763 [details] [review]
Updated patch

Fixed other callbacks that might be called after the cup backend has been destroyed.
Comment 3 Marek Kašík 2013-03-25 13:50:54 UTC
Review of attachment 239763 [details] [review]:

Thank you very much for catching also this problem. The patch looks good.
Could I ask you a favor? Could you change the g_debug() there to g_warning()? I intended to use g_warning() but somehow used g_debug().
Comment 4 Carlos Garcia Campos 2013-03-25 13:52:40 UTC
(In reply to comment #3)
> Review of attachment 239763 [details] [review]:
> 
> Thank you very much for catching also this problem. The patch looks good.
> Could I ask you a favor? Could you change the g_debug() there to g_warning()? I
> intended to use g_warning() but somehow used g_debug().

Sure!
Comment 5 Marek Kašík 2013-03-25 13:54:45 UTC
Thank you :)
Comment 6 Carlos Garcia Campos 2013-03-25 14:00:02 UTC
Comment on attachment 239763 [details] [review]
Updated patch

Pushed to both branches.