PC ReLogic.dll causes System.Reflection.ReflectionTypeLoadException

MetroidSnacks

Terrarian
Steam or GOG
Steam
Single Player/Multiplayer
Both
Operating System
Windows 10
Terraria Version
1.4.4.9
Controls Used
Keyboard/Mouse
I don't know what actionable items could be taken by the devs on this, but I think reporting it here at least for future google searches would be a good idea.

I started playing Terraria after a year and a half of putting it down (since about March of 2022) and when I tried to launch the game it crashed, I set the -logerrors and -logfile launch options, and it logged the following error (excerpted from attached log):

Exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Terraria.Program.ForceLoadThread(Object threadContext)
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
HResult: -2146232830
+--> System.TypeLoadException: Could not load type 'ReLogic.Utilities.Vector2D' from assembly 'ReLogic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
HResult: -2146233054


When I tried to uninstall and re-install the game through Steam, it still crashed. I then purged the game by uninstalling in Steam, deleting (or moving) the `...\Steam\steamapps\common\Terraria` folder and the `...\Documents\My Games\Terraria` folder. And when I re-installed the game, it launched fine.

I noticed that some files were left behind with the Steam uninstall, and so I moved those files back in one at a time and noticed that there was a ReLogic.dll file that was left behind and it caused the error indicated in the log file.

So not sure if this is something that the Devs can address for the Steam version, as I don't know how Steam updates work. But for the average user, it is worth double-checking the Steam install location and making sure everything is gone when doing an uninstall. Or just remove that DLL file from your folder tree IF you are getting crashing.

Another peculiarity I noticed is that TmodLoader worked fine, with this dll file in the tree. Not sure why. And I remember messing with plugins of some kind in the past so this file might be left over from that, but I have a suspicion it is more of a file not used by ReLogic anymore.

I am currently fine, and reporting this for future Terraria users and if the devs can address this issue of a potentially deprecated file not being removed properly.
 

Attachments

  • Log_20231103225732414.log
    4.7 KB · Views: 37
  • ReLogicDLL.zip
    69.8 KB · Views: 26
Considering that the file shipped through steam is good, there is nothing that could be done to help with your local corrupted file, as this library is definitely in heavy use in vanilla Terraria.
People seeing this, not knowing what a DLL even is, will just start deleting random files from their install on any crash they get lol
 
Then I guess the best advice I can give for people facing a crashing issue is that if verifying and uninstalling and reinstalling doesn't fix the problem. To uninstall, check that the install location is completely empty for Terraria (at `...\Steam\steamapps\common\Terraria`) and then reinstalling the game.

As for another point, that DLL is not needed, at least on my system. Less that its corrupted and more that if it isn't present, everything seems to work fine. Also a corrupted file should be what a 'verify' by Steam should fix.

Ultimately, I was just hopeful that the Devs might have some way to address this issue, but I understand if not.
 
Terraria uses code from that DLL, so if you deleted it and it still runs it is probably being loaded from another assembly registry
 
Back
Top Bottom