Thumbnails sometimes do not load correctly in the settings icon view
<!-- Please fill this template out in full. Issue reports that do not use this template, or that have missing relevant information may be closed without comment. --> # Issue Description <!-- More detail is better. Details that you think are unimportant may not be. --> The icon view is only partially loaded, while these warnings appear repeatedly in console output (see below for the corresponding backtrace): ``` Gtk-CRITICAL **: 12:14:40.878: gtk_tree_model_get_iter_first: assertion 'GTK_IS_TREE_MODEL (tree_model)' failed ``` # Steps to Reproduce Issue <!-- Clear, easy-to-follow reproduction steps are key to understanding and fixing the issue. --> It's not easy. It's a race condition apparently related to the fact that the icon view model is set asynchronously in `cb_enumerator_file_ready`. I've tried deleting the thumbnails in `~/.cache/thumbnails` to force xfdesktop-settings to recreate them without managing to reliably reproduce the problem. # Expected Behavior <!-- Often it isn't clear: what did you expect to happen that didn't happen? --> Icon view is fully loaded without any warning in console output. # Additional Information <!-- Please list the values of any settings that may be relevant to the issue. Include any relevant logs our console output. If this is a build problem, paste your build output, including all commands you used to run the build. If a screenshot or screencast video may be helpful, attach it here. --> Backtrace corresponding to the above critical warning: ``` Core was generated by `/opt/bin/xfdesktop-settings.orig'. Program terminated with signal SIGTRAP, Trace/breakpoint trap. #0 _g_log_abort (breakpoint=<optimized out>) at ../glib/glib/gmessages.c:431 431 G_BREAKPOINT (); [Current thread is 1 (Thread 0x7158a4102e80 (LWP 19077))] (gdb) bt #0 _g_log_abort (breakpoint=<optimized out>) at ../glib/glib/gmessages.c:431 #1 g_logv (log_domain=0x7158a6225014 "Gtk", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffc05f920f0) at ../glib/glib/gmessages.c:1287 #2 0x00007158a595e614 in g_log (log_domain=log_domain@entry=0x7158a6225014 "Gtk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7158a5a2735e "%s: assertion '%s' failed") at ../glib/glib/gmessages.c:1329 #3 0x00007158a595f8ee in g_return_if_fail_warning (log_domain=log_domain@entry=0x7158a6225014 "Gtk", pretty_function=pretty_function@entry=0x7158a629c830 <__func__.29.lto_priv.8> "gtk_tree_model_get_iter_first", expression=expression@entry=0x7158a624c1a0 "GTK_IS_TREE_MODEL (tree_model)") at ../glib/glib/gmessages.c:3074 #4 0x00007158a6104445 in gtk_tree_model_get_iter_first (tree_model=tree_model@entry=0x0, iter=iter@entry=0x7ffc05f92210) at ../gtk/gtk/gtktreemodel.c:1372 #5 0x0000636f5a97ab51 in cb_thumbnail_ready (thumbnailer=<optimized out>, src_file=0x636f6d3abbf0 "/home/user/Images/dog1.png", thumb_file=0x636f6d3b4330 "/home/user/.cache/thumbnails/large/9a6f97145d0008fdaf8ae202b1c5c1f7.png", background_settings=0x636f6d05c720) at ../settings/xfdesktop-background-settings.c:330 #6 0x00007158a5a64892 in g_closure_invoke (closure=0x636f6d0bee30, return_value=0x0, n_param_values=3, param_values=0x7ffc05f92460, invocation_hint=0x7ffc05f923b0) at ../glib/gobject/gclosure.c:833 #7 0x00007158a5a95625 in signal_emit_unlocked_R.isra.0 (node=node@entry=0x7ffc05f92580, detail=detail@entry=0, instance=instance@entry=0x636f6d090550, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffc05f92460) at ../glib/gobject/gsignal.c:3902 #8 0x00007158a5a85d29 in signal_emit_valist_unlocked (instance=instance@entry=0x636f6d090550, signal_id=signal_id@entry=540, detail=detail@entry=0, var_args=var_args@entry=0x7ffc05f926f0) at ../glib/gobject/gsignal.c:3534 #9 0x00007158a5a85fb2 in g_signal_emit_valist (instance=0x636f6d090550, signal_id=540, detail=0, var_args=var_args@entry=0x7ffc05f926f0) at ../glib/gobject/gsignal.c:3277 #10 0x00007158a5a86074 in g_signal_emit (instance=instance@entry=0x636f6d090550, signal_id=<optimized out>, detail=detail@entry=0) at ../glib/gobject/gsignal.c:3597 #11 0x0000636f5a98094a in xfdesktop_thumbnailer_thumbnail_ready_dbus (proxy=<optimized out>, handle=<optimized out>, uri=0x715880010750, data=0x636f6d090550) at ../common/xfdesktop-thumbnailer.c:526 #12 0x00007158a5a64892 in g_closure_invoke (closure=0x636f6d092d90, return_value=0x0, n_param_values=3, param_values=0x636f6d00da90, invocation_hint=0x7ffc05f92960) at ../glib/gobject/gclosure.c:833 #13 0x00007158a5a95625 in signal_emit_unlocked_R.isra.0 (node=<optimized out>, detail=detail@entry=0, instance=instance@entry=0x636f6d08fc20, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x636f6d00da90) at ../glib/gobject/gsignal.c:3902 #14 0x00007158a5a82a8c in signal_emitv_unlocked (instance_and_params=0x7ffc05f92af0, signal_id=<optimized out>, detail=0, return_value=0x636f6d00da90) at ../glib/gobject/gsignal.c:3226 #15 g_signal_emitv (instance_and_params=instance_and_params@entry=0x636f6d00da90, signal_id=<optimized out>, detail=detail@entry=0, return_value=return_value@entry=0x0) at ../glib/gobject/gsignal.c:3126 #16 0x0000636f5a982f54 in tumbler_thumbnailer1_proxy_g_signal (proxy=<optimized out>, sender_name=<optimized out>, signal_name=<optimized out>, parameters=<optimized out>) at common/tumbler.c:2111 #17 0x00007158a5a64892 in g_closure_invoke (closure=0x636f6cadede0, return_value=0x0, n_param_values=4, param_values=0x7ffc05f92dd0, invocation_hint=0x7ffc05f92d20) at ../glib/gobject/gclosure.c:833 #18 0x00007158a5a95c22 in signal_emit_unlocked_R.isra.0 (node=node@entry=0x7ffc05f92f10, detail=detail@entry=0, instance=instance@entry=0x636f6d08fc20, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffc05f92dd0) at ../glib/gobject/gsignal.c:3942 #19 0x00007158a5a85d29 in signal_emit_valist_unlocked (instance=instance@entry=0x636f6d08fc20, signal_id=signal_id@entry=39, detail=detail@entry=0, var_args=var_args@entry=0x7ffc05f93080) at ../glib/gobject/gsignal.c:3534 #20 0x00007158a5a85fb2 in g_signal_emit_valist (instance=0x636f6d08fc20, signal_id=39, detail=0, var_args=var_args@entry=0x7ffc05f93080) at ../glib/gobject/gsignal.c:3277 #21 0x00007158a5a86074 in g_signal_emit (instance=instance@entry=0x636f6d08fc20, signal_id=<optimized out>, detail=<optimized out>) at ../glib/gobject/gsignal.c:3597 #22 0x00007158a5bccc6c in on_signal_received (connection=<optimized out>, sender_name=0x715894019760 ":1.107", object_path=<optimized out>, interface_name=<optimized out>, signal_name=0x715894018940 "Ready", parameters=0x715894017bf0, user_data=0x636f6d092af0) at ../glib/gio/gdbusproxy.c:874 #23 0x00007158a5bb5eb9 in emit_signal_instance_in_idle_cb (data=0x715894019950) at ../glib/gio/gdbusconnection.c:4190 #24 0x00007158a5958ba9 in g_main_dispatch (context=0x636f6cac22a0) at ../glib/glib/gmain.c:3361 #25 0x00007158a59bc757 in g_main_context_dispatch_unlocked (context=0x636f6cac22a0) at ../glib/glib/gmain.c:4212 #26 g_main_context_iterate_unlocked.isra.0 (context=0x636f6cac22a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4277 #27 0x00007158a59598d7 in g_main_loop_run (loop=0x636f6d217dd0) at ../glib/glib/gmain.c:4479 #28 0x00007158a5fe4d7f in gtk_main () at ../gtk/gtk/gtkmain.c:1329 #29 0x0000636f5a979af2 in main (argc=<optimized out>, argv=<optimized out>) at ../settings/main.c:213 ``` # Environment & Versions <!-- If you are running a stable release, please try to test with the latest stable version. If you are running a dev release, it is very important that you test with the current state of git master. --> * OS distribution and version: arch linux * Overall Xfce version: 4.20 * xfdesktop version (git hash if not a release): `4.20.0-dev-699e21b0` * Windowing system (X11/Wayland): X11 * Compositor and version (if Wayland): * GTK Theme: Adwaita * Icon Theme: elementary-xfce * UI Scale Factor: 1
issue