Library MP3Sharp Crashes Game on Launch

jrgd

Terrarian
Steam or GOG
Steam
Single Player/Multiplayer
Both
Operating System
Linux Other
Terraria Version
1.4.2.3
Controls Used
Keyboard/Mouse
Host OS: Fedora 34 (Linux)
SELinux: enforcing​
Policies: distro defaults​
Kernel: 5.12.5-300.fc34.x86_64​
GPU: NVIDIA GTX 970 | NVIDIA proprietary 465.27​
Steps to reproduce:
  • Install latest version, fully clean
  • Launch game
Game stdout log:
Code:
Error Logging Enabled.
Setting breakpad minidump AppID = 105600
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198116248833 [API loaded no]
Using EXT_swap_control_tear VSync!
FNA3D Driver: OpenGL
OpenGL Renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
OpenGL Driver: 4.6.0 NVIDIA 465.27
OpenGL Vendor: NVIDIA Corporation
MojoShader Profile: glsl120
Using EXT_swap_control_tear VSync!
Using EXT_swap_control_tear VSync!
Resolution changed to: 800x600.
Razer Chroma not supported: System.DllNotFoundException: RzChromaSDK.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) ReLogic.Peripherals.RGB.Razer.NativeMethods.Init()
  at ReLogic.Peripherals.RGB.Razer.RazerDeviceGroup.Initialize () [0x0000a] in <f9cae321587c4bcd98a9180050c6332d>:0
Corsair RGB not supported: System.DllNotFoundException: CUESDK_2015.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) ReLogic.Peripherals.RGB.Corsair.NativeMethods.CorsairPerformProtocolHandshake()
  at ReLogic.Peripherals.RGB.Corsair.CorsairDeviceGroup.Initialize () [0x00014] in <f9cae321587c4bcd98a9180050c6332d>:0
Logitech RGB not supported: System.DllNotFoundException: LogitechLedEnginesWrapper  assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) ReLogic.Peripherals.RGB.Logitech.NativeMethods.LogiLedInit()
  at ReLogic.Peripherals.RGB.Logitech.LogitechDeviceGroup.Initialize () [0x0000a] in <f9cae321587c4bcd98a9180050c6332d>:0
================
5/24/2021 10:27:47 PM: Unhandled Exception
Thread: 7 []
Culture: en-US
Exception: System.BadImageFormatException: Could not resolve field token 0x04004b88, due to: Could not load type of field 'Terraria.Audio.MP3AudioTrack:_mp3Stream' (1) due to: Could not resolve type with token 0100013d from typeref (expected class 'XPT.Core.Audio.MP3Sharp.MP3Stream' in assembly 'MP3Sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') assembly:MP3Sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:XPT.Core.Audio.MP3Sharp.MP3Stream member:(null) assembly:/home/jrgd/.local/share/Steam/steamapps/common/Terraria/Terraria.exe type:MP3AudioTrack member:(null)
File name: 'Terraria'
  at (wrapper managed-to-native) System.RuntimeMethodHandle.GetFunctionPointer(intptr)
  at System.RuntimeMethodHandle.GetFunctionPointer () [0x00000] in <d1664be62cd44600bbd25f7afa292479>:0
  at Terraria.Program.ForceJITOnAssembly (System.Reflection.Assembly assembly) [0x00041] in <c4bf1c660b6449b2b1fa78a4233deeca>:0
  at Terraria.Program.ForceLoadAssembly (System.Reflection.Assembly assembly, System.Boolean initializeStaticMembers) [0x0000d] in <c4bf1c660b6449b2b1fa78a4233deeca>:0
  at Terraria.Program.ForceLoadThread (System.Object threadContext) [0x00005] in <c4bf1c660b6449b2b1fa78a4233deeca>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00025] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ThreadHelper.ThreadStart (System.Object obj) [0x0000f] in <d1664be62cd44600bbd25f7afa292479>:0
================
[ERROR] FATAL UNHANDLED EXCEPTION: System.BadImageFormatException: Could not resolve field token 0x04004b88, due to: Could not load type of field 'Terraria.Audio.MP3AudioTrack:_mp3Stream' (1) due to: Could not resolve type with token 0100013d from typeref (expected class 'XPT.Core.Audio.MP3Sharp.MP3Stream' in assembly 'MP3Sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') assembly:MP3Sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:XPT.Core.Audio.MP3Sharp.MP3Stream member:(null) assembly:/home/jrgd/.local/share/Steam/steamapps/common/Terraria/Terraria.exe type:MP3AudioTrack member:(null)
File name: 'Terraria'
  at (wrapper managed-to-native) System.RuntimeMethodHandle.GetFunctionPointer(intptr)
  at System.RuntimeMethodHandle.GetFunctionPointer () [0x00000] in <d1664be62cd44600bbd25f7afa292479>:0
  at Terraria.Program.ForceJITOnAssembly (System.Reflection.Assembly assembly) [0x00041] in <c4bf1c660b6449b2b1fa78a4233deeca>:0
  at Terraria.Program.ForceLoadAssembly (System.Reflection.Assembly assembly, System.Boolean initializeStaticMembers) [0x0000d] in <c4bf1c660b6449b2b1fa78a4233deeca>:0
  at Terraria.Program.ForceLoadThread (System.Object threadContext) [0x00005] in <c4bf1c660b6449b2b1fa78a4233deeca>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00025] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ThreadHelper.ThreadStart (System.Object obj) [0x0000f] in <d1664be62cd44600bbd25f7afa292479>:0

Workarounds:
  • rename or remove ./MP3Sharp.dll (directories relative to game's executable)
 
I have the exact same issue here on Debian. I get a black window for a few seconds, then it crashes. The workaround of renaming MP3Sharp.dll seems to fix the problem though.

System information:
Operating System: Debian GNU/Linux 11
Kernel Version: 5.10.0-6-amd64
OS Type: 64-bit
Processors: 8 × AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
Memory: 13.6 GiB of RAM
Graphics Processor: AMD Radeon™ Vega 10 Graphics

stdout log:
Code:
Error Logging Enabled.
Using EXT_swap_control_tear VSync!
FNA3D Driver: OpenGL
OpenGL Renderer: AMD Radeon(TM) Vega 10 Graphics (RAVEN, DRM 3.40.0, 5.10.0-6-amd64, LLVM 11.0.1)
OpenGL Driver: 4.6 (Compatibility Profile) Mesa 20.3.4
OpenGL Vendor: AMD
MojoShader Profile: glsl120
Using EXT_swap_control_tear VSync!
Using EXT_swap_control_tear VSync!
Resolution changed to: 800x600.
Razer Chroma not supported: System.DllNotFoundException: RzChromaSDK.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) ReLogic.Peripherals.RGB.Razer.NativeMethods.Init()
  at ReLogic.Peripherals.RGB.Razer.RazerDeviceGroup.Initialize () [0x0000a] in <f9cae321587c4bcd98a9180050c6332d>:0
Corsair RGB not supported: System.DllNotFoundException: CUESDK_2015.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) ReLogic.Peripherals.RGB.Corsair.NativeMethods.CorsairPerformProtocolHandshake()
  at ReLogic.Peripherals.RGB.Corsair.CorsairDeviceGroup.Initialize () [0x00014] in <f9cae321587c4bcd98a9180050c6332d>:0
Logitech RGB not supported: System.DllNotFoundException: LogitechLedEnginesWrapper  assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) ReLogic.Peripherals.RGB.Logitech.NativeMethods.LogiLedInit()
  at ReLogic.Peripherals.RGB.Logitech.LogitechDeviceGroup.Initialize () [0x0000a] in <f9cae321587c4bcd98a9180050c6332d>:0
================
5/30/2021 7:26:02 AM: Unhandled Exception
Thread: 7 []
Culture: en-US
Exception: System.BadImageFormatException: Could not resolve field token 0x04004b88, due to: Could not load type of field 'Terraria.Audio.MP3AudioTrack:_mp3Stream' (1) due to: Could not resolve type with token 0100013d from typeref (expected class 'XPT.Core.Audio.MP3Sharp.MP3Stream' in assembly 'MP3Sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') assembly:MP3Sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:XPT.Core.Audio.MP3Sharp.MP3Stream member:(null) assembly:/home/user/.local/share/Steam/steamapps/common/Terraria/Terraria.exe type:MP3AudioTrack member:(null)
File name: 'Terraria'
  at (wrapper managed-to-native) System.RuntimeMethodHandle.GetFunctionPointer(intptr)
  at System.RuntimeMethodHandle.GetFunctionPointer () [0x00000] in <d1664be62cd44600bbd25f7afa292479>:0
  at Terraria.Program.ForceJITOnAssembly (System.Reflection.Assembly assembly) [0x00041] in <c4bf1c660b6449b2b1fa78a4233deeca>:0
  at Terraria.Program.ForceLoadAssembly (System.Reflection.Assembly assembly, System.Boolean initializeStaticMembers) [0x0000d] in <c4bf1c660b6449b2b1fa78a4233deeca>:0
  at Terraria.Program.ForceLoadThread (System.Object threadContext) [0x00005] in <c4bf1c660b6449b2b1fa78a4233deeca>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00025] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <d1664be62cd44600bbd25f7afa292479>:0
  at System.Threading.ThreadHelper.ThreadStart (System.Object obj) [0x0000f] in <d1664be62cd44600bbd25f7afa292479>:0
================
 
Same problem.
I can also confirm deleting MP3Sharp.dll fixes this.

For anyone who doesnt know:
You can add "-logerrors -logfile" to launch options on Steam for Terraria to get logs ^^
 
i just ran into this issue also. renaming MP3Sharp.dll fixed it. odd thing is I use to play Terraria on this PC all the time over the span over a few years and never had the issue. it just started happening recently. no idea why.

does anyone know what removing MP3Sharp.dll does and/or will it cause any side effects? like is there some audio that is going to be missing now?

note I am running on Archlinux. i tried with both steam-native and steam-runtime but got the same error. i also reinstalled the game, same error.
 
Back
Top Bottom