! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
crash in bulk renamer on repeated rename


Description alexxcons editbugs 2020-05-11 00:10:09 CEST
Repeated rename via bulk renamer only works when it is launched via console:
gdb --args /thunar/.libs/thunar -B

In order to trigger the crash, add two files to the bulk renamer and rename then. Than rename then again.
The way of renaming (numbering, date, etc.) does not matter. 

I can reproduce the bug on master, and on 1.8.0, so it is not related to recent commits. 

I got the following Error/Backtrace :

thunar:ERROR:thunar-renamer-progress.c:262:thunar_renamer_progress_next_idle: assertion failed: (g_list_length (renamer_progress->pairs_done) == renamer_progress->n_pairs_done)
Bail out! thunar:ERROR:thunar-renamer-progress.c:262:thunar_renamer_progress_next_idle: assertion failed: (g_list_length (renamer_progress->pairs_done) == renamer_progress->n_pairs_done)

Thread 1 "thunar" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff696355b in __GI_abort () at abort.c:79
#2  0x00007ffff6b40de3 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff6b9c77b in g_assertion_message_expr () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00005555555df748 in thunar_renamer_progress_next_idle (user_data=<optimized out>) at thunar-renamer-progress.c:262
#5  0x00007ffff6b744de in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ffff6b74890 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff6b74b63 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00005555555dfb81 in thunar_renamer_progress_run (renamer_progress=0x555555f3f9c0, pairs=0x5555558da240 = {...}) at thunar-renamer-progress.c:376
#9  0x00005555555dc452 in thunar_renamer_dialog_response (dialog=0x55555592a300, response=<optimized out>) at thunar-renamer-dialog.c:804
#10 0x00007ffff6c6118e in g_cclosure_marshal_VOID__BOOLEANv () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff6c5f206 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff6c7d8d4 in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
.... I dumped the reimaining backtrace ...  only alot of internal g_signal stuff and the main / g_application_run
Comment 1 Dmitry Ovcharov 2020-05-11 16:47:38 CEST
May i will fixed this bug?
Comment 2 alexxcons editbugs 2020-05-11 19:29:49 CEST
(In reply to Dmitry Ovcharov from comment #1)
> May i will fixed this bug?

Please go for it, if you can.  Patches are welcome !
Comment 3 Dmitry Ovcharov 2020-05-11 20:07:17 CEST
I can't reproduce this bug neither thunar built from xfce-4.14 branch nor Thunar 1.8.9 (Xfce 4.14) from my distro(Mint XFCE).
Comment 4 alexxcons editbugs 2020-05-11 20:14:43 CEST
Hmm, strange, I can reliably reproduce it.  Suficcient if I create a file "1" in the home folder.

Note that you need to launch the bulk renamer with "thunar -B" to reproduce, and make sure there is no running thunar instance left:
thunar -q;thunar/.libs/thunar -B
Comment 5 Theo Linkspfeifer editbugs 2020-05-11 20:46:53 CEST
I tried to reproduce this crash, but no success.

Thunar 1.8.14
GLib 2.64.2
Comment 6 Dmitry Ovcharov 2020-05-12 09:03:30 CEST
Sure,  i ran it from command line with -B option, according the repro steps. I is looks like it environment depended issue.
Comment 7 Dmitry Ovcharov 2020-05-12 09:07:10 CEST
> and make sure there is no running thunar instance left:
> thunar -q;thunar/.libs/thunar -B

I will try reproduce bug today with "-q" before running   with files in home directory.
Comment 8 Theo Linkspfeifer editbugs 2020-05-12 09:55:24 CEST
Created attachment 9857 

My bad. The version installed by the distribution does not include assertion code lines, so it will not crash.
Comment 9 Git Bot editbugs 2020-05-12 15:22:13 CEST
Theo Linkspfeifer referenced this bugreport in commit 5faa5ef29b74ce7c8b96be49f6930f3705717645

Fix crash in bulk renamer on repeated rename (Bug #16824)

Comment 10 Git Bot editbugs 2020-05-12 15:23:20 CEST
Theo Linkspfeifer referenced this bugreport in commit efa3b55d968ab18235d1160e25b4ebd2d2fcf18b

Fix crash in bulk renamer on repeated rename (Bug #16824)

Comment 11 alexxcons editbugs 2020-05-12 15:32:42 CEST
(In reply to Theo Linkspfeifer from comment #8)
> Created attachment 9857 
> patch

Thanks alot for the fix Theo, works fine now for me !

Pushed to 4.14 and master, to be released in thunar 1.8.15 and 1.9.0 

@Dmitry Ovcharov
As well thanks for taking a try on it !  .. next time best pick some bug, and dont let Theo know about it :P

Bug #16824

Reported by:
Reported on: 2020-05-11
Last modified on: 2020-05-12


Xfce Bug Triage
CC List:
2 users



patch (925 bytes, patch)
2020-05-12 09:55 CEST , Theo Linkspfeifer
no flags

Additional information