Sorry for thread necromancy, but I've encountered similar issues with other mods using Harmony to patching things and then crashing on Linux.
I found http://www.mono-project.com/docs/debug+profile/debug/#debugging-with-gdb to be quite helpful for getting slightly more useful data out of gdb in these situations. No logs are generated because the mono vm itself crashes hard, often with SIGILL.
I recommend attaching to the already-started process with gdb (e.g. gdb /path/to/executable pidnumber) or launching from within gdb. For example, on debian/ubuntu/etc systems with the pidof command:
will launch you into an interactive debugging session on the currently running game (and freeze it). To continue, then do:
and the game will proceed until you crash/exit/etc. The page I linked points out some handy gdb scripts for using the existing mono function for stack introspection: mono_mpip(void*). Using their example gdb script for unwinding the stack and showing recognizable mono frames,
Then we can do things like
I suspect this is a problem with Harmony, how Harmony is being used, Mono, or all of the above.
I found http://www.mono-project.com/docs/debug+profile/debug/#debugging-with-gdb to be quite helpful for getting slightly more useful data out of gdb in these situations. No logs are generated because the mono vm itself crashes hard, often with SIGILL.
I recommend attaching to the already-started process with gdb (e.g. gdb /path/to/executable pidnumber) or launching from within gdb. For example, on debian/ubuntu/etc systems with the pidof command:
Code Select
$ p=$(pidof RimWorldLinux.x86_64); gdb /proc/$p/exe $p
will launch you into an interactive debugging session on the currently running game (and freeze it). To continue, then do:
Code Select
(gdb) handle SIGXCPU SIG33 SIG35 SIG36 SIGPWR SIGSEGV nostop noprint pass
(gdb) cont
and the game will proceed until you crash/exit/etc. The page I linked points out some handy gdb scripts for using the existing mono function for stack introspection: mono_mpip(void*). Using their example gdb script for unwinding the stack and showing recognizable mono frames,
Code Select
define mono_backtrace
select-frame 0
set $i = 0
while ($i < $arg0)
set $foo = (char*) mono_pmip ($pc)
if ($foo)
printf "#%d %p in%s\n", $i, $pc, $foo
else
frame
end
up-silently
set $i = $i + 1
end
end
Then we can do things like
Code Select
Thread 1 "RimWorldLinux.x" received signal SIGILL, Illegal instruction.
0x00000000404cf233 in ?? ()
(gdb) bt
#0 0x00000000404cf233 in ()
#1 0x00007fffbc035f75 in ()
#2 0x00007ffeeecdca00 in ()
#3 0x00000000404cf220 in ()
#4 0x00007fffffffa860 in ()
#5 0x0000000040811454 in ()
#6 0x00007fff3f726ee0 in ()
#7 0x000000004063745e in ()
#8 0x00007fff3c402708 in ()
#9 0x00007fff4cd1f3c0 in ()
#10 0x00000000026dbcb1 in ()
#11 0x00007ffff7fcba60 in ()
#12 0x00007fff42383200 in ()
#13 0x0000000040810eb1 in ()
#14 0x0000000000000000 in ()
(gdb) mono_backtrace 14
#0 0x00000000404cf233 in ?? ()
#1 0x7fffbc035f75 in (wrapper dynamic-method) Verse.AI.MentalState:PostStart_Patch1 (object,string) + 0x15 (0x7fffbc035f60 0x7fffbc035f7a) [0x7fffefba4d48 - Unity Root Domain]
#2 0x00007ffeeecdca00 in ?? ()
#3 0x404cf220 in Verse.AI.MentalState:PostStart (string) + 0x0 (0x404cf220 0x404cf229) [0x7fffefba4d48 - Unity Root Domain]
#4 0x00007fffffffa860 in ?? ()
#5 0x40811454 in Verse.AI.MentalStateHandler:TryStartMentalState (Verse.MentalStateDef,string,bool,bool,Verse.Pawn) + 0x4b4 (0x40810fa0 0x4081175f) [0x7fffefba4d48 - Unity Root Domain]
#6 0x00007fff3f726ee0 in ?? ()
#7 0x4063745e in Verse.Game:GetComponent<object> () + 0xae (0x406373b0 0x406374ec) [0x7fffefba4d48 - Unity Root Domain]
#8 0x00007fff3c402708 in ?? ()
#9 0x00007fff4cd1f3c0 in ?? ()
#10 0x00000000026dbcb1 in ?? ()
#11 0x00007ffff7fcba60 in ?? ()
#12 0x00007fff42383200 in ?? ()
#13 0x40810eb1 in RimWorld.LordToil_PanicFlee:Init () + 0xb1 (0x40810e00 0x40810ee2) [0x7fffefba4d48 - Unity Root Domain]
I suspect this is a problem with Harmony, how Harmony is being used, Mono, or all of the above.