GWeakRef can point to disposed object if g_object_run_dispose() is used
See #2265 (closed)
GTK likes to do that as part of
gtk_container_destroy(), which then disposes all the child objects while there might still be other references to them and especially
Retrieving these objects from
GWeakRef will then give a zombie object that might misbehave in various ways and is certainly not safe to use for anything.
GWeakRefs are cleared as part of
g_object_unref(). Maybe that code can be safely copied to
g_object_run_dispose(), maybe not. That needs some investigation.