Stop the first run hanging on the language list#64
Merged
Conversation
LANGINTKEY() returns "" and never NULL, so an index naming no language yielded an empty name, and that empty name is what ends the enumeration loop in Cabout::OnInitDialog. Making the guard live in 5345d2d turned the miss into a "???" placeholder instead, three characters long, so the loop never ends: it AddString()s into the combo box forever, one core pinned, no message pump. The About box is shown on the first run only, gated on Interface\FirstRun, and that flag is written to the registry BEFORE the modal opens. So a clean install hangs on launch, killing it leaves the flag set, and every later run skips the block and looks fine. That is why it survived: it reproduces once per machine. Hand back the empty name, which is what LANGINTKEY() already produces, and state the contract at the declaration so it does not get "fixed" a third time. The self-heal that 5345d2d was actually for, falling back to English on a stale index, is untouched. --selftest now walks the list under a sane bound and fails instead of hanging, and CI asserts the check ran. Nothing else in CI can see this: --selftest exits long before any dialog, so the hang was invisible to every green build. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019HXNEMWtyrkW7xoD8ewcR3 Signed-off-by: Xavier Roche <roche@httrack.com>
The assertion accepted "after 0 entries", so a lang.def that loaded with no language keys would have passed it while proving nothing. Require at least one. The same contract was also spelled out four times over; keep it at the declaration and let the other three sites point at it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019HXNEMWtyrkW7xoD8ewcR3 Signed-off-by: Xavier Roche <roche@httrack.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every clean install currently hangs on launch and has to be killed.
LANGINTKEY()returns""and never NULL, so an index naming no language yielded an empty name, and that empty name is what ends the enumeration loop inCabout::OnInitDialog. Making the guard live in 5345d2d turned the miss into a"???"placeholder instead, three characters long, so the loop never ends: itAddString()s into the combo box forever, one core pinned and no message pump.The About box is shown on the first run only, gated on
Interface\FirstRun, and that flag is written before the modal opens. So the first launch hangs, killing it leaves the flag set, and every later run skips the block and behaves perfectly. That is why this survived five days and a release build: it reproduces exactly once per machine, and only on a machine nobody has run it on before.The fix hands back the empty name that
LANGINTKEY()already produces, and states the contract at the declaration. The self-heal 5345d2d was actually for, falling back to English on a stale index, is untouched.--selftestnow walks the list under a sane bound and fails rather than hanging, and CI asserts the check ran. Nothing else in CI could see this:--selftestexits long before any dialog, so the hang was invisible to every green build, including the one that shipped it.Found while VM-testing #61, which turned out to be innocent: the same freeze reproduces on master at
099041cwithout it.