GamingCoookie / dv-multiplayer-continued

A multiplayer modification for the game Derail Valley
Other
14 stars 5 forks source link

DV Multiplayer doesn't load when Passenger Jobs are enabled #27

Closed MorriTheDragon closed 1 year ago

MorriTheDragon commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Install Passenger Jobs mod
  2. Install DV Multiplayer Continued mod
  3. See the error in the mod manager

Desktop (no VR mode):

Manager info

[Manager] Version: 0.25.4.0.
[Manager] OS: Microsoft Windows NT 10.0.19045.0 AMD64.
[Manager] Net Framework: 4.0.30319.42000.
[Manager] Unity Engine: 2019.4.221.
[Manager] Game: Derail Valley.

Additional context

[Manager] Parsing mods.
Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
[Manager] Reading file 'C:\Program Files (x86)\Steam\steamapps\common\Derail Valley\Mods\DVCustomCarLoader\Info.json'.
[Manager] Reading file 'C:\Program Files (x86)\Steam\steamapps\common\Derail Valley\Mods\DVMultiplayerContinued\Info.json'.
[Manager] Reading file 'C:\Program Files (x86)\Steam\steamapps\common\Derail Valley\Mods\PassengerJobs\Info.json'.
[Manager] Sorting mods.
[Manager] Loading mods.
[DVCustomCarLoader] Version '1.7.4'. Loading.
[DVCustomCarLoader] Creating CustomCarManager
[DVCustomCarLoader] Loading cargo definitions from C:\Program Files (x86)\Steam\steamapps\common\Derail Valley\Mods\DVCustomCarLoader\Cargo
[DVCustomCarLoader] Mod path: C:\Program Files (x86)\Steam\steamapps\common\Derail Valley\Mods\DVCustomCarLoader\Cars
[DVCustomCarLoader] Folder count: 0
[DVCustomCarLoader] Loco Lights traincar patch not found, skipping
[DVCustomCarLoader] [Error] Failed to register debug commands: System.NullReferenceException: Object reference not set to an instance of an object
  at DVCustomCarLoader.DebugCommands.RegisterCommands () [0x00007] in <21bf256faacb47b5bacadf60f5f98da6>:0 
[DVCustomCarLoader] Active.
[DVCustomCarLoader] Loading time 1.50 s.
[PassengerJobs] Version '3.2.1'. Loading.
[PassengerJobs] Optional mod 'SlicedPassengerCars' not found.
[PassengerJobs] Optional mod 'SkinManagerMod' not found.
[PassengerJobs] Optional mod 'RedworkDE.DvTime' not found.
[PassengerJobs] SkinManager not found, skipping integration
[PassengerJobs] unable to find DVTime
Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/Derail Valley/DerailValley_Data/Mono/data-000002BECAD49AA0.dll
[PassengerJobs] Active.
[PassengerJobs] Loading time 0.18 s.
[DVMultiplayerContinued] Version '1.4.0'. Loading.
[DVMultiplayerContinued] [DEBUG] Patching passenger jobs...
[DVMultiplayerContinued] [Error] Error trying to call 'DVMultiplayer.Main.Load'.
[DVMultiplayerContinued] [Exception] TargetInvocationException - Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at CommandTerminal.Terminal.Log (CommandTerminal.TerminalLogType type, System.String format, System.Object[] message) [0x0000c] in <2dd118c8baed420694a6351a815fc83d>:0 
  at CommandTerminal.Terminal.Log (System.String format, System.Object[] message) [0x00000] in <2dd118c8baed420694a6351a815fc83d>:0 
  at DVMultiplayer.Main.Log (System.String msg) [0x00061] in <90816263cc2f4ce4961cd625140d94c7>:0 
  at DVMultiplayer.Patches.PassengerJobs.PassengerJobsModInitializer.Initialize (UnityModManagerNet.UnityModManager+ModEntry passengerJobsModEntry, HarmonyLib.Harmony harmony) [0x00000] in <90816263cc2f4ce4961cd625140d94c7>:0 
  at DVMultiplayer.Main.Load (UnityModManagerNet.UnityModManager+ModEntry entry) [0x00072] in <90816263cc2f4ce4961cd625140d94c7>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <eae584ce26bc40229c1b1aa476bfa589>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at UnityModManagerNet.UnityModManager+ModEntry.Invoke (System.String namespaceClassnameMethodname, System.Object& result, System.Object[] param, System.Type[] types) [0x00011] in <06c5747e56cc4731868d1c2df7045299>:0 
[DVMultiplayerContinued] Not loaded.
[DVMultiplayerContinued] Loading time 0.12 s.
[Manager] FINISH. SUCCESSFUL LOADED 2/3 MODS.
Insprill commented 1 year ago

This isn't related to Passenger Jobs. It occurs whenever messages are logged from Main#Log, this line in particular.

https://github.com/GamingCoookie/dv-multiplayer-continued/blob/a6bf647ef546be305783ccf0f8c4a7731fb25618/DVMultiplayerContinued/Main.cs#L119

Initializing Passenger Jobs just happens to be the first time a message is logged.

MorriTheDragon commented 1 year ago

Hmm. I don't get this error when I uninstall Passenger Jobs tho, that is why I assumed it is related