Skip to content

Windows startup failure with Multiplayer: MonoMod allocator cause and Prepatcher fix #990

Description

@yukkodesu

Related to #989. This report adds a diagnosed cause and a proposed dependency fix.

Problem

Enabling Multiplayer prevents RimWorld from completing startup on my Windows x64 installation. The log repeatedly reports exceptions in Root_Entry.Update and OnGUI. This happens with a fresh game installation and freshly downloaded Workshop mods.

Environment: RimWorld 1.6.4871, Unity 2022.3.35f1, Multiplayer 0.11.5 (4a3be27). The minimal Multiplayer configuration was tested in this order: Prepatcher -> Harmony -> Core -> Multiplayer.

Cause

The failure was traced to MonoMod.Core 1.3.3 embedded in Prepatcher's Harmony 2.4.2 DLL. Its Windows allocator accepts the reserved zero page when looking for nearby detour memory. VirtualAlloc(NULL, ...) may allocate outside the required range, producing an invalid jump. This is a dependency issue exposed during startup, rather than evidence of a bug in Multiplayer's own patch code.

Proposed fix

Submitted Zetrith/Prepatcher#45 to rebuild the bundled Harmony 2.4.2 with MonoMod.Core 1.3.6, which includes MonoMod/MonoMod#308.

With that DLL, the minimal configuration above completes startup, logs Prepatcher's patched-assembly restart and Multiplayer initialization, and no longer produces the original Root_Entry.Update / OnGUI errors. Windows mitigation settings were not changed during this test.

This validates startup only; a multiplayer connection using the new build has not been tested. Multiplayer peers would need matching mod files.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions