GVolumeMonitor takes down GVolumes with it
Submitted by Michael Terry
Created attachment 162160 Test program
I had a nasty bug  appear in my program seemingly as a result of a change in GIO right before Ubuntu 10.04 was released. I worked around it, but am following up with a GIO bug here.
It seems that when the global GVolumeMonitor is unref'd (as the documentation requests), it somehow partially invalidates GVolume objects it has handed out. Specifically, the GVolume objects it gave out no longer give out GMount objects.
I'm not being very clear. But the attached test program should be more obvious.
The test program searches for a GVolume from the Monitor. Then it asks that GVolume for a GMount. As expected, it works at first. But then, if the GVolumeMonitor is unref'd, the GVolume no longer gives out a GMount object. That is not something I would expect, and I assume it's a bug.
Compile the attached program like so:
pkg-config gio-2.0 --libs --cflags test.c -o test
Attachment 162160, "Test program":