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 771129 - batch rename: segfaults when overwrite mode is enabled
batch rename: segfaults when overwrite mode is enabled
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
3.21.x
Other Linux
: Normal major
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 771109 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-09-09 17:19 UTC by Mohammed Sadiq
Modified: 2016-09-20 14:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
batch-rename-dialog: don't multi-thread NautilusDirectory calls (2.95 KB, patch)
2016-09-20 14:43 UTC, Carlos Soriano
committed Details | Review

Description Mohammed Sadiq 2016-09-09 17:19:35 UTC
Nautilus segfaults when overwrite mode is enabled on batch rename

How to reproduce:
1. Select any two files -> rename
2. Now enable overwrite (insert key) and type some text before [Original File Name]

Nautilus now segfaults, which it shouldn't.
Comment 1 Alexandru Pandelea 2016-09-14 08:47:20 UTC
This is fixed by the patch in Bug 771069
Comment 2 Mohammed Sadiq 2016-09-15 01:05:11 UTC
This bug is still present in master.

reopening
Comment 3 Alexandru Pandelea 2016-09-15 07:00:24 UTC
(In reply to Mohammed Sadiq from comment #2)
> This bug is still present in master.
> 
> reopening

Are you sure you have your master branch updated? because I can't reproduce this anymore
Comment 4 Mohammed Sadiq 2016-09-15 07:16:36 UTC
Here is how I reproduced the bug:

1. Create several files:
   touch {0000..9999}
2. Select any two files -> Right click -> rename.
3. Place the cursor at beginning (before [Original...]).
4. Enable overwrite -> type something.

Nautilus segfaults
Comment 5 Carlos Soriano 2016-09-16 07:38:37 UTC
*** Bug 771109 has been marked as a duplicate of this bug. ***
Comment 6 Carlos Soriano 2016-09-20 14:43:18 UTC
Created attachment 335937 [details] [review]
batch-rename-dialog: don't multi-thread NautilusDirectory calls

Even if late... I just realized neither NautilusDirectory or
NautilusFile are thread safe.

We were using them from two different threads for checking conflicts,
and that was crashing when the internal hash table was modified and
accessed from the different threads.

The ideal fix would be to make NautilusDirectory and NautilusFile thread
safe, but that's a big work. So for now, call the main thread for using
them.
Comment 7 Carlos Soriano 2016-09-20 14:46:25 UTC
Attachment 335937 [details] pushed as 32fc66d - batch-rename-dialog: don't multi-thread NautilusDirectory calls