[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

Tynan

It's all Mono from what I can see. Mono is the implementation of .NET. I guess the Linux version has an issue... not sure we can do anything about it. :/
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Senacharim

(sorry to necro-thread)

I'm getting this same error.  Same scenario.  Ubuntu 18.04 LTS.  Rimworld 64bit running from steam.  Lots of mods.

Using the shiny new 1.0.2096 build of Rimworld.  Been fiddling with the "which mod is it" troubleshooting, and if it's mods then there's some mod interaction that seems like it would be best described by calculus groups.  Sadly, verbose logging via dev mod has given me no hints.

The bottom of the /tmp/rimworld_log:
Quote
Receiving unhandled NULL exception
#0  0x007ffea82a7600 in funlockfile
#1  0x007ffea82a7b98 in vasprintf
#2  0x007ffea82a7cc8 in g_free
#3  0x007ffea82a7ce8 in g_free
#4  0x007ffea82a7dd8 in mono_free_bstr
#5  0x007ffea82a7df8 in mono_type_get_desc
#6  0x007ffea82a7e28 in mono_signature_get_desc
#7  0x007ffea82a7e58 in mono_lookup_internal_call
#8  0x007ffea82a86a8 in mono_upgrade_remote_class_wrapper
#9  0x007ffea82a8728 in mono_op_to_op_imm_noemul
#10 0x007ffea82a8a98 in mono_set_defaults
#11 0x007ffea82a8b78 in mono_set_defaults
#12 0x007ffea82a8c18 in mono_set_defaults
#13 0x007ffea82a8c38 in mono_print_thread_dump_from_ctx
#14 0x007ffea82a8cb8 in (Unknown)
#15 0x007ffea82a8cc8 in (Unknown)
#16 0x007ffea82a8cd8 in mono_set_defaults
#17 0x007ffea82a91d8 in mono_runtime_invoke
#18 0x007ffea82a9208 in mono_print_unhandled_exception
#19 0x007ffea82a9318 in mono_method_marked_as_wrapperless
#20 0x007ffea82a95d8 in mono_amd64_throw_exception
#21 0x007ffea82a9798 in (Unknown)


Senacharim

Resolved to my satisfaction, oddly enough by removing some inactive mods.  Weird.

notfood

PSA: RimWorld of Magic (steam only) currently triggers this issue if you kill any pawn.

Mod has been fixed. See below for the culprit.

notfood

This Harmony patch will crash Linux with funlockfile consistently even if it's a return false:

[HarmonyPatch(typeof(DeathActionWorker_Simple), "PawnDied", null)]
public class Undead_DeathActionWorker_Patch
{
    public static bool Prefix(Corpse corpse)
    {
        return true;
    }
}

Multistream

so is there a solution? like installing different linux distro or window manager? If modded rimworld works for anyone, please paste your distro and windows manager here.

notfood

Running 32bits executable is a workaround but that's undesirable.

It's just better to pester the modders that use Harmony into empty methods.

Multistream

I was able to play for ~100 hrs with 300 mods enabled and zero crashes. Huge raids, caravans, everything worked fine. I used Solus Budgie, played 64bit version in fullscreen.

I've had this unhandled exception problem since 1.0 was released, and after I installed solus budgie, it is gone. I have no idea why this happens, I can only assume that one of those reasons might be true:
> Something to do with window composer that solus budgie is using
> Something to do with Linux Steam Integration that is installed and enabled in solus by default. It allows games to use native libraries instead of provided with steam, and allows to use additional libraries. If this reason is the one, it might also have something to do with native libraries from solus being better for rimword.
> All mods (and I am subscribed to almost all popular mods) removed bad harmony patches (unlikely)
> Rimworld update fixed it
> I was extremely lucky (extremely unlikely)
> Something to do with video drivers (because new nvidia drivers for linux were pushed)
> Linux core was updated or an system library or etc
> I am very far from computer expert so anything could be the reason

I've also noticed that windows and linux perfomance were same, unlike older versions, where linux version had significantly lower loading times with huge list of mods

MechanoidHater

I have the same problem but notfood's solution did not help I've removed all mods that have this Harmony patch. The crash happens regardless if I use opengl fix launcher or normal one. It crashes when I make a new game and click on terrain. Using version 1.0.2231 rev1156

Receiving unhandled NULL exception
#0  0x007ffd8747ba80 in funlockfile
#1  0x007ffd8747c108 in psiginfo
#2  0x007ffd8747e278 in psiginfo
#3  0x007ffd8747e7f8 in g_free
#4  0x007ffd8747e8d8 in mono_print_unhandled_exception
#5  0x007ffd8747e9e8 in mono_method_marked_as_wrapperless
#6  0x007ffd8747eca8 in mono_amd64_throw_exception
#7  0x007ffd8747ee68 in (Unknown)
#8  0x007ffd8747ee78 in (Unknown)
#9  0x007ffd8747ee88 in (Unknown)
#10 0x007ffd8747ee98 in (Unknown)
#11 0x007ffd8747eea8 in mono_set_defaults
#12 0x007ffd8747f290 in mono_runtime_invoke
#13 0x007ffd8747f2c0 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#14 0x007ffd8747f2f0 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#15 0x007ffd8747f310 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#16 0x007ffd8747f490 in operator new(unsigned long)
#17 0x007ffd8747f4d0 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std::allocator<core::basic_string<char, core::StringStorageDefault<char> > > >::~vector()
#18 0x007ffd8747f4f0 in zcfree
#19 0x007ffd874802f0 in __libc_start_main
#20 0x007ffd874803b0 in zcfree


UPDATE 20.05.2019:
I was able to get pass that crash by playing around with what mods I'm loading and in what order. The debug log windows pops up with this error constantly showing:

Root level exception in Update(): System.NullReferenceException: Object reference not set to an instance of an object
at RimWorld.NeedsCardUtility.UpdateDisplayNeeds (Verse.Pawn) <0x000c5>
at RimWorld.NeedsCardUtility.DoNeeds (UnityEngine.Rect,Verse.Pawn) <0x00035>
at RimWorld.NeedsCardUtility.DoNeedsMoodAndThoughts (UnityEngine.Rect,Verse.Pawn,UnityEngine.Vector2&) <0x00104>
at (wrapper dynamic-method) Verse.InspectTabBase.TabUpdate_Patch1 (object) <0x00014>
at RimWorld.InspectPaneUtility.UpdateTabs (RimWorld.IInspectPane) <0x000b8>
at RimWorld.Planet.WorldInspectPane.WindowUpdate () <0x00027>
at Verse.WindowStack.WindowsUpdate () <0x00050>
at Verse.UIRoot.UIRootUpdate () <0x0003c>
at Verse.UIRoot_Entry.UIRootUpdate () <0x00014>
at (wrapper dynamic-method) Verse.Root.Update_Patch1 (object) <0x000f9>

Verse.Log:Error(String, Boolean)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()

When I'm loading the new map for the first time the game still crashes with this error:

Receiving unhandled NULL exception
#0  0x007fa3a82d54c0 in funlockfile
#1  0x007fa3a82d5b48 in _IO_str_pbackfail
#2  0x007fa3a82d5b88 in setlinebuf
#3  0x007fa3a82d5cc8 in g_free
#4  0x007fa3a82d5ce8 in g_free
#5  0x007fa3a82d5dd8 in mono_free_bstr
#6  0x007fa3a82d5df8 in mono_type_get_desc
#7  0x007fa3a82d5e28 in mono_signature_get_desc
#8  0x007fa3a82d5e58 in mono_lookup_internal_call
#9  0x007fa3a82d66a8 in mono_upgrade_remote_class_wrapper
#10 0x007fa3a82d6728 in mono_op_to_op_imm_noemul
#11 0x007fa3a82d6a98 in mono_set_defaults
#12 0x007fa3a82d6b78 in mono_set_defaults
#13 0x007fa3a82d6c18 in mono_set_defaults
#14 0x007fa3a82d6c38 in mono_print_thread_dump_from_ctx
#15 0x007fa3a82d6cb8 in (Unknown)
#16 0x007fa3a82d6cc8 in (Unknown)
#17 0x007fa3a82d6cd8 in mono_set_defaults
#18 0x007fa3a82d71d8 in mono_runtime_invoke
#19 0x007fa3a82d7208 in mono_print_unhandled_exception
#20 0x007fa3a82d7318 in mono_method_marked_as_wrapperless
#21 0x007fa3a82d75d8 in mono_amd64_throw_exception
#22 0x007fa3a82d7798 in (Unknown)
#23 0x007fa3a82d77a8 in (Unknown)
#24 0x007fa3a82d77b8 in (Unknown)
#25 0x007fa3a82d77c8 in (Unknown)
#26 0x007fa3a82d77d8 in (Unknown)
#27 0x007fa3a82d77e8 in mono_set_defaults
#28 0x007fa3a82d7dd0 in mono_runtime_invoke
#29 0x007fa3a82d7e00 in mono_thread_create
#30 0x007fa3a82d7e40 in mono_pthread_key_for_tls
#31 0x007fa3a82d7e60 in GC_start_blocking
#32 0x007fa3a82d7f00 in start_thread
#33 0x007fa3a82d7fc0 in clone


[attachment deleted due to age]