SignatureBeef / Terraria-s-Dedicated-Server-Mod

TDSM - .NET and Mono compatible Terraria Server Software Mod
MIT License
143 stars 49 forks source link

SIGABRT when working directory is different from tdsm.exe location #154

Closed CJKay closed 9 years ago

CJKay commented 9 years ago

Running tdsm.exe from a different directory than where it is located results in a SIGABRT:

TDSM Rebind API build 2b running on Mono
* Assertion at class.c:5597, condition `!mono_loader_get_last_error ()' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at TDSM.API.PluginManager.LoadPlugins () <0x0020f>
  at TDSM.API.Callbacks.MainCallback.ProgramStart () <0x001b7>
  at TDSM.API.Callbacks.MainCallback.OnProgramStarted (string[]) <0x00077>
  at Terraria.WindowsLaunch.Main (string[]) <0x00017>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

    mono() [0x4b5ca0]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0) [0x7f84889da8d0]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37) [0x7f8488657107]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7f84886584e8]
    mono() [0x6406e5]
    mono() [0x640853]
    mono() [0x529590]
    mono(mono_class_get_full+0xe2) [0x52a762]
    mono(mono_class_from_name+0xfe) [0x52ab7e]
    mono(mono_class_from_typeref+0x182) [0x52a392]
    mono(mono_class_get_full+0x145) [0x52a7c5]
    mono(mono_metadata_parse_mh_full+0x4da) [0x56e29a]
    mono(mono_method_get_header+0x119) [0x54e9e9]
    mono() [0x421c1c]
    mono() [0x42584e]
    mono() [0x42636b]
    mono() [0x4b6f61]
    [0x40686166]

Debug info from gdb:

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Aborted (core dumped)

This occurs on both Mono and MS .NET.

SignatureBeef commented 9 years ago

I am able to easily replicate, thank you! @Stickiler will be continuing on with the fix later on today and we don't expect it to take long.

TDSM Rebind API build 2b running on Mono

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'NLua, Version=1.3.2.0, Culture=neutral, PublicKeyToken=8df2ab518030ea95' or one of its dependencies.
File name: 'NLua, Version=1.3.2.0, Culture=neutral, PublicKeyToken=8df2ab518030ea95'
  at TDSM.API.PluginManager.LoadPlugins () [0x00000] in <filename unknown>:0
  at TDSM.API.Callbacks.MainCallback.ProgramStart () [0x00000] in <filename unknown>:0
  at TDSM.API.Callbacks.MainCallback.OnProgramStarted (System.String[] cmd) [0x00000] in <filename unknown>:0
  at Terraria.WindowsLaunch.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'NLua, Version=1.3.2.0, Culture=neutral, PublicKeyToken=8df2ab518030ea95' or one of its dependencies.
File name: 'NLua, Version=1.3.2.0, Culture=neutral, PublicKeyToken=8df2ab518030ea95'
  at TDSM.API.PluginManager.LoadPlugins () [0x00000] in <filename unknown>:0
  at TDSM.API.Callbacks.MainCallback.ProgramStart () [0x00000] in <filename unknown>:0
  at TDSM.API.Callbacks.MainCallback.OnProgramStarted (System.String[] cmd) [0x00000] in <filename unknown>:0
  at Terraria.WindowsLaunch.Main (System.String[] args) [0x00000] in <filename unknown>:0
LukevanTricht commented 9 years ago

Fixed this in fc380395d16644ca35a195e16066b9c35669cb95

Please try the newest binaries.