GVolumeMonitor takes down GVolumes with it
@mterry
Submitted by Michael Terry Link to original bug (#619892)
Description
Created attachment 162160 Test program
I had a nasty bug [1] 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:
gcc pkg-config gio-2.0 --libs --cflags
test.c -o test
[1] https://bugs.launchpad.net/deja-dup/+bug/569418
Attachment 162160, "Test program":
test.c
Version: 2.25.x