BattletechModders / ModTek

Mod system for HBS's PC game BattleTech.
GNU Lesser General Public License v2.1
121 stars 34 forks source link

Exception after downgrading to BT1.7 w/ ModTek 0.7.3 #159

Closed chrkuhlmann closed 4 years ago

chrkuhlmann commented 4 years ago

Hi,

I'm trying to go back to 1.7.1-598R since many of my beloved mods are not (yet) available for 1.8 (e.g. AIM).

Unfortunately Steam did an auto update and I'm trying to roll back the changes (via this method). It worked pretty well for the basic game, but as soon as I try to run ModTek I cannot start a new campaign any more (shows loading indicator, and never stops). Loaded saves are also stuck and never stop loading, though the UI is shown and I can e.g. open mechbay. This happens whether or not I have any mods installed. As soon as ModTek (0.7.3) is loaded it crashes:

NullReferenceException: Object reference not set to an instance of an object
  at ModTek.Patches.GameTipList_ctor_Patch.Postfix (System.String filename, System.Collections.Generic.List`1[T] ___tips) [0x00037] in <2affd5aa398542ff9bc7dda52df0924f>:0 
  at (wrapper dynamic-method) BattleTech.GameTipList..ctor_Patch1(object,string,int) 

output_log.txt harmony_summary.log ModTek.log

I tried to delete settings files and registry keys but none worked. Any Ideas how to fix this? Any help is highly appreciated.

LadyAlekto commented 4 years ago

You know you can just opt into 1.7.1 in steam under betas to rollback your version?

Like thats the most complicated way to get a older version of the game

chrkuhlmann commented 4 years ago

Ok, will try that,. Thank you very much for the suggestion. For reference, the exception I've seen comes from

public static class GameTipList_ctor_Patch
    {
        public static void Postfix(string filename, List<string> ___tips)

where ___tips is null but not checked before being accessed. However, solving this creates another null exception at an internal game file

NullReferenceException: Object reference not set to an instance of an object
  at BattleTech.MarketingPopupController.get_messageCenter () [0x00005] in <d9d0f3cf980a449a8897715cd4df053c>:0 
  at BattleTech.MarketingPopupController.OnDestroy () [0x00000] in <d9d0f3cf980a449a8897715cd4df053c>:0 

(Filename: <d9d0f3cf980a449a8897715cd4df053c> Line: 0)

, so I will try to use your method to roll back and report back what happens. Hopefully this is just a broken install.

CMiSSioN commented 4 years ago

this way is not only complicated - it is not working - all your problems are certainly caused by wrong game's main DLL version.

chrkuhlmann commented 4 years ago

Ok, used the beta method and game seems to be working again. Thanks a lot guys, didn't know about this method. Well, at least I gained a little insight into modtek through this. Thanks again.