From 8f9b742b51cbfbc8f20d12812dbaf4d2afa338a5 Mon Sep 17 00:00:00 2001 From: Jehan Date: Mon, 27 Oct 2025 13:43:11 +0100 Subject: [PATCH] Issue #14799: sync source and filtered container freeze count at creation. This one was happening very rarely, which made it hard to track, though I think it would happen more frequently to people with a lot of fonts (and therefore font loading would take a lot of time) since the problematic situation occured when the thread callback gimp_font_factory_load_async_callback() would run after the corresponding tagged container was created in constructor gimp_data_factory_view_constructor(). When this happened, the source and filtered containers were not synchronized regarding their freeze count. And in particular, the filtered container would have one less freeze and would try to thaw once the thread callback ran and thaw the source container, which was provoking the CRITICAL. --- app/core/gimpfilteredcontainer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/core/gimpfilteredcontainer.c b/app/core/gimpfilteredcontainer.c index 01f94dc2b9..dbf040f8d4 100644 --- a/app/core/gimpfilteredcontainer.c +++ b/app/core/gimpfilteredcontainer.c @@ -188,12 +188,18 @@ gimp_filtered_container_set_property (GObject *object, GParamSpec *pspec) { GimpFilteredContainer *filtered_container = GIMP_FILTERED_CONTAINER (object); + gint freeze_count; switch (property_id) { case PROP_SRC_CONTAINER: filtered_container->src_container = g_value_dup_object (value); + freeze_count = gimp_container_freeze_count (filtered_container->src_container); + while (freeze_count-- > 0) + gimp_filtered_container_src_freeze (filtered_container->src_container, + filtered_container); + g_signal_connect (filtered_container->src_container, "notify::sort-func", G_CALLBACK (gimp_filtered_container_src_sort_func), filtered_container);