GNOME Bugzilla – Bug 144906
Nautilus crashes when host name is not given for ftp method in Solaris
Last modified: 2004-12-22 21:47:04 UTC
Nautilus is crashing in when Host name is not given in the URL of the ftp method. Steps to simulate: a) Launch nautilus and open a directory in browser mode. b) type "ftp://naren:naren123" in the location bar and enter. Nautilus crashes. The crash does not happen in Linux. But in Linux, a dialog is given which says "Nautilus cannot display "ftp:". Please select another viewer and try again.". Also a commandline warning is given which says: (nautilus:9277): gnome-vfs-modules-WARNING **: gnome_vfs_inet_connection_create ("(null)", 0) = "Invalid parameters" I feel error dialog should say something like "no host specified..." which is the case with "sftp".
The changes made by Alex on 24th June returns GNOME_VFS_ERROR_INVALID_HOST. So, the error message is taken care. Once gnome-vfs returns this code, nautilus has to convert this error code into human readeable format and show a dialog. At that time, nautilus just assumes that host_name is allocated and tries to use that in the error message, leading to another crash in nautilus code in Solaris. I will attach a patch soon.
Created attachment 29006 [details] [review] proposed patch to fix the crash.
You should send a mail to the nautilus mailing list (http://mail.gnome.org/mailman/listinfo/nautilus-list) to get your patch reviewed.
host_name needs to be const char * or the build fails. (Didn't it use -Werror when you built?) I commited the patch with that fix.
Alex, Yes, I had -Werror in the flags when I built it. Thanks for that.