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 349334 - Calling close() from Gnome::Vfs::DirectoryHandle causes segfault
Calling close() from Gnome::Vfs::DirectoryHandle causes segfault
Status: RESOLVED FIXED
Product: gnome-vfsmm
Classification: Deprecated
Component: general
git master
Other All
: Normal critical
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2006-07-30 18:47 UTC by sosuiming
Modified: 2011-01-16 23:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
source codes and makefile (256.20 KB, application/x-compressed-tar)
2006-08-02 03:26 UTC, sosuiming
Details

Description sosuiming 2006-07-30 18:47:27 UTC
Steps to reproduce:
1. Gnome::Vfs::DirectoryHandle dir_handle = Gnome::Vfs::DirectoryHandle::DirectoryHandle();
2. dir_handle.open(uri);
3. dir_handle.close();


Stack trace:


Other information:
Comment 1 Murray Cumming 2006-07-31 20:12:33 UTC
Could we have an actual compileable test case please? You might be able to modify an example, for instance.

Also, valgrind's memcheck might give interesting clues.
Comment 2 sosuiming 2006-08-02 03:26:25 UTC
Created attachment 70052 [details]
source codes and makefile
Comment 3 sosuiming 2006-08-02 03:28:52 UTC
Attached here are the sources and makefile.
Compilation is OK but the program segfaults whenever the following runs:

dir_handle.close();
(N.B. dir_handle is an instance of Gnome::Vfs::DirectoryHandle)

Commenting out the statement seems to avoid the problem.



Matthias Kaeppler <nospam digitalraid com> encountered the same problem as me:
http://www.mail-archive.com/gnomemm-list@gnome.org/msg00048.html
Comment 4 Murray Cumming 2006-08-02 06:19:45 UTC
Thanks. I'll try to investigate this in the next few days.
Comment 5 Murray Cumming 2006-08-02 06:21:11 UTC
By the way, I usually prefer test cases to be as small as possible while also demonstrating the problem, but I should be able to manage with this.
Comment 6 Murray Cumming 2006-10-19 17:00:57 UTC
I have changed the close() function to set gobj_ to 0 so that it is not used later in the destructor. I believe that fixes this. Please reopen if I'm wrong.