Skip to content

GIO W32: Pin gio DLL

LRN requested to merge lrn/glib:gio-appinfo-thread-crash into master

On Windows gio runs a thread to update appinfo at startup. If someone unloads gio (this happens when a dynamic gio module gets unloaded by a program that doesn't use gio itself), there doesn't seem to be a way to detect that until gio is already gone, and as soon as gio is gone, the thread crashes, since it tries to execute instructions that are no longer there.

Holding an extra reference to gio DLL fixes this, but it also prevents gio from being unloaded, and there's no "weak references" for DLLs. So we just pin gio and acknowledge that it will never be unloaded.

Fixes #2300 (closed)

Fixes #2359 (closed)

Merge request reports