Bug 207121 - libgnome-vfs triggers DBus assertion failures using a NULL connection
libgnome-vfs triggers DBus assertion failures using a NULL connection
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gnome-vfs2 (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alexander Larsson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-19 11:17 EDT by Daniel Berrange
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-19 13:55:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2006-09-19 11:17:44 EDT
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 13:55:14 EDT
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.