Confirm with your password

Bug report: Infinite localization reload loop on startup — game freezes and closes (v1.4.40) Done

Mod: Offline Companions Reborn 1.4.40 (Maddhattr)
Game: Valheim 1.0 (Unity 6000.0.75)
BepInEx: BepInExPack Valheim 5.4.2350
Platform: Windows 64-bit, Steam
Game language: Russian (Unity still loads English localization files)

Symptom

When Offline Companions is installed, the game never reaches the main menu. The loading screen spins for a long time, then the process closes. No crash dialog, no Exception in the log — it just hangs and exits.

Without the Companions folder, the game starts normally with the same mod list.

What the log shows

The mod itself loads once without error:

[Info : Offline Companions] Offline Companions v1.4.40 loading...
[Info : Offline Companions] Offline Companions loaded successfully! (52 methods patched)
[Info : Offline Companions] [BUILD] Companions.dll patched build: v58-smelt-selfabort-inventorychanged-fix

Immediately after, localization enters an infinite loop. For ~2 minutes (19:35:17 → 19:37:13 and still going), the same block repeats hundreds of times:

[Info : Unity Log] Loaded localization file #0 - 'localization' language: 'English'
...
[Info : Unity Log] Loaded localization file #12 - 'localization_switch' language: 'English'
[Info : Offline Companions] [Localization] Loaded 176 keys from ...\BepInEx\plugins\Companions\Translations\English.json
[Info : Offline Companions] [Localization] Injected 176 defaults + 176 "Russian" overrides

Counts from one LogOutput.log (~1.5 MB, ~23k lines):

  • Offline Companions localization lines: ~1658
  • Unity Loaded localization file #...: ~10785
  • Reloads of localization file #0 alone: ~830
  • Exception / Error / NullReference / StackOverflow: 0

So it is not a one-time crash — it is a feedback loop: inject translations → Unity reloads language files → inject again → … until the process is killed or dies.

Likely cause

ModLocalization (or equivalent) appears to re-inject Russian overrides every time Valheim’s localization is loaded. That inject likely triggers another localization load event, so the cycle never stops.

Note: the game reports language as English in Unity logs while the mod injects "Russian" overrides. Player language is set to Russian.

What was already tried

  • Confirmed other mods load fine; only removing Companions restores launch.
  • Created a full Russian.json (176 keys, matching placeholders) and placed it in Companions\Translations\ — the loop still needs verification after that, but the log pattern points to a code path, not missing keys alone.

Request

Please guard localization injection so it runs once (or only when the language actually changes), and does not re-fire on every Unity localization reload.

Happy to provide the full LogOutput.log if useful.

Build tag from log: v58-smelt-selfabort-inventorychanged-fix
Version: 1.4.40


Игра с модом крутит загрузку и закрывается. В логе Offline Companions бесконечно грузит English.json и inject Russian overrides (~800+ раз). Без мода игра стартует. Exception нет — зависание из‑за цикла локализации.

[deleted]
[deleted]
[Mod Author]

This post was incredibly helpful. I have a fix for this that I will be uploading today. Please continue to post any issues you run into and I will prioritize those fixes.

[Mod Author]

This should be fixed now. Please let me know if you continue to have issues. If you find any other bug/issues/features please let me know.

@Maddhattr wrote: This should be fixed now. Please let me know if you continue to have issues. If you find any other bug/issues/features please let me know.

Я узнал что проблема была не в вашем моде, все отлично..

Log in to reply.