update_file_info_full crashes nautilus with a segfault (even with example from doc page)
Affected Version
- Version: GNOME nautilus 46.2
- Distribution: Ubuntu 24.04
- Also happens with development version: Yes (nautilus 47.beta.1 on Fedora rawhide)
Steps to reproduce
- Create a python file with
Example 3. Nautilus.InfoProvider Example
from here in the nautilus extensions folder - Change the timer from
GObject.timeout_add_seconds(3, [...]
toGObject.timeout_add_seconds(1. [...]
(will also happen with 3 seconds, but more often if the timeout is lower) - Navigate through folders in nautilus, i.e. go into a folder and directly go back into the parent directory.
Expected Behavior
Folders can be navigated.
Actual Behavior
Nautilus crashes with a segmentation fault or there is an Unexpected plugin response
which seems break extensions completely (at least no more print outputs in the log).
Additional Information
This behavior is not limited to Ubuntu 24.04 and Nautilus 46.2, I have also observed it on other distros and older nautilus versions.
Below are two logs created with NAUTILUS_PYTHON_DEBUG=misc nautilus
. The first log shows the crash. And in the second log nautilus gets the Unexpected plugin response
and after that nautilus continues to work, but there are no more python debug prints.
Crash log:
$ NAUTILUS_PYTHON_DEBUG=misc nautilus
** Message: 16:13:14.494: Connecting to org.freedesktop.Tracker3.Miner.Files
nautilus_module_initialize: entered
nautilus_python_load_dir: entered dirname=/home/phil/.local/share/nautilus-python/extensions
nautilus-python:g_module_open /usr/lib/x86_64-linux-gnu/libpython3.12.so.1.0
nautilus-python:Py_Initialize
nautilus-python:PySys_SetArgv
nautilus-python:Sanitize the python search path
nautilus-python:init_pygobject
nautilus-python:import nautilus
nautilus_python_load_file: entered filename=test_plugin
nautilus_python_object_get_type: entered type=UpdateFileInfoAsync
nautilus-python:Loaded python modules
nautilus_python_load_dir: entered dirname=/usr/share/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/usr/share/ubuntu/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/usr/share/gnome/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/home/phil/.local/share/flatpak/exports/share/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/var/lib/flatpak/exports/share/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/usr/local/share/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/var/lib/snapd/desktop/nautilus-python/extensions
nautilus_module_list_types: entered
nautilus_python_object_class_init: entered
nautilus_python_object_instance_init: entered
nautilus_python_object_update_file_info: entered
update_file_info_full
update_cb
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
update_cb
nautilus_python_object_update_file_info: entered
update_file_info_full
update_cb
update_cb
update_cb
update_cb
update_cb
Segmentation fault (core dumped)
Extensions break:
$ NAUTILUS_PYTHON_DEBUG=misc nautilus
** Message: 16:15:24.209: Connecting to org.freedesktop.Tracker3.Miner.Files
nautilus_module_initialize: entered
nautilus_python_load_dir: entered dirname=/home/phil/.local/share/nautilus-python/extensions
nautilus-python:g_module_open /usr/lib/x86_64-linux-gnu/libpython3.12.so.1.0
nautilus-python:Py_Initialize
nautilus-python:PySys_SetArgv
nautilus-python:Sanitize the python search path
nautilus-python:init_pygobject
nautilus-python:import nautilus
nautilus_python_load_file: entered filename=test_plugin
nautilus_python_object_get_type: entered type=UpdateFileInfoAsync
nautilus-python:Loaded python modules
nautilus_python_load_dir: entered dirname=/usr/share/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/usr/share/ubuntu/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/usr/share/gnome/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/home/phil/.local/share/flatpak/exports/share/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/var/lib/flatpak/exports/share/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/usr/local/share/nautilus-python/extensions
nautilus_python_load_dir: entered dirname=/var/lib/snapd/desktop/nautilus-python/extensions
nautilus_module_list_types: entered
nautilus_python_object_class_init: entered
nautilus_python_object_instance_init: entered
nautilus_python_object_update_file_info: entered
update_file_info_full
update_cb
nautilus_python_object_update_file_info: entered
update_file_info_full
update_cb
nautilus_python_object_update_file_info: entered
update_file_info_full
update_cb
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_cancel_update: entered
cancel_update
/home/phil/.local/share/nautilus-python/extensions/test_plugin.py:29: Warning: Source ID 324 was not found when attempting to remove it
GObject.source_remove(t)
/home/phil/.local/share/nautilus-python/extensions/test_plugin.py:29: Warning: Source ID 412 was not found when attempting to remove it
GObject.source_remove(t)
/home/phil/.local/share/nautilus-python/extensions/test_plugin.py:29: Warning: Source ID 614 was not found when attempting to remove it
GObject.source_remove(t)
nautilus_python_object_update_file_info: entered
update_file_info_full
update_cb
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
nautilus_python_object_update_file_info: entered
update_file_info_full
update_cb
update_cb
update_cb
update_cb
update_cb
(org.gnome.Nautilus:33461): nautilus-async-jobs-WARNING **: 16:15:31.851: Unexpected plugin response. This probably indicates a bug in a Nautilus extension: handle=(nil)
(org.gnome.Nautilus:33461): nautilus-async-jobs-WARNING **: 16:15:31.851: Unexpected plugin response. This probably indicates a bug in a Nautilus extension: handle=(nil)
(org.gnome.Nautilus:33461): nautilus-async-jobs-WARNING **: 16:15:31.851: Unexpected plugin response. This probably indicates a bug in a Nautilus extension: handle=(nil)
(org.gnome.Nautilus:33461): nautilus-async-jobs-WARNING **: 16:15:31.851: Unexpected plugin response. This probably indicates a bug in a Nautilus extension: handle=(nil)
nautilus_python_object_update_file_info: entered
update_file_info_full
update_cb
Edited by Philipp Unger