Re: [Utopia] Gnome-VFS backend crashing file chooser dialog
- From: Sjoerd Simons <sjoerd luon net>
- To: utopia-list gnome org
- Subject: Re: [Utopia] Gnome-VFS backend crashing file chooser dialog
- Date: Thu, 17 Jun 2004 22:08:55 +0200
On Thu, Jun 17, 2004 at 12:46:56PM +0200, David Zeuthen wrote:
> On Wed, Jun 16, 2004 at 04:47:21PM -0400, John (J5) Palmieri wrote:
> > I was wondering if anyone else is seeing this. Using the latest patch
> > from Dave it seems that clicking on any of the volumes in the shortcut
> > window of the file chooser causes a crash. This has been seen by others
> > who use my patch packages. I have been trying to track it down at I
> > know the crash happens at a strcmp in shorcut_find_position where
> > base_path is NULL. This is because the volume data that was populated
> > into the shortcut's list model became invalid at some point. I tracked
> > it down to the fstab and the mtab lists of the vfs daemon somehow
> > trashing its own data. Beyond that I can't figure out where the
> > trashing is actually happening. Below is a backtrace of the symptom
> > with the last unknown symbol being the strcmp. Hopefully someone can
> > add some insight.
> >
>
> Hi,
>
> I'm out travelling right now, back saturday, but I'll have a look at
> it when I get back. Unless you beat me to it, that is :-)
Beat you :).. Well actually i was intrested in the whole gtk filechooser -> vfs
-> hal link worked and the bug provided a nice challenge to dive into the code
(apart from annoying me)
The problem was that the hal patch filters some standard unix filesystems mount
points and doesn't report them to the vfs. Now the gnome-vfs filechooser
backend wants the volume for / (which is filtered) and assumes there is one.
The fact that there isn't leads to a strcmp with a NULL arguments eventually.
Imho filtering out some paths isn't the right sollution, the user_visible flag
is ment for this.. So i've removed the filtering and let the user_visible flag
of drives depends on the hal removable flag. David put a comment somewhere that
the storage flag is unreliable, but it seems to work fine here...
Attached patch is to be applied on a gnomevfs patched with davids patch.
Unfortunately the current hal in debian (need to check cvs) doesn't always
recognize which volumes are mounted, which leads to the same problem.
Sjoerd
--
Live never to be ashamed if anything you do or say is
published around the world -- even if what is published is not true.
-- Messiah's Handbook : Reminders for the Advanced Soul
diff -Naur gnome-vfs2-2.6.1.1/libgnomevfs/gnome-vfs-hal-mounts.c gnome-vfs2-2.6.1.1.patched/libgnomevfs/gnome-vfs-hal-mounts.c
--- gnome-vfs2-2.6.1.1/libgnomevfs/gnome-vfs-hal-mounts.c 2004-06-17 21:28:31.000000000 +0200
+++ gnome-vfs2-2.6.1.1.patched/libgnomevfs/gnome-vfs-hal-mounts.c 2004-06-17 21:30:17.000000000 +0200
@@ -617,18 +617,6 @@
GnomeVFSHalVolume *hal_vol, /* may be NULL */
char *mount_point)
{
- /* Skip standard UNIX-like mount points */
- if (strcmp (mount_point, "/var") == 0 ||
- strcmp (mount_point, "/usr") == 0 ||
- strcmp (mount_point, "/bin") == 0 ||
- strcmp (mount_point, "/sbin") == 0 ||
- strcmp (mount_point, "/boot") == 0 ||
- strcmp (mount_point, "/tmp") == 0 ||
- strcmp (mount_point, "/opt") == 0 ||
- strcmp (mount_point, "/home") == 0 ||
- strcmp (mount_point, "/") == 0)
- return TRUE;
-
/* Skip volumes where HAL couldn't figure out the filesystem type */
if (hal_vol != NULL) {
/* but allow blank discs */
@@ -662,7 +650,6 @@
char *name = NULL;
char *icon = NULL;
GnomeVFSDeviceType device_type = GNOME_VFS_DEVICE_TYPE_HARDDRIVE;
- gboolean computer_visible = TRUE;
struct fstab *fst;
char *mount_point = NULL;
@@ -713,7 +700,7 @@
drive->priv->device_type = device_type;
drive->priv->icon = g_strdup (icon);
drive->priv->display_name = _gnome_vfs_volume_monitor_uniquify_drive_name (volume_monitor, name);
- drive->priv->is_user_visible = computer_visible;
+ drive->priv->is_user_visible = hal_drive->is_removable;
drive->priv->volume = NULL;
drive->priv->hal_udi = g_strdup (udi);
@@ -749,8 +736,7 @@
char *name = NULL;
char *icon = NULL;
GnomeVFSDeviceType device_type = GNOME_VFS_DEVICE_TYPE_HARDDRIVE;
- gboolean computer_visible = TRUE;
- gboolean desktop_visible = FALSE;
+ gboolean desktop_visible = FALSE;
struct fstab *fst;
char *mount_point = NULL;
gboolean is_blank_disc = FALSE;
@@ -875,7 +861,7 @@
drive->priv->device_type = device_type;
drive->priv->icon = g_strdup (icon);
drive->priv->display_name = _gnome_vfs_volume_monitor_uniquify_drive_name (volume_monitor, name);
- drive->priv->is_user_visible = computer_visible;
+ drive->priv->is_user_visible = hal_drive->is_removable;
drive->priv->volume = NULL;
drive->priv->hal_udi = g_strdup (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]