Virtunerd-SCH1BugFix icon

SCH1BugFix

Suppresses known vanilla NullReferenceException crashes in NPC lifecycle, weather and scene transitions, and stops two vanilla log-spam loops. Targeted Harmony finalizers only - no blanket exception swallowing.

CHANGELOG

Changelog

v1.1.4

Fixed

  • One of the crash guards was silently inactive on IL2CPP. It looks for a helper class the compiler generates behind the scenes, and that class is named differently in the two builds of the game, so the search never matched. Nothing looked wrong from the outside: the mod still reported every patch as applied, because this one is an optional extra that is not counted. It now recognises both names, and the misleading warning it used to print is gone with it.

v1.1.3

Verified against Schedule I 0.4.6f13.

New: two log-spam fixes

  • The NavMesh loop. If any mod freezes an NPC away from the walkable area, the game keeps telling it to stop, every physics tick, forever. In one session that was 451,158 lines and about 95% of a 91 MB log file. Now cut by a factor of 1000, and it repairs itself as soon as the NPC is back on normal ground.
  • Missing product data. The game logs a warning for every drug type it does not have taste data for, which is every product added by a mod. It already handles the case correctly, so only the log line was the problem. Matched by exact message start, so unrelated warnings survive.

Improved

  • The mod now looks up its patch targets the right way round for the game version you are running. Getting that wrong made the game search every loaded component and write a full error report for each miss, which bloated the MelonLoader log. That output is now ten times smaller.

Checked

  • All patch targets still exist in 0.4.6f13.
  • Compared every patched game method between 0.4.6f12 and f13 instruction by instruction: all identical. No patch has become unnecessary.

v1.0.6

  • Suppresses the crash when a quest contract UI is updated after it was already destroyed.
  • Suppresses the crash when the UI scales an element that no longer exists during teardown.

v1.0.5

  • The coroutine safety net now covers all game coroutines instead of NPC ones only.
  • Fixes the crash when leaving to the main menu while an avatar seat animation is still running.

v1.0.4

  • The coroutine safety net now covers every NPC coroutine during scene teardown.
  • Fixes the error spam from NPC conversations when switching from game to main menu.

v1.0.3

  • Added crash suppression for all NPC types on destruction, not just employees.
  • Fixes recurring errors when switching from game to main menu.

v1.0.2

  • Added crash suppression for employee destruction.
  • Added crash suppression for network teardown.

v1.0.1

  • Added a fallback for NPC turning animations that outlive their NPC when leaving the game.
  • Patches are now more resilient when a target cannot be found directly.

v1.0.0

  • First release. Targeted fixes for known base-game crashes.
  • Handles the IL2CPP wrapped form of those errors as well.
  • Each patch applies on its own, so one failure never takes the rest down.
  • Built for low conflict with other mods, with throttled logging.