Ejecter crashes due to missing gvfs hal volume monitor.

Bug #424256 reported by Devid Antonio Filoni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ejecter
Fix Released
Critical
Federico Pelloni
ejecter (Ubuntu)
Fix Released
High
Unassigned
gvfs (Ubuntu)
Invalid
Low
Unassigned
vala (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: ejecter

gvfs hal volume monitor is not available in Ubuntu Karmic and Ejecter crashes on startup because get_identifier (http://references.valadoc.org/gio-2.0/GLib.Volume.get_identifier.html) returns NULL when calling it with G_VOLUME_IDENTIFIER_KIND_HAL_UDI and AFAIK there are not other ways to obtain the UDI using vala.

From http://library.gnome.org/devel/gio/stable/GVolume.html :
Note that G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available when the gvfs hal volume monitor is in use. Other volume monitors will generally be able to provide the G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE identifier, which can be used to obtain a hal device by means of libhal_manger_find_device_string_match().

Vala does not provide find_device_string_match () function, this is why I think there is not another way to find the UDI (needed to call several functions).

Related branches

Changed in ejecter (Ubuntu):
importance: Undecided → High
Changed in gvfs (Ubuntu):
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue is not a gvfs one

Changed in gvfs (Ubuntu):
status: New → Invalid
Revision history for this message
A. Walton (awalton) wrote :

Really don't think it's a Vala bug either. The problem is 'ejecter' needs to be ported to DeviceKit-Disks and stop using HAL altogether.

Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

I'm trying to fix this, if I won't be able to do it, I will ask to remove ejecter package from Ubuntu.

Changed in ejecter (Ubuntu):
status: New → In Progress
Revision history for this message
Federico Pelloni (fredp) wrote :

I'm sorry I couldn't fix this, but it's not very straightforward.. it involves switching away from Hal to go for... !?

Here I have to move a little criticism (to whom I don't really know anyway).
What the hell should we use to manage devices? What's going on with Gio, Hal, devicekit-disks, gudev, this and that?!
We abandoned Hal because it was unmaintainable, but what we have then?
I didn't find a single page explaining in a few words on what to switch and how to do that. And if it isn't possible to do this without messing with many different pieces of software, well, that's just not good.
devicekit-disks is not installed by default on Jaunty, and Hal is not available any more in Karmic. This doesn't help occasional developers as I am.

For me it's really hard to understand what are the differences between Gio and devicekit-disks, and which one to use.

Besides, I'm a bit tired of developing. And one-thousand different, incompatible versions of Vala and bindings do not help. I'm sorry.

Anyway, if somebody is willing to work on Ejecter I would be very glad to let him join the Ejecter project here on Launchpad.

Revision history for this message
Federico Pelloni (fredp) wrote :

Today I upgraded to Karmic and I'm trying to work on this.. But I'm having serious trouble, it doesn't compile because of missing Dbus headers. Vala's fault as usual?

Changed in ejecter:
assignee: nobody → Federico Pelloni (fredp)
importance: Undecided → Wishlist
status: New → In Progress
importance: Wishlist → Critical
Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

@Federico: I think you can easily fix this using C code. Just call libhal_manger_find_device_string_match in order to get the udi of the device.

Revision history for this message
Federico Pelloni (fredp) wrote :

Actually I'm trying to port it to DeviceKit-disks, but I'm facing some problem recognizing whether a device is removable, it always tell me the drive is internal.
I created a new branch to work on this ( https://code.launchpad.net/~fredp/ejecter/karmic ) - leaving out any backwards-compatibility, so it probably compiles and runs only on Karmic.

Revision history for this message
Lucazade (lucazade) wrote :

I'm trying the new brach on Karmic and seems to work ok.
I get some warning when launched:
** (ejecter:4286): CRITICAL **: dbus_g_proxy_call: assertion `DBUS_IS_G_PROXY (proxy)' failed

Revision history for this message
Federico Pelloni (fredp) wrote :

I get them too, but I could not understand what causes them.
I would like to avoid using Dbus/Hal/DeviceKit at all, I'm investigating this in karmic-hal branch but with Gio methods I can't determine well if the device is internal. If somebody that knows something about Gio could help me it'd be great.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

The critical message is because you're passing an invalid DBusGProxy to dbus_g_proxy_call.

If you want to do disk management stuff outside of the capabilities of GIO, then the library you want really is GDU

Revision history for this message
Federico Pelloni (fredp) wrote :

I'm using Vala, so I don't directly pass a DBusGProxy - I think Vala handles this, then I can't fix that warning.
Also, GDU still hasn't Vala bindings and I can't generate the .vapi file (following the tutorial over at live.gnome.org/Vala) because the include file requires to define GDU_API_IS_SUBJECT_TO_CHANGE before including it, and I don't know how to tell vala-gen-introspect to do that.
I'm a bit stuck.

Revision history for this message
Federico Pelloni (fredp) wrote :

Ok, sorry for the close reply - I managed to create the .vapi file modifying the headers. Things needed for that are here: https://code.launchpad.net/~fredp/+junk/libgdu-vala
Now I'll try to get something from this.

Revision history for this message
Federico Pelloni (fredp) wrote :

Committed working version in "karmic-gdu" branch (https://code.launchpad.net/~fredp/ejecter/karmic-gdu), now it's using gnome-disk-utility to know device type. Depends on: libgdu, libgdu-dev. Does not depend (at least directly) anymore on: hal, dbus.
Please let me know if it's working for you too.

Changed in ejecter:
status: In Progress → Fix Committed
Revision history for this message
Lucazade (lucazade) wrote :

It works ok.. no warnings at all :)
thanks Federico!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ejecter - 0.2.1+karmic-gdu-bzr68-0ubuntu1

---------------
ejecter (0.2.1+karmic-gdu-bzr68-0ubuntu1) karmic; urgency=low

  * New upstream bzr revision 68 from karmic-gdu branch (LP: #427312, #424256,
    #403143).
  * Drop quilt support.
  * debian/control: remove libhal-dev from Build-Depends field.
  * debian/control: add libgdu-dev to Build-Depends field.
  * Remove debian/patches/fix_vala_compatibility.diff patch, merged upstream.
  * Bump Standards-Version to 3.8.3.

 -- Devid Antonio Filoni <email address hidden> Sun, 27 Sep 2009 13:34:45 +0200

Changed in ejecter (Ubuntu):
status: In Progress → Fix Released
Federico Pelloni (fredp)
Changed in ejecter:
status: Fix Committed → Fix Released
Changed in vala (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.