Bug 207121 - libgnome-vfs triggers DBus assertion failures using a NULL connection
Summary: libgnome-vfs triggers DBus assertion failures using a NULL connection
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-vfs2
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-19 15:17 UTC by Daniel Berrangé
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-09-19 17:55:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2006-09-19 15:17:44 UTC
Description of problem:
If an application displays a GTK FileChooserDialog dialog when there is no DBus
daemon available it ends up trying to use a NULL DBus connection violating DBus
assertions. Fortunately our DBus builds have assertion checking enabled, if this
were turned off the app would likely trigger SEGV deferencing a null pointer.

(vfsdbus.py:3756): libgnomevfs-WARNING **: Failed to open session DBUS
connection: Unable to determine the address of the message bus (try 'man
dbus-launch' and 'man dbus-daemon' for help)
Volume monitoring will not work.
3756: arguments to dbus_connection_send_with_reply_and_block() were incorrect,
assertion "connection != NULL" failed in file dbus-connection.c line 2785.
This is normally a bug in some application using the D-Bus library.
3756: arguments to dbus_connection_send_with_reply_and_block() were incorrect,
assertion "connection != NULL" failed in file dbus-connection.c line 2785.
This is normally a bug in some application using the D-Bus library.



This can be reproduced with the following PyGTK code:

$ cat > vfsdemo.py <<EOF
#!/usr/bin/python

import gtk

fcdialog = gtk.FileChooserDialog("VFS demo",
                                 None,
                                 gtk.FILE_CHOOSER_ACTION_OPEN,
                                 (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
                                  gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT),
                                 None)
response = fcdialog.run()
EOF
$ DBUS_SESSION_BUS_ADDRESS= python vfsdbus.py 



Version-Release number of selected component (if applicable):
libgnome-2.16.0-2.fc6
gnome-vfs2-2.16.0-1.fc6
dbus-0.92-1.fc6


How reproducible:
Always

Steps to Reproduce:
1. Unset the DBUS_SESSION_BUS_ADDRESS variable
2. Run an application which displays a FileChooserDialog
3. Watch console
  
Actual results:
DBUs assertion failures displayed

Expected results:
No error / failure messages shown.

At least the assertion failures need to be cleaned up, but I think it could be
desirable to hide this first raw DBus message from view too:

(vfsdbus.py:3756): libgnomevfs-WARNING **: Failed to open session DBUS
connection: Unable to determine the address of the message bus (try 'man
dbus-launch' and 'man dbus-daemon' for help)

It makes it look like a nasty application error (resulting in bogus application
bug reports), when in fact its perfectly legitimate to use GTK without DBus
present (eg, ssh'd to a box as root & running a GUI app). A simple 'DBus session
daemon not available, disabling volume monitoring' would be sufficient & much
less scary to the user than this.

Comment 1 Matthias Clasen 2006-09-19 17:55:14 UTC
This will be fixed in 2.16.0-3


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