Files
Rbm/source
jensandClaude Sonnet 5 da830e947f Fix GUI crash when loading a project via the Load dialog
StackCreator::fromFile/AStack::loadWeights now append "/prj/<name>"
themselves (the prj/<name>/ restructure), expecting dir to be the repo
root -- which poet.cpp and the GUI's startup auto-load already pass.
But the Load button's file chooser used the picked file's own parent
folder (e.g. prj/prims/) as dir, so after the refactor it looked for
prj/prims/prj/prims/prims.prj, threw an uncaught Json::RuntimeError, and
took the whole process down.

Reproduced by actually launching the GUI, clicking Load, and picking
prj/prims/prims.prj -- confirmed the crash, then confirmed the fix with
the identical click sequence (project loads, weight visualizations
render correctly).

Fix: recover the repo root by going up three levels from the picked
file (file -> its project folder -> "prj" folder -> root) and store it
in m_dir, instead of using the file's immediate parent. This also fixes
a separate dormant bug: m_dir was never updated after loading a
different project through this dialog, so Save/Save Training would have
silently written to whatever m_dir happened to be (always "."),
regardless of which project was actually loaded.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016K8Gu7Qejd11JbdiHZqYAs
2026-07-27 16:07:47 +02:00
..
2024-01-22 12:26:03 +01:00
2024-01-22 12:26:03 +01:00
2024-01-22 13:55:51 +01:00
2024-01-22 12:26:03 +01:00
2024-01-22 12:26:03 +01:00
2024-01-22 13:55:51 +01:00
2026-07-27 15:41:01 +02:00
2026-07-27 15:41:01 +02:00
2024-01-22 13:55:51 +01:00
2024-01-22 13:55:51 +01:00
2026-07-26 21:49:32 +02:00
2022-01-18 20:14:56 +00:00
2022-01-17 18:40:50 +00:00