After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 320476 - segmentation fault if you want to get file information without initialized GnomeVFSFileInfo
segmentation fault if you want to get file information without initialized Gn...
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: File operations
cvs (head)
Other Linux
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2005-11-02 09:11 UTC by Thomas Wabner
Modified: 2005-11-08 11:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
added g_return_if_fail method for the given info field (800 bytes, patch)
2005-11-02 09:12 UTC, Thomas Wabner
none Details | Review

Description Thomas Wabner 2005-11-02 09:11:20 UTC
Distribution/Version: gentoo

If you want to use the function gnome_vfs_get_file_info_uri() you have to
provide the uri and the GnomeVFSFileInfo. If you forget to initialize the
GnomeVFSFileInfo field with the method gnome_vfs_file_info_new () you got an
segmentation fault.

To avoid this, I have created a patch against gnome-vfs-cancellable-ops.c file
where I have added a g_return_val_if_fail call to inform the developer (and
user) that something is wrong but no more segmentation fault. In this way we
don't need to update the documentation but it would be fine to add an hint that
the developer has to initialize the GnomeVFSFileInfo field.
Comment 1 Thomas Wabner 2005-11-02 09:12:06 UTC
Created attachment 54213 [details] [review]
added g_return_if_fail method for the given info field
Comment 2 Alexander Larsson 2005-11-08 11:22:57 UTC
Commited. Thanks.