blt4linux / blt4l

PAYDAY 2 SteamOS/Linux LUA loader.
Other
57 stars 14 forks source link

Mod crashes on Linux but not Windows version #39

Closed polarathene closed 7 years ago

polarathene commented 8 years ago

Working on my BigLobby mod, I disabled the filter(only lobbies with the mod) so I can join regular lobbies. This works fine on Windows PD2 via Wine, Linux however with blt4l joining the lobby crashes the game.

As it's a large mod, any idea of finding the cause outside my lua mod? Since it works fine on Windows it's presumably either something to do with linux version of PD2 or blt4l hit a snag?

Disabling the mod I can join regular lobbies just fine. I'm running Manjaro(Arch) 64-bit with XFS filesystem.

Ozymandias117 commented 7 years ago

I was looking into how to run BigLobby to try to reproduce it and see where the crash is happening, but I'm not even entirely clear how you're running it on Linux currently.

Are you just pointing the Windows "Bundle Modder" at the Linux assets folder? Additionally, I didn't see any option about disabling the lobby filter in the BigLobby dev or master branch. Is this just something you have locally?

If you want to try running Payday through gdb and getting a backtrace (Or, since I think Arch uses systemd-coredump, you might be able to just get the backtrace from a coredump you already have). Depending on the issue, that may make it apparent.

polarathene commented 7 years ago

Tracked it down pdmod being enabled on Windows and not on Linux as well as conditional logic in my mod running code I was expecting it not to. So false positive, nothing to do with either blt.

-- Store original functions from the ones we modify
local orig_NetworkPeer = {
    send = NetworkPeer.send
}

function NetworkPeer:send(func_name, ...)
    -- In biglobby mode if the func is matched, call the prefixed version instead
    if not BigLobbyGlobals:is_small_lobby() and BigLobbyGlobals.network_handler_funcs[func_name] then
        func_name = 'biglobby__' .. func_name
    end

    -- Call Original Code
    orig_NetworkPeer.send(self, func_name, ...)
end

BigLobbyGlobals:is_small_lobby() had the condition commented out to always return false. So joining a regular lobby tried to use the biglobby__ alternative methods, I had the pdmod with those methods disabled on Linux but enabled on Windows(thought it was disabled but I was mistaken).

polarathene commented 7 years ago

Are you just pointing the Windows "Bundle Modder" at the Linux assets folder?

No there is a Linux release of Bundle Modder. I had tried the Windows version in the past with Wine but I think it was incompatible.

I didn't see any option about disabling the lobby filter in the BigLobby dev or master branch. Is this just something you have locally?

It's a feature I was working on a while a go, but I had hardcoded it not to allow regular lobbies until I got it working better. Code above gives you an idea how it worked. I am doing local development on it again however.

If you want to try running Payday through gdb and getting a backtrace (Or, since I think Arch uses systemd-coredump, you might be able to just get the backtrace from a coredump you already have). Depending on the issue, that may make it apparent.

Will that provide useful stack traces on crash like Windows version provides? Linux doesn't provide this which makes it painful to debug some crashes whereas the Windows crashlog would point to a function usually that it happened.