Files
Seth Hillbrand 9b67b0238d Fix thread-safety crash in async library loading
Resolve URI expansion on the main thread before dispatching async
library enumeration tasks. The getUri() call accesses PROJECT text
variables and SETTINGS_MANAGER::Prj() which are not thread-safe.

When a project is unloaded while worker threads are still running,
they would access freed or modified data in PROJECT::TextVarResolver,
causing either an access violation in (KICAD-14DS) or an assertion
failure when the project list is empty (KICAD-11Q9).

Pre-computing the expanded URI on the main thread and passing it to
enumerateLibrary() as a parameter eliminates the data race.

Resolves KICAD-14DS
Resolves KICAD-11Q9
2026-02-15 06:53:22 -08:00
..