Steps to reproduce
Set up
- mount a network volume somewhere
- In my case, mounted NAS volume to
$HOME/mnt/${nas_name} using CIFS.
- I'm not sure (I don't remember) whether I can reproduce the issue without using network volume.
- create a deep tree on the volume, and put a lot of files and/or directories into some directory.
- In my case,
$HOME/mnt/${nas_name}/1/2/3/4/5/6-many/ has 307 directory, and they have 863 subdirectories in total.
- This directory needs to be large enough for PCManFM to take some time to show the list of entries.
Reproduce
- Using PCManFM, Navigate from the shallow path to deep path.
- In other words, not going directly to
$HOME/mnt/${nas_name}/1/2/3/4/5/6-many/7/8, but first $HOME, then $HOME/mnt, then $HOME/mnt/${nas_name}, ... and after some steps, finally $HOME/mnt/${nas_name}/1/2/3/4/5/6-many/7/8.
- Spam "history backward" button of the mouse.
- If this is not enough, spam "history forward" button a lot. If this is still not enough, then spam back-and-forth between deep paths and shallow paths.
- I cannot reproduce by spamming Alt+Left and Alt+Right... maybe because my keyboard requires deep key press so the rate of keypress was not enough?
Expected behavior
Assertion not failing, and not crashing on non-debug build.
Actual behavior
Assertion fails at fm_file_info_ref and fm_file_info_unref, emitting the CRITICAL messages (assertion 'fi != NULL' failed ) on debug build, or causing immediate crash after the the log message on non-debug build.
|
FmFileInfo* fm_file_info_ref(FmFileInfo* fi) |
|
{ |
|
g_return_val_if_fail(fi != NULL, NULL); |
|
g_atomic_int_inc(&fi->n_ref); |
|
return fi; |
|
} |
|
void fm_file_info_unref(FmFileInfo* fi) |
|
{ |
|
g_return_if_fail(fi != NULL); |
|
/* g_debug("unref file info: %d", fi->n_ref); */ |
|
if (g_atomic_int_dec_and_test(&fi->n_ref)) |
|
{ |
|
fm_file_info_clear(fi); |
|
g_slice_free(FmFileInfo, fi); |
|
} |
|
} |
Logs
(The log is captured using debug build, so not crashing after CRITICAL assertion failure messages.)
Details
** (pcmanfm:68749): WARNING **: 21:30:26.174: terminal alacritty isn't known, consider report it to LibFM developers
** (pcmanfm:68749): WARNING **: 21:30:26.183: modules directory is not accessible
(pcmanfm:68749): Gtk-WARNING **: 21:30:26.208: Theme parsing error: <data>:2:27: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version
(pcmanfm:68749): Gtk-WARNING **: 21:30:26.208: Theme parsing error: <data>:3:30: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version
(pcmanfm:68749): GLib-GIO-CRITICAL **: 21:30:26.209: GFileInfo created without standard::edit-name
(pcmanfm:68749): GLib-GIO-CRITICAL **: 21:30:26.209: file ../glib-2.88.3/gio/gfileinfo.c: line 1762 (g_file_info_get_edit_name): should not be reached
(pcmanfm:68749): GLib-GIO-CRITICAL **: 21:30:26.209: GFileInfo created without standard::size
(pcmanfm:68749): GLib-GIO-CRITICAL **: 21:30:26.209: file ../glib-2.88.3/gio/gfileinfo.c: line 1865 (g_file_info_get_size): should not be reached
(pcmanfm:68749): GLib-GIO-CRITICAL **: 21:30:26.209: GFileInfo created without standard::is-symlink
(pcmanfm:68749): GLib-GIO-CRITICAL **: 21:30:26.209: file ../glib-2.88.3/gio/gfileinfo.c: line 1696 (g_file_info_get_is_symlink): should not be reached
(pcmanfm:68749): GLib-GIO-CRITICAL **: 21:30:26.209: GFileInfo created without standard::is-hidden
(pcmanfm:68749): GLib-GIO-CRITICAL **: 21:30:26.209: file ../glib-2.88.3/gio/gfileinfo.c: line 1647 (g_file_info_get_is_hidden): should not be reached
(pcmanfm:68749): GLib-GIO-CRITICAL **: 21:30:26.209: GFileInfo created without standard::is-backup
(pcmanfm:68749): GLib-GIO-CRITICAL **: 21:30:26.209: file ../glib-2.88.3/gio/gfileinfo.c: line 1674 (g_file_info_get_is_backup): should not be reached
** (pcmanfm:68749): CRITICAL **: 21:30:32.428: fm_file_info_ref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:32.428: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:32.432: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:35.190: fm_file_info_ref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:35.190: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:35.208: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:41.284: fm_file_info_ref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:41.284: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:41.285: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:42.741: fm_file_info_ref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:42.741: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:42.746: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:50.630: fm_file_info_ref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:50.630: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:50.634: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:50.750: fm_file_info_ref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:50.750: fm_file_info_unref: assertion 'fi != NULL' failed
** (pcmanfm:68749): CRITICAL **: 21:30:50.753: fm_file_info_unref: assertion 'fi != NULL' failed
(pcmanfm:68749): Gtk-WARNING **: 21:30:53.499: gtk_menu_detach(): menu is not attached
Versions
- OS: Gentoo Linux (amd64), kernel 7.2.3-gentoo
- pcmanfm: x11-misc/pcmanfm-1.3.2-r2
- libfm: x11-libs/libfm-1.3.2-r1 (flags: automount, exif, gtk)
- glib: dev-libs/glib-2.88.3 (flags: dbus, elf, introspection, mine, xattr)
- gtk: x11-libs/gtk+-3.24.52 (flags: X, introspection, wayland, xinerama), x11-libs/gtk+-2.24.33-r3 (flags: introspection, xinerama)
Additional info
I modified the source to put g_assert(fi != NULL); before the failing g_return_if_fail(fi != NULL); and g_return_if_fail(fi != NULL, NULL); lines, and tried to check the backtrace.
|
g_return_val_if_fail(fi != NULL, NULL); |
|
g_return_if_fail(fi != NULL); |
full output
$ gdb pcmanfm
GNU gdb (Gentoo 17.2 vanilla) 17.2
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pcmanfm...
(No debugging symbols found in pcmanfm)
(gdb) run
Starting program: /usr/bin/pcmanfm
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
[New Thread 0x7ffff5bc26c0 (LWP 196906)]
[New Thread 0x7ffff53976c0 (LWP 196907)]
[New Thread 0x7ffff4b966c0 (LWP 196908)]
[New Thread 0x7fffe7fff6c0 (LWP 196909)]
[New Thread 0x7fffe77fe6c0 (LWP 196910)]
[New Thread 0x7fffe6b126c0 (LWP 196911)]
** (pcmanfm:196903): WARNING **: 02:50:42.953: terminal alacritty isn't known, consider report it to LibFM developers
[New Thread 0x7fffe629e6c0 (LWP 196912)]
** (pcmanfm:196903): WARNING **: 02:50:42.967: modules directory is not accessible
[New Thread 0x7fffd60686c0 (LWP 196914)]
(pcmanfm:196903): Gtk-WARNING **: 02:50:43.003: Theme parsing error: <data>:2:27: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version
(pcmanfm:196903): Gtk-WARNING **: 02:50:43.003: Theme parsing error: <data>:3:30: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version
[New Thread 0x7fffd58676c0 (LWP 196916)]
(pcmanfm:196903): GLib-GIO-CRITICAL **: 02:50:43.005: GFileInfo created without standard::edit-name
(pcmanfm:196903): GLib-GIO-CRITICAL **: 02:50:43.005: file ../glib-2.88.3/gio/gfileinfo.c: line 1762 (g_file_info_get_edit_name): should not be reached
(pcmanfm:196903): GLib-GIO-CRITICAL **: 02:50:43.005: GFileInfo created without standard::size
(pcmanfm:196903): GLib-GIO-CRITICAL **: 02:50:43.005: file ../glib-2.88.3/gio/gfileinfo.c: line 1865 (g_file_info_get_size): should not be reached
(pcmanfm:196903): GLib-GIO-CRITICAL **: 02:50:43.005: GFileInfo created without standard::is-symlink
(pcmanfm:196903): GLib-GIO-CRITICAL **: 02:50:43.005: file ../glib-2.88.3/gio/gfileinfo.c: line 1696 (g_file_info_get_is_symlink): should not be reached
(pcmanfm:196903): GLib-GIO-CRITICAL **: 02:50:43.005: GFileInfo created without standard::is-hidden
(pcmanfm:196903): GLib-GIO-CRITICAL **: 02:50:43.005: file ../glib-2.88.3/gio/gfileinfo.c: line 1647 (g_file_info_get_is_hidden): should not be reached
(pcmanfm:196903): GLib-GIO-CRITICAL **: 02:50:43.005: GFileInfo created without standard::is-backup
(pcmanfm:196903): GLib-GIO-CRITICAL **: 02:50:43.005: file ../glib-2.88.3/gio/gfileinfo.c: line 1674 (g_file_info_get_is_backup): should not be reached
[New Thread 0x7fffd50666c0 (LWP 196919)]
[Thread 0x7fffd50666c0 (LWP 196919) exited]
[New Thread 0x7fffd50666c0 (LWP 196920)]
[Thread 0x7fffd50666c0 (LWP 196920) exited]
[New Thread 0x7fffd50666c0 (LWP 196921)]
[Thread 0x7fffd50666c0 (LWP 196921) exited]
[New Thread 0x7fffd50666c0 (LWP 196922)]
[Thread 0x7fffd50666c0 (LWP 196922) exited]
[New Thread 0x7fffd50666c0 (LWP 196923)]
[Thread 0x7fffd50666c0 (LWP 196923) exited]
[New Thread 0x7fffd48656c0 (LWP 196924)]
[Thread 0x7fffd48656c0 (LWP 196924) exited]
[New Thread 0x7fffd48656c0 (LWP 196926)]
[Thread 0x7fffd48656c0 (LWP 196926) exited]
[New Thread 0x7fffd48656c0 (LWP 196927)]
[Thread 0x7fffd48656c0 (LWP 196927) exited]
[New Thread 0x7fffd48656c0 (LWP 196928)]
[Thread 0x7fffd48656c0 (LWP 196928) exited]
[New Thread 0x7fffd48656c0 (LWP 196934)]
[Thread 0x7fffd48656c0 (LWP 196934) exited]
[New Thread 0x7fffd48656c0 (LWP 196977)]
[Thread 0x7fffd48656c0 (LWP 196977) exited]
[New Thread 0x7fffd48656c0 (LWP 196978)]
[Thread 0x7fffd48656c0 (LWP 196978) exited]
[New Thread 0x7fffd48656c0 (LWP 196979)]
[Thread 0x7fffd48656c0 (LWP 196979) exited]
[New Thread 0x7fffd48656c0 (LWP 196996)]
**
ERROR:base/fm-file-info.c:912:fm_file_info_ref: assertion failed: (fi != NULL)
Bail out! ERROR:base/fm-file-info.c:912:fm_file_info_ref: assertion failed: (fi != NULL)
Thread 9 "pool-2" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffd60686c0 (LWP 196914)]
0x00007ffff6e20cdc in ?? () from /usr/lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6e20cdc in ?? () from /usr/lib64/libc.so.6
#1 0x00007ffff6dc5696 in raise () from /usr/lib64/libc.so.6
#2 0x00007ffff6dac521 in abort () from /usr/lib64/libc.so.6
#3 0x00007ffff6f78fad in ?? () from /usr/lib64/libglib-2.0.so.0
#4 0x00007ffff6feff5e in g_assertion_message_expr () from /usr/lib64/libglib-2.0.so.0
#5 0x00007ffff7344ae4 in fm_file_info_ref () from /usr/lib64/libfm.so.4
#6 0x00007ffff73578db in fm_dir_list_job_add_found_file () from /usr/lib64/libfm.so.4
#7 0x00007ffff7357efb in ?? () from /usr/lib64/libfm.so.4
#8 0x00007ffff735e346 in ?? () from /usr/lib64/libfm.so.4
#9 0x00007ffff6ff3d02 in ?? () from /usr/lib64/libglib-2.0.so.0
#10 0x00007ffff6ff3510 in ?? () from /usr/lib64/libglib-2.0.so.0
#11 0x00007ffff6e1ecab in ?? () from /usr/lib64/libc.so.6
#12 0x00007ffff6e9314c in ?? () from /usr/lib64/libc.so.6
(gdb) frame 6
#6 0x00007ffff73578db in fm_dir_list_job_add_found_file () from /usr/lib64/libfm.so.4
(gdb) info frame 6
Stack frame at 0x7fffd60679d0:
rip = 0x7ffff73578db in fm_dir_list_job_add_found_file; saved rip = 0x7ffff7357efb
called by frame at 0x7fffd6067af0, caller of frame at 0x7fffd60679b0
Arglist at 0x7fffd60679c0, args:
Locals at 0x7fffd60679c0, Previous frame's sp is 0x7fffd60679d0
Saved registers:
rbx at 0x7fffd60679b0, rbp at 0x7fffd60679b8, r12 at 0x7fffd60679c0, rip at 0x7fffd60679c8
(gdb) quit
Captured backtrace is as below:
#0 0x00007ffff6e20cdc in ?? () from /usr/lib64/libc.so.6
#1 0x00007ffff6dc5696 in raise () from /usr/lib64/libc.so.6
#2 0x00007ffff6dac521 in abort () from /usr/lib64/libc.so.6
#3 0x00007ffff6f78fad in ?? () from /usr/lib64/libglib-2.0.so.0
#4 0x00007ffff6feff5e in g_assertion_message_expr () from /usr/lib64/libglib-2.0.so.0
#5 0x00007ffff7344ae4 in fm_file_info_ref () from /usr/lib64/libfm.so.4
#6 0x00007ffff73578db in fm_dir_list_job_add_found_file () from /usr/lib64/libfm.so.4
#7 0x00007ffff7357efb in ?? () from /usr/lib64/libfm.so.4
#8 0x00007ffff735e346 in ?? () from /usr/lib64/libfm.so.4
#9 0x00007ffff6ff3d02 in ?? () from /usr/lib64/libglib-2.0.so.0
#10 0x00007ffff6ff3510 in ?? () from /usr/lib64/libglib-2.0.so.0
#11 0x00007ffff6e1ecab in ?? () from /usr/lib64/libc.so.6
#12 0x00007ffff6e9314c in ?? () from /usr/lib64/libc.so.6
fm_dir_list_job_add_found_file() is this:
|
/** |
|
* fm_dir_list_job_add_found_file |
|
* @job: the job that collected listing |
|
* @file: a FmFileInfo of the newly found file |
|
* |
|
* This API may be called by the classes derived of FmDirListJob only. |
|
* Application developers should not use this API. |
|
* When a new file is found in the dir being listed, implementations |
|
* of FmDirListJob should call this API with the info of the newly found |
|
* file. The FmFileInfo will be added to the found file list. |
|
* |
|
* If emission of the #FmDirListJob::files-found signal is turned on by |
|
* fm_dir_list_job_set_incremental(), the signal will be emitted |
|
* for the newly found files after several new files are added. |
|
* See the document for the signal for more detail. |
|
* |
|
* Since: 1.0.2 |
|
*/ |
|
void fm_dir_list_job_add_found_file(FmDirListJob* job, FmFileInfo* file) |
|
{ |
|
fm_file_info_list_push_tail(job->files, file); |
|
if(G_UNLIKELY(job->emit_files_found)) |
|
fm_job_call_main_thread(FM_JOB(job), queue_add_file, file); |
|
} |
I'm not familiar to GLib ecosystem nor job manager of libfm, so at this point I gave up debugging.
Hope this helps.
Steps to reproduce
Set up
$HOME/mnt/${nas_name}using CIFS.$HOME/mnt/${nas_name}/1/2/3/4/5/6-many/has 307 directory, and they have 863 subdirectories in total.Reproduce
$HOME/mnt/${nas_name}/1/2/3/4/5/6-many/7/8, but first$HOME, then$HOME/mnt, then$HOME/mnt/${nas_name}, ... and after some steps, finally$HOME/mnt/${nas_name}/1/2/3/4/5/6-many/7/8.Expected behavior
Assertion not failing, and not crashing on non-debug build.
Actual behavior
Assertion fails at
fm_file_info_refandfm_file_info_unref, emitting the CRITICAL messages (assertion 'fi != NULL' failed) on debug build, or causing immediate crash after the the log message on non-debug build.libfm/src/base/fm-file-info.c
Lines 911 to 916 in 7e575d1
libfm/src/base/fm-file-info.c
Lines 926 to 935 in 7e575d1
Logs
(The log is captured using debug build, so not crashing after CRITICAL assertion failure messages.)
Details
Versions
Additional info
I modified the source to put
g_assert(fi != NULL);before the failingg_return_if_fail(fi != NULL);andg_return_if_fail(fi != NULL, NULL);lines, and tried to check the backtrace.libfm/src/base/fm-file-info.c
Line 913 in 7e575d1
libfm/src/base/fm-file-info.c
Line 928 in 7e575d1
full output
Captured backtrace is as below:
fm_dir_list_job_add_found_file()is this:libfm/src/job/fm-dir-list-job.c
Lines 585 to 608 in 7e575d1
I'm not familiar to GLib ecosystem nor job manager of libfm, so at this point I gave up debugging.
Hope this helps.