Follow-up to #309 (closed). Thanks for the quick beta.3/beta.4 fixes. Construction now works, but the game hard-crashes right after load whenever a plain custom contact exists. Same two-contact minimal repro as in #309, nothing else installed.
Environment: Schedule I 0.4.7f6 (Steam build 25439817), IL2CPP, MelonLoader 0.7.3, S1API 3.2.1-beta.4 (S1API.Il2Cpp.MelonLoader.dll SHA-256 bc0f6f35…0588), S1MAPI 2.0.0, and the two-contact repro mod from #309. No other mods.
What happens:
- Both contacts construct and register. Right after load, the repro mod logs
NPC.Get("repro_legacy_contact") → PRESENT and NPC.Get("repro_modern_contact") → PRESENT. No Failed to instantiate warnings.
- About a second later the process dies. The MelonLoader log just ends.
Player.log ends with:
Game loaded
ScheduleOne.Persistence.<<StartGame>g__LoadRoutine|0>d:MoveNext()
InitializeNPC called on already initialized NPC. First deinitializing...
ScheduleOne.NPCs.NPC:InitializeNPC(NPCData)
ScheduleOne.NPCs.NPC:Awake_UserLogic_ScheduleOne.NPCs.NPC_Assembly-CSharp.dll()
ScheduleOne.NPCs.NPC:Awake()
- Windows Application log:
coreclr.dll 6.0.3624.51421, exception 0xc0000005, fault offset 0x1d4089, followed by .NET Runtime 1023 "terminated due to an internal error in the .NET Runtime". No Unity crash dump.
Control: with the repro mod removed (S1API beta.4 alone), the same save loads fine.
Reading of it (not verified): a custom contact's GameObject gets activated after load, NPC.Awake calls InitializeNPC on an NPC that S1API already initialized during construction, the game deinitializes it first, and something managed then touches the deinitialized state. That would be a CoreCLR access violation under Il2CppInterop rather than a Unity native crash. The IL2CPP f6 validation may have registered the contacts without staying in-world past the first post-load Awake.
The full MelonLoader log and the Player.log tail are available if useful. Happy to test a fix build.
Follow-up to #309 (closed). Thanks for the quick beta.3/beta.4 fixes. Construction now works, but the game hard-crashes right after load whenever a plain custom contact exists. Same two-contact minimal repro as in #309, nothing else installed.
Environment: Schedule I 0.4.7f6 (Steam build 25439817), IL2CPP, MelonLoader 0.7.3, S1API 3.2.1-beta.4 (
S1API.Il2Cpp.MelonLoader.dllSHA-256bc0f6f35…0588), S1MAPI 2.0.0, and the two-contact repro mod from #309. No other mods.What happens:
NPC.Get("repro_legacy_contact")→ PRESENT andNPC.Get("repro_modern_contact")→ PRESENT. NoFailed to instantiatewarnings.Player.logends with:coreclr.dll6.0.3624.51421, exception0xc0000005, fault offset0x1d4089, followed by.NET Runtime1023 "terminated due to an internal error in the .NET Runtime". No Unity crash dump.Control: with the repro mod removed (S1API beta.4 alone), the same save loads fine.
Reading of it (not verified): a custom contact's GameObject gets activated after load,
NPC.AwakecallsInitializeNPCon an NPC that S1API already initialized during construction, the game deinitializes it first, and something managed then touches the deinitialized state. That would be a CoreCLR access violation under Il2CppInterop rather than a Unity native crash. The IL2CPP f6 validation may have registered the contacts without staying in-world past the first post-loadAwake.The full MelonLoader log and the
Player.logtail are available if useful. Happy to test a fix build.