Repository navigation
Conversation
Finny Frenzy crashed before the first heat in French, German, Spanish and Korean (TheMoonPeople#215). The race fish documents spell PAL accents as 9-byte tags such as [UNI00e9], so some names run past the 20 bytes that BREEDFISH_USED::name holds: "T[UNI00e9]l[UNI00e9]graham" is 26. ParseRaceFish refused such a name, which refused the language's whole rfd document. No rival fish loaded, and sgInitGyoRace read the name of a null fish. Retail's SetName takes any name under 0x20 bytes, so read the name without a limit and let SetName decide, as retail's loader did. SetName already cuts a long name to the field; it now cuts before a bracketed tag the field would split, which the font would print as text. Brackets count only at character starts, since a Shift-JIS trail byte can be one. NativeRecords.RaceFishNamesLongerThanTheFieldStillLoad and ItemNames.FishRenameKeepsAccentTagsWhole cover the two parts.
This was referenced Nov 22, 2026
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.
Summary
Finny Frenzy crashes before the first heat when the game is in French, German or Spanish (#215). The rival fish now load, so the race no longer reads a null fish.
rfd2.cfg.json: name is longer than the game holdscomes just before the crash insgInitGyoRace.Part of #215. The race also needs #177, which ports
sgLoopGyoRace. The reporter's second log, in English, gets pastsgInitGyoRaceand stops in that stub (gyorace.cpp:1426). With this change alone, French, German and Spanish get as far.Cause
gameplay/sg/gyo/rfd<language>.cfg.json) spell PAL accents as 9-byte tags, as the game's text does. "Télégraham" isT[UNI00e9]l[UNI00e9]graham, 26 bytes.BREEDFISH_USED::nameholds 20 bytes and a terminator.ParseRaceFish(port/src/object/menu/menuaqua.cpp) refused any name longer than that field, and one refused name refused the whole document.CGyoraceFishData::LoadDatathen left every race class empty.sgInitGyoRace(gyorace.cpp:568) copies each racer's name. A rival slot held a null fish, hence the report'sEXCEPTION_ACCESS_VIOLATION reading 0x10.Names longer than the field in the PAL data, 216 per document:
Retail's
_GYORACE_DATAhands every name toSetName, which takes anything under 0x20 bytes.Change
ParseRaceFishreads the name without a length limit and letsSetNamedecide, as retail's loader did. A name of 0x20 bytes or more leaves the fish's species name (49 names, all in rfd6); any other is stored.CGameDataUsed::SetName(port/src/platform/userdata.cpp) already cut a long name to the field. It now cuts before a bracketed tag that the field would split:NativeRecords.RaceFishNamesLongerThanTheFieldStillLoad(port/src/tests/native_records_test.cpp) loads a French document with two such names.ItemNames.FishRenameKeepsAccentTagsWhole(port/src/tests/memory_safety_test.cpp) checks both cuts, and a Shift-JIS name whose trail bytes are 0x5B.Testing
Environment: macOS 26.6.2 arm64 (M4 Pro), Homebrew LLVM 23.1.6, MoltenVK 1.4.2, preset
macos-arm64(Debug).NativeRecords.RaceFishNamesLongerThanTheFieldStillLoadItemNames.FishRenameKeepsAccentTagsWholerfddocuments throughLoadDataandSetName(a local test, not committed)ItemNames.*,NativeRecords.RaceFish*ctest, Debug-j6pass when rerun:GfxGpuRenderThread.LockstepRecordingStaysOnTheCaller, andNativeCharacterRetail.LoadsConvertedC01ProfileAndEvaluatesItsNativeMotion, which timed out once more alone right after the rebuild, then passed three times in 1.6 s of its 5 s. The 3 failures fail on master too:PcSettingsReplay.pad(KeyError: 'present_mode'), and the Kazarov renderer testsGfxMisc.MeshBoundsFollowTheFlagAndAreInvalidatedByUpdatesandGfxGpuMeshDc2.FragmentInvocationQueriesPreservePixelsAndWindowOwnershipNot covered
--jumpstarts in English, and there is no French save near the race. The loader test and the report's stack cover the crash path. Without Port the retail fish race loop #177 the race cannot be run past its first frame in any language.kindandsizeover part of it. A 21-byte name showed whole; a longer one showed stray bytes.RaceInfoholds 0x18 bytes per name.