Launchpad has imported 10 comments from the remote bug at
https://bugzilla.xfce.org/show_bug.cgi?id=12264.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2015-10-15T15:18:43+00:00 Hondaran wrote:

Created attachment 6482
Backtrace

Thunar randomly crashes (SIGSEGV) when renaming files.

Reproducible: Random
Steps to Reproduce:
1. Start up Thunar.
2. Go to some directory with single file.
3. Rename that file
4. Change the filename and press enter.
5. Not crashed? Try step 3 again.

Crashes even for single file in whole folder. It is strange that if you
run it with gdb then the crash is not so often.

gdb backtrace attached - it is strange that the
thunar_file_compare_by_name() function is called even for only one file
in working directory - both file_a->collate_key_nocase and
file_b->collate_key_nocase are NULL. I noticed that sometimes this
function is not called, but when it is (it is random), then it crashes.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1512120/comments/0

------------------------------------------------------------------------
On 2015-10-15T17:26:11+00:00 Hjudt-l wrote:

Created attachment 6483
check-thunar-file-instance-when-comparing-filenames.patch

> gdb backtrace attached - it is strange that the
> thunar_file_compare_by_name() function is called even for only one file in
> working directory - both file_a->collate_key_nocase and
> file_b->collate_key_nocase are NULL. I noticed that sometimes this function
> is not called, but when it is (it is random), then it crashes.

This is probably related to threading issues and timing-specific.
Something needs to be protected to avoid being accessed when it
shouldn't be. Likely the old file is in the process of being destroyed
while being compared with the new file or something like that.

Does the attached workaround prevent the crashes? It is not a proper fix
we can apply, but until we have a good solution it could help.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1512120/comments/1

------------------------------------------------------------------------
On 2015-10-15T19:09:13+00:00 Hondaran wrote:


(In reply to Harald Judt from comment #1)
> Created attachment 6483 [details]
> check-thunar-file-instance-when-comparing-filenames.patch
> 
> > gdb backtrace attached - it is strange that the
> > thunar_file_compare_by_name() function is called even for only one file in
> > working directory - both file_a->collate_key_nocase and
> > file_b->collate_key_nocase are NULL. I noticed that sometimes this function
> > is not called, but when it is (it is random), then it crashes.
> 
> This is probably related to threading issues and timing-specific. Something
> needs to be protected to avoid being accessed when it shouldn't be. Likely
> the old file is in the process of being destroyed while being compared with
> the new file or something like that.
> 

It can be the reason why running Thunar with gdb has about 10 times less
crashes. I also noticed that sometimes, when I rename file, there
appears second file with the same name like the first one (checked it
with "ls -l" - there is only one real file).

> Does the attached workaround prevent the crashes? It is not a proper fix we
> can apply, but until we have a good solution it could help.

Well, this workaround does not help. The problem is that THUNAR_IS_FILE
returns true (for file_a and file_b), but pointers to collate_key are
NULL. There has to be another test if file_a->collate_key or
file_a->collate_key are NULL.

I wonder what makes my system different it crash so often.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1512120/comments/2

------------------------------------------------------------------------
On 2015-10-15T19:19:57+00:00 Hondaran wrote:

By the way, this bug could be related to
https://bugzilla.xfce.org/show_bug.cgi?id=12253 (I did not noticed it
while I was opening this bug)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1512120/comments/3

------------------------------------------------------------------------
On 2015-10-25T14:24:34+00:00 Rafael Gattringer wrote:

I would like to confirm this bug which I noticed after the upgrade from
Xubuntu 15.04 to Xubuntu 15.10. The workaround is to click the rename
button with the mouse instead of using the Enter key after setting the
new filename.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1512120/comments/4

------------------------------------------------------------------------
On 2015-10-27T18:10:00+00:00 mrsfixit wrote:

(In reply to Rafael Gattringer from comment #4)
> I would like to confirm this bug which I noticed after the upgrade from
> Xubuntu 15.04 to Xubuntu 15.10. The workaround is to click the rename button
> with the mouse instead of using the Enter key after setting the new filename.

Not for me it isn't.

I am finding that clicking the rename button is failing about 50-75% of
the time and crashing the Thunar window the same as hitting enter.

This is a real problem when trying to rename a lot of files... :-/

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1512120/comments/5

------------------------------------------------------------------------
On 2015-10-29T15:21:29+00:00 mrsfixit wrote:

This may not be a Thunar problem. This may be due to a recent upgrade to
glib2. See here, particularly comment #12:

https://bbs.archlinux.org/viewtopic.php?id=203663

And here:

https://bugs.archlinux.org/task/46666

I am running Manjaro with the XFCE GUI. My laptop and desktop both have
the same version of Manjaro, same 4.1 kernel, and the same version of
Thunar, yet the laptop isn't having the problem.

I just checked and my laptop version of glib2 is glib2-2.44.1-1- the one
the commenter said is stable. Yes, he's talking about drag and drop- but
the fact that my laptop with the earlier version of glib2 doesn't
exhibit the problem can't be a coincidence.

I don't have my desktop computer on right now- the one that IS having
the problem-  but I'll bet that when I turn it on tomorrow and check- my
version of glib2 will be the newer problematic one, glib2-2.46.0-2.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1512120/comments/6

------------------------------------------------------------------------
On 2015-10-31T20:49:11+00:00 Flo-xfce wrote:

Created attachment 6515
dont-unref-null.patch

While investigating the bug I came across a glib-critical. Attached is a
simple patch which fixes this critical, but probably not the bug itself.
Nevertheless it might be somehow related so I post it here.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1512120/comments/7

------------------------------------------------------------------------
On 2015-11-01T19:05:49+00:00 mrsfixit wrote:

Sure enough, I checked and my desktop had the problematic version of
glib2- glib2-2.46.0-2.

I installed the latest round of Manjaro updates, bringing glib2 up to
glib2-2.46.1-1.

It's still crashing.

The new version isn't stable either. The only stable version has been
glib2-2.44.1-1.

Somebody on the Manjaro forum posted this workaround:

https://tunwinnaing.wordpress.com/2015/04/01/workaround-thunar-file-
manager-crash-on-moving-files/

I didn't have the option enabled in Thunar, so I checked the box to
enable it. So far it is working.

Whether or not this will still work after a reboot I don't know, but I
was just able to do a dozen folder & file renames without Thunar
crashing.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1512120/comments/10

------------------------------------------------------------------------
On 2015-11-08T05:06:52+00:00 Dawitbro wrote:

(In reply to Harald Judt from comment #1)
> > gdb backtrace attached - it is strange that the
> > thunar_file_compare_by_name() function is called even for only one file in
> > working directory - both file_a->collate_key_nocase and
> > file_b->collate_key_nocase are NULL. I noticed that sometimes this function
> > is not called, but when it is (it is random), then it crashes.
> 
> This is probably related to threading issues and timing-specific. Something
> needs to be protected to avoid being accessed when it shouldn't be. Likely
> the old file is in the process of being destroyed while being compared with
> the new file or something like that.

I have a similar or identical backtrace to the one posted in the
original bug report.  I also cannot rename files without thunar going
away on me.

I don't know if it helps at all, but I used gdb to print some extra info
from the last stack frame reached in thunar.  I hope the Xfce team can
solve this soon, because I have to sort out some old backed-up
directories and I'm used to using thunar to do this sort of work!


(gdb) frame 1
#1  0x000055555559188d in thunar_file_compare_by_name (file_a=0x555555d3e390, 
file_b=0x555555d2dd00, case_sensitive=<optimized out>) at thunar-file.c:4027
4027        result = strcmp (file_a->collate_key, file_b->collate_key);

(gdb) info frame
Stack level 1, frame at 0x7fffffffd380:
 rip = 0x55555559188d in thunar_file_compare_by_name (thunar-file.c:4027); 
saved rip = 0x55555559fd9e
 called by frame at 0x7fffffffd3b0, caller of frame at 0x7fffffffd360
 source language c.
 Arglist at 0x7fffffffd360, args: file_a=0x555555d3e390, file_b=0x555555d2dd00, 
case_sensitive=<optimized out>
 Locals at 0x7fffffffd360, Previous frame's sp is 0x7fffffffd380
 Saved registers:
  rbx at 0x7fffffffd368, rbp at 0x7fffffffd370, rip at 0x7fffffffd378

(gdb) print *file_a
$2 = {__parent__ = {g_type_instance = {g_class = 0x55555588d4b0}, ref_count = 
3, qdata = 0x555555e1ce80}, info = 0x7fffe00124c0, kind = G_FILE_TYPE_REGULAR, 
gfile = 0x555555dfe160, content_type = 0x555555d85050 "image/jpeg", 
  icon_name = 0x0, custom_icon_name = 0x0, display_name = 0x7fffd400b7f0 
"p73.jpg", basename = 0x7fffd4011680 "p73.jpg", thumbnail_path = 0x555555e3acc0 
"/home/ad/.cache/thumbnails/normal/87903c1cff4c5d32097076c5ddf5686e.png", 
  collate_key = 0x7fffd4009070 
"S\001\030\001\t\001\001\001\002:73\001\001\001\001MSJ\001\030\030\030\001\t\t\t",
 collate_key_nocase = 0x7fffd4009070 
"S\001\030\001\t\001\001\001\002:73\001\001\001\001MSJ\001\030\030\030\001\t\t\t",
 
  flags = (THUNAR_FILE_FLAG_THUMB_MASK | THUNAR_FILE_FLAG_IS_MOUNTED)}

(gdb) print *file_b
$3 = {__parent__ = {g_type_instance = {g_class = 0x55555588d4b0}, ref_count = 
11, qdata = 0x555555dffd90}, info = 0x0, kind = G_FILE_TYPE_UNKNOWN, gfile = 
0x7fffd4010f00, content_type = 0x0, icon_name = 0x0, custom_icon_name = 0x0, 
  display_name = 0x0, basename = 0x0, thumbnail_path = 0x0, collate_key = 0x0, 
collate_key_nocase = 0x0, flags = THUNAR_FILE_FLAG_IS_MOUNTED}

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/1512120/comments/11


** Changed in: thunar
       Status: Unknown => Confirmed

** Changed in: thunar
   Importance: Unknown => High

** Bug watch added: Xfce Bugzilla #12253
   https://bugzilla.xfce.org/show_bug.cgi?id=12253

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1512120

Title:
  thunar crashes on file renaming

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunar/+bug/1512120/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to