evilfactory / LuaCsForBarotrauma

Modification for Barotrauma that improves modding support.
http://www.barotraumagame.com/
77 stars 21 forks source link

Installation logic may have ignored certain dlls. #113

Closed shangjiaxuan closed 1 year ago

shangjiaxuan commented 2 years ago

Disclaimers

What happened?

A friend of mine was having problem with game with client side lua installed.

Crash log suggests dll not being copied:

Barotrauma Client crash report (generated on 10/08/2022 10:37:48)

Barotrauma seems to have crashed. Sorry for the inconvenience! 

997CD079A4CCAE85B2B8B09434C7386D

Game version 0.19.11.0 (ReleaseWindows, branch master, revision 8fef89a255)
Graphics mode: 1842x1036 (BorderlessWindowed)
VSync ON
Language: Simplified Chinese
Selected content packages: Vanilla, Lua For Barotrauma, [BOS]Backpack, [BOS]Wrecks, [BOS]Beacons, [BOS]Map, project shipwrecks, Beacons Extended, 高难狩猎, 天赋增强[CN/EN/RU/FRN], Material IO, llangmod
Level seed: no level loaded
Loaded submarine: None
Selected screen: Barotrauma.MainMenuScreen
SteamManager initialized

System info:
    Operating system: Microsoft Windows NT 10.0.19043.0 64 bit
    GPU name: NVIDIA GeForce RTX 2060 SUPER
    Display mode: {Width:1842 Height:1036 Format:Color AspectRatio:1.7779922}
    GPU status: Normal

Exception: Could not load file or assembly 'System.Net.Quic, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 系统找不到指定的文件。 (System.IO.FileNotFoundException)
Target site: System.Object _CreateCaObject(System.Reflection.RuntimeModule, System.RuntimeType, System.IRuntimeMethodInfo, Byte**, Byte*, Int32*)
Stack trace: 
   at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit)
   at System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttributes(MemberInfo element, Type attributeType, Boolean inherit)
   at System.Reflection.CustomAttributeExtensions.GetCustomAttributes[T](MemberInfo element, Boolean inherit)
   at System.Diagnostics.StackTrace.TryResolveStateMachineMethod(MethodBase& method, Type& declaringType)
   at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat, StringBuilder sb)
   at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat)
   at System.Exception.get_StackTrace()
   at System.Exception.ToString()
   at System.Exception.ToString()
   at Barotrauma.GameAnalyticsManager.CheckResponse(IRestResponse response)
   at Barotrauma.GameAnalyticsManager.<>c.<InitIfConsented>b__15_1(Task t)
   at Barotrauma.TaskPool.<>c__DisplayClass6_0.<Add>b__0(Task t, Object obj)
   at Barotrauma.TaskPool.Update()
   at Barotrauma.GameMain.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 656
   at Microsoft.Xna.Framework.Game.Tick() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 500
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 92
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 397
   at Microsoft.Xna.Framework.Game.Run() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 367
   at Barotrauma.Program.Main(String[] args)

Last debug messages:
[10/08/2022 10:37:11] Overriding an affliction or a buff with the identifier 'watchersgaze' using the file 'C:/Users/Hans/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2867579260/Content/preg/pregherpes.xml'
[10/08/2022 10:37:11] Overriding an affliction or a buff with the identifier 'nausea' using the file 'C:/Users/Hans/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2867579260/Content/Afflictions.xml'
[10/08/2022 10:37:11] Overriding an affliction or a buff with the identifier 'concussion' using the file 'C:/Users/Hans/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/2867579260/Content/Afflictions.xml'
[10/08/2022 10:36:45] Attempting to open ALC device "OpenAL Soft on 扬声器 (7.1 Surround Sound)"
[10/08/2022 10:36:44] Logged in as laowang114514 (SteamID STEAM_1:1:495350136)

系统找不到指定的文件 is chinese localization of The system cannot find the file specified.

Reproduction steps

Play the game with lua? (Need more communication with friend)

Bug prevalence

Happens every now and then

Version

0.19.11.0

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

evilfactory commented 2 years ago

Did your friend install using the build version? Checking now, it doesn't seem to come with this dll for some reason. A potential workaround could be disabling game analytics

shangjiaxuan commented 2 years ago

He is using the workshop version. How can analytics be disabled without starting the game? By playersettings.xml?

evilfactory commented 2 years ago

He is using the workshop version. How can analytics be disabled without starting the game? By playersettings.xml?

Yes you should be able to edit config_player.xml to disable it

shangjiaxuan commented 2 years ago

I just looked into the code, and it seems it's not in config_player.xml, but instead retrieved from barotrauma servers. It seems he will need to try uninstall, set analytic, and reinstall.

evilfactory commented 2 years ago

This is weird, if your friend installed via the workshop, then the game should come with this dll by default

shangjiaxuan commented 2 years ago

I think he was playing with client side lua, and the install code did not copy that dll

shangjiaxuan commented 2 years ago

I asked him to copy all dll and json to game folder

evilfactory commented 1 year ago

I've updated the workshop mod, looks like the manual scripts didn't include all the dependencies necessary in Barotrauma.json, should hopefully be fixed now.