[0.18.1722 Linux x64 + mods] Game lockup / unhandled NULL exception/funlockfile

Started by jooe, November 27, 2017, 02:43:02 PM

Previous topic - Next topic

jooe

System
Rimworld Build 0.18.1722 rev1210 Linux x86_64
running on a Fedora 26 x86_64 system
uname -a:
Linux <hostname> 4.13.13-200.fc26.x86_64 #1 SMP Wed Nov 15 15:46:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Rimworld started either from Steam or from console (see two different logfiles below)

Bug description
After a random time into a modded game, the game locks up and can only be terminated by a kill -9. The last message in the log says "Receiving unhandled NULL exception". I could reproduce the lockup about 10x, but the time into the game varies - I can reload the autosave and continue playing for maybe 10 minutes, then I get the lockup again.
Without the mods, the game does not crash.

Attachments

  • rimworld_log
  • Player.log (this was generated earlier with the same problem, has a stack trace at the end - I don't know how I was able to generate this ...)
  • savegame (too big to attach, please tell me how to submit ...)

Additional information

The problem does not appear when running the game in Windows (win10 x64). As the game runs much faster in Linux (in Windows, I have terrible lag every 1-2 seconds), I prefer this OS though ...

I am running with several mods:

Core, HugsLib, Higher Pop Storytellers[v18], More vanilla factions, EdB Prepare Carefully, Nature's Pretty Sweet, Expanded Prosthetics and Organ Engineering, A Dog Said..., The Birds and the Bees, Birds and Bees (EPOE Patch), Harvest Organs Post Mortem - 2.0 [A18], More Vanilla Turrets [B18], Security Plus[v18], Expanded Roofing, Bone Mod, [T] ExpandedCloth, Storage Solutions, Hospitality, Miscellaneous 'CORE', Misc. Training, RimFridge - A18, Wall Light - B18, Trading Spot - A18, [RF] Fertile Fields [b18], [RF] Basic Bridges [b18], [RF] Basic Bridges - Fishing Add-On [b18], More Furniture [B18], Growable Mushrooms, [T] MoreFloors, Straw Floor [A18], Colony Manager, Hardworking animals B18, Billy's Improved Caravan Formation, Better Workbench Management, WM Smarter food selection, Hand Me That Brick, Fluffy Breakdowns, Scaling Roads (B18), [B18] Removable Mt.Rock Roof Patche, [RF] Pawns are Capable! [a18], AllowDeadMansApparel, RunAndGun, Set-Up Camp, QualityBuilder, Carcinoma spreads, Animals Logic, Skill Overhead, Stocked Traders[v18], Path Avoid - A18, Efficient Light, Avoid Friendly Fire
, JTReplaceWalls [B18], I Can Fix It!, Realistic Rooms, Tech Advancing, Blueprints, ResearchPal, Defensive Positions, [FSF] Complex Jobs, Medical Tab, Animal Tab, Work Tab, Relations Tab, Allow Tool, Heat Map, Architect Icons, Wanderer stat, Refugee Stats - A18, ExtendedInspectData [A18], Save Storage & Outfit Settings - A18, BetterMiniMap, Notifications Archiver, CleaningArea, and Steel isn't flammable[v18]


A stack trace (as seen in Player.log above) shows:

#0  0x007fff5a117500 in funlockfile
#1  0x007fff5a117a88 in (Unknown)
#2  0x007fff5a117a98 in (Unknown)
#3  0x007fff5a117aa8 in mono_set_defaults
#4  0x007fff5a117f70 in mono_runtime_invoke
#5  0x007fff5a117fa0 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#6  0x007fff5a117fd0 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#7  0x007fff5a117ff0 in ps_hints_apply
#8  0x007fff5a118300 in ps_hints_apply
#9  0x007fff5a1183e0 in ps_hints_apply
#10 0x007fff5a118650 in ps_hints_apply
#11 0x007fff5a118700 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#12 0x007fff5a118720 in zcfree
#13 0x007fff5a119550 in __libc_start_main
#14 0x007fff5a119610 in zcfree


//Edit:
After freeing some disk space, I can produce a coredump. Reason says: "RimWorldLinux.x86_64 killed by SIGTRAP"
Doesn't that mean the executable has a debugging breakpoint set?

[attachment deleted by admin: too old]

jooe

Just to clarify, I actually think this is a basegame bug, as a mod error should throw an error, not throw an exception and crash the game.

Of course, I don't ask you to fix the mod which might cause the trouble.
But I would expect the game to catch the error and show an error message.

jooe

Now I got some more crashes, this time with stacktraces and/or coredumps.

I attached the rimworld_log (zipped because it was quite big)

And here's the snippet from the journal including some trace:

Nov 30 12:52:22 <hostname> systemd-coredump[19636]: Process 18668 (RimWorldLinux.x) of user 1000 dumped core.
                                                     
                                                     Stack trace of thread 18668:
                                                     #0  0x00007ff5e75659fb raise (libc.so.6)
                                                     #1  0x00007ff5e7567800 abort (libc.so.6)
                                                     #2  0x00007ff5dee29e52 n/a (libmono.so)
                                                     #3  0x00007ff5e83d43b0 __restore_rt (libpthread.so.0)
                                                     #4  0x00007ff5e75659fb raise (libc.so.6)
                                                     #5  0x00007ff5e7567800 abort (libc.so.6)
                                                     #6  0x00000000009f67cc n/a (RimWorldLinux.x86_64)
                                                     #7  0x00007ff5dee68cb3 n/a (libmono.so)
                                                     #8  0x00007ff5dedcca7e n/a (libmono.so)
                                                     #9  0x00007ff5e83d43b0 __restore_rt (libpthread.so.0)
                                                     #10 0x00007ff5e75aa9e5 vasprintf (libc.so.6)
                                                     #11 0x00007ff5def29a19 n/a (libmono.so)
                                                     #12 0x00007ff5def2b601 n/a (libmono.so)
                                                     #13 0x00007ff5dee843dc n/a (libmono.so)
                                                     #14 0x00007ff5dee845d5 mono_type_get_desc (libmono.so)
                                                     #15 0x00007ff5dee8479f mono_type_full_name (libmono.so)
                                                     #16 0x00007ff5dee8505d mono_method_full_name (libmono.so)
                                                     #17 0x00007ff5deec7040 mono_debug_print_stack_frame (libmono.so)
                                                     #18 0x00007ff5dee27d37 n/a (libmono.so)
                                                     #19 0x00007ff5dee28f92 n/a (libmono.so)
                                                     #20 0x00007ff5dee288d1 n/a (libmono.so)
                                                     #21 0x00007ff5dee640f0 n/a (libmono.so)
                                                     #22 0x0000000002e07b40 n/a (n/a)
                                                     #23 0x0000000041b843f2 n/a (n/a)
                                                     #24 0x000000004115ce1c n/a (n/a)
                                                     #25 0x0000000041159502 n/a (n/a)
                                                     #26 0x00000000411dc3d8 n/a (n/a)
                                                     #27 0x00000000406d250f n/a (n/a)
                                                     #28 0x00007ff5dedd0bc9 n/a (libmono.so)
                                                     #29 0x00007ff5deecc67d mono_runtime_invoke (libmono.so)
                                                     #30 0x00000000009b9922 n/a (RimWorldLinux.x86_64)
                                                     #31 0x0000000000a2443e n/a (RimWorldLinux.x86_64)
                                                     #32 0x00000000009f642c n/a (RimWorldLinux.x86_64)
                                                     #33 0x00000000005eaae2 n/a (RimWorldLinux.x86_64)
                                                     #34 0x0000000000801529 n/a (RimWorldLinux.x86_64)
                                                     #35 0x00000000004547f9 n/a (RimWorldLinux.x86_64)
                                                     #36 0x00007ff5e754f88a __libc_start_main (libc.so.6)
                                                     #37 0x000000000045df09 n/a (RimWorldLinux.x86_64)


[attachment deleted by admin: too old]

thomas15v

I also have this problem, I have been disabling mods on and off trying to figure out witch one it would be. But I also think that this is a problem in the base game. Also there seems to be a pattern when guns are being fired. Almost 90% of the cases the game crashes with raids because I obviously have to fire a gun lol.

Also this is the exception I have, although I think the exception isn't very relevant. It keeps changing.
Receiving unhandled NULL exception
#0  0x007ffd2055e140 in funlockfile
#1  0x007ffd2055e6c8 in _IO_str_overflow
#2  0x007ffd2055e728 in _IO_default_xsputn
#3  0x007ffd2055e778 in _IO_vfprintf
#4  0x007ffd2055ed08 in vasprintf
#5  0x007ffd2055ee38 in g_free
#6  0x007ffd2055ef18 in mono_debug_print_stack_frame
#7  0x007ffd2055ef58 in mono_method_marked_as_wrapperless
#8  0x007ffd2055efb8 in mono_method_marked_as_wrapperless
#9  0x007ffd2055f278 in mono_method_marked_as_wrapperless
#10 0x007ffd2055f538 in mono_amd64_throw_exception
#11 0x007ffd2055f6f8 in (Unknown)
#12 0x007ffd2055f708 in (Unknown)
#13 0x007ffd2055f718 in (Unknown)
#14 0x007ffd2055f728 in (Unknown)
#15 0x007ffd2055f738 in (Unknown)
#16 0x007ffd2055f748 in (Unknown)
#17 0x007ffd2055f758 in (Unknown)
#18 0x007ffd2055f768 in (Unknown)
#19 0x007ffd2055f778 in (Unknown)
#20 0x007ffd2055f788 in (Unknown)
#21 0x007ffd2055f798 in (Unknown)
#22 0x007ffd2055f7a8 in (Unknown)
#23 0x007ffd2055f7b8 in (Unknown)
#24 0x007ffd2055f7c8 in (Unknown)
#25 0x007ffd2055f7d8 in (Unknown)
#26 0x007ffd2055f7e8 in (Unknown)
#27 0x007ffd2055f7f8 in (Unknown)
#28 0x007ffd2055f808 in (Unknown)
#29 0x007ffd2055f818 in (Unknown)
#30 0x007ffd2055f828 in (Unknown)
#31 0x007ffd2055f838 in (Unknown)
#32 0x007ffd2055f848 in (Unknown)
#33 0x007ffd2055f858 in (Unknown)
#34 0x007ffd2055f868 in (Unknown)
#35 0x007ffd2055f878 in (Unknown)
#36 0x007ffd2055f888 in (Unknown)
#37 0x007ffd2055f898 in mono_set_defaults
#38 0x007ffd205621f0 in mono_runtime_invoke
#39 0x007ffd20562220 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#40 0x007ffd20562250 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#41 0x007ffd20562270 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#42 0x007ffd205623f0 in operator new(unsigned long)
#43 0x007ffd20562430 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#44 0x007ffd20562450 in zcfree
#45 0x007ffd20563280 in __libc_start_main
#46 0x007ffd20563340 in zcfree


EDIT

Apparently it has something to do with this bug in unity: https://issuetracker.unity3d.com/issues/linux-player-standalone-x86-64-builds-with-resolution-window-enabled-crash-in-funlockfile.

The game works fine if you use 32bit on linux, however slightly slower tho :/.

2.71828

I think I have the same problem as you guys. I thought it was gone when I installed RuntimeGC for B18 yesterday and ran it every now and then, because I could play a few hours without any CTDs, but just now I got a CTD again during a raid (pretty  much as soon as my turrets engaged), just as thomas15v said.

Something I want to add for my particular configuration: I use a lot of mods (I think something around 175), and if Rimworld crashes like that, it doesn't get killed properly, but the process stays kind of alive, not producing any CPU load, but still occupying about 1GB of RAM. I don't know whether that has anything to do with my WM (I use SpectrWM, so a tiling WM),  but the process just kind of gets shoved into the background, where I have to kill -9 it. I didn't have this problem in A17 with a comparable amount of mods.

My uname -a:
Linux <hostname> 4.13.12-1-ARCH #1 SMP PREEMPT Wed Nov 8 11:54:06 CET 2017 x86_64 GNU/Linux


If it's actually helpful, I could attach some log files, as well, but as there hasn't been any reaction yet to the other log files, I'll abstain from that, for now.

2.71828

I just tried playing again, and this time it happend before even a single shot was fired, almost immediately after unpausing (during a raid, saved and paused where raiders just entered the map)...

rimworld_log:
<Some stuff from Centralized Climate Control?>

Receiving unhandled NULL exception
#0  0x007fff05d2f840 in funlockfile
#1  0x007fff05d2fdf8 in (Unknown)
EOF

Supay

I too am receiving the same error!  64bit Linux as well.  Thought it was a mod so I've been adding and removing them constantly but it seems to eventually happen no matter which are installed.  I see it most often occurring the second that a bady wounded NPC gets shot, and I assume dies.  Is it something to do with the items they drop at that moment?  I have also seen it occurring when my pawns are completing tasks such as mining or other activities where resources would be dropped into the gameworld.  This may just be a coincidence of me seeing that at the same time as a crash, but it may also be related to the fault so I thought worth mentioning.

Supay

Here is the section from my error log which relates.

Receiving unhandled NULL exception
#0  0x007fff37d34dc0 in funlockfile
#1  0x007fff37d35208 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#2  0x007fff37d35218 in operator new(unsigned long)
#3  0x007fff37d35238 in operator new(unsigned long)
#4  0x007fff37d35248 in __run_exit_handlers
#5  0x007fff37d35278 in exit
#6  0x007fff37d35288 in mono_thread_exit
#7  0x007fff37d35298 in mono_method_marked_as_wrapperless
#8  0x007fff37d35558 in mono_amd64_throw_exception
#9  0x007fff37d35718 in (Unknown)

Supay

Quote from: 2.71828 on December 05, 2017, 01:09:24 PM
I just tried playing again, and this time it happend before even a single shot was fired, almost immediately after unpausing (during a raid, saved and paused where raiders just entered the map)...

rimworld_log:
<Some stuff from Centralized Climate Control?>

Receiving unhandled NULL exception
#0  0x007fff05d2f840 in funlockfile
#1  0x007fff05d2fdf8 in (Unknown)
EOF


From my repeat reloading and new game starting, it seems that once the bug has first hit at a seemingly random time into the game, even loading from an autosave prior to the bug occurring results in the reload dying seconds in.  I have no idea why this would be happening as the reloaded autosave has none of the same events occurring yet still dies in the same manner and is basically unrecoverable after that point.

Supay

Do the Devs pick up on bugs reported here in the mod specific forum? If this is believed to be a fault with the base game Unity code in Linux 64bit which only occurs when a mod is installed, should we get this moved to the main bugs forum instead?

2.71828

Quote from: Supay on December 07, 2017, 12:32:58 PM
Do the Devs pick up on bugs reported here in the mod specific forum? If this is believed to be a fault with the base game Unity code in Linux 64bit which only occurs when a mod is installed, should we get this moved to the main bugs forum instead?

I have no idea and would also like to know whether any of the devs are looking into this or at least have seen this bug report, or not. It doesn't seem to be on the Bugtracker, but other than that: 乁| ・ 〰 ・ |ㄏ.

I'm definitely not expecting some kind of immediate miracle fix, but it would be nice to know what the status of this is, i.e. is it a Rimworld bug, or a Unity bug, or something else entirely. If it's a Unity bug, this is probably out of their hands, anyway.  :-\

Supay

Quote from: 2.71828 on December 07, 2017, 02:10:46 PM
I have no idea and would also like to know whether any of the devs are looking into this or at least have seen this bug report, or not. It doesn't seem to be on the Bugtracker, but other than that: 乁| ・ 〰 ・ |ㄏ.

I'm definitely not expecting some kind of immediate miracle fix, but it would be nice to know what the status of this is, i.e. is it a Rimworld bug, or a Unity bug, or something else entirely. If it's a Unity bug, this is probably out of their hands, anyway.  :-\

That is very true, I didn't think of that and should have.  If this is purely Unity then not much they can do, but at least they would be aware and that it badly breaks their Linux 64bit users, though possibly only when using mods.  At least we seem to have confirmed that it doesn't affect Windows, or Linux 32bit, which makes it less likely to be due to any particular mod and more likely to be a basegame fault.  I may chuck up a post in the main bugs area to link to this one and see if it grabs their attention.

Supay

I hope it is ok to post this here.  A few of us have been discussing in the Mod Bugs Forum, but we think that it is actually a basegame fault and likely with Unity itself.  We weren't sure if devs looked in the Mod Bugs Forum often or at all though, so thought best to post here to bring it to your attention.

The fault only appears to affect Linux 64bit as others have tried Windows and Linux 32bit and the fault does not seem to occur in those.  It so far seems to only happen with a mod running, but it doesn't seem to matter which mod is running, as I have tested and had it with as few as 1-3 and as many as 130 with the same result.  The details are all in the thread in that forum along with a link to the Unity bugtracker showing the fault we are experiencing.  If it is Unity, we are aware that you may not be able to do anything, but it is likely why it has only shown up now in B18 if Rimworld is now on a newer and affected Unity version.  There is mention of a workaround in the Unity bugtracker, so I'm hoping you might be able to cobble something together in the meantime, as it is murdering our games at the moment!

https://ludeon.com/forums/index.php?topic=37241.0

Supay

I posted it under the below link.  Kept it brief as already a load of stuff here and I assume if it is confirmed as a basegame/Unity fault this thread till be moved to the main Forum and the new post deleted anyway.

https://ludeon.com/forums/index.php?topic=37471.0

Supay

I may have a workaround.  I had the crash again and again reloading my autosave resulted in an almost immediate crash.  I took a punt on that Unity bug report mentioning resolution, but bear in mind I have absolutely no Unity experience and that could mean display resolution or resolution of an activity in the code or something else entirely.  I set Rimworld to not be Fullscreen and my autosave has loaded and has been running for a while now without any issue.  I'll see how it goes and report back.  Please tell me if I am just talking bollocks though!

EDIT: Have been running for a while now with not a single crash.  Off to bed now and will try again tomorrow, but looking good so far.