Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] FreeBSD compatibility #659

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Krush206
Copy link

Some small adjustments for compatibility with FreeBSD systems. The game loads, but crashes upon hosting a LAN server.

Assertion failed: ((idx <= 255 + 1) && "upvalue index too large"), function index2addr, file lapi.c, line 76.
Abort (core dumped)

Result is identical for both, GCC and Clang.

@Krush206
Copy link
Author

This is done. Can confirm Lua is working and SIGSEGV is eliminated.

NOTE: Discord and CoopNet aren't included. I displaced CoopNet with ZeroTier One, and Discord's SDK doesn't generate a valid FreeBSD executable.

@Isaac0-dev
Copy link
Collaborator

why did you change Lua version?

@Krush206
Copy link
Author

Unlike Lua 5.3.5, Lua 5.4.7 doesn't throw the

Assertion failed: ((idx <= 255 + 1) && "upvalue index too large"), function index2addr, file lapi.c, line 76.
Abort (core dumped)

error. Updating is what solved the issue, though I wonder the error lies in luaconf.h. Haven't spent much time messing luaconf.h.

I played a full co-op game without crashes and issues. Lua 5.4.7 loads and runs scripts as expected.

@Isaac0-dev
Copy link
Collaborator

honestly I'd like to update to Lua 5.4, I'm just skeptical about it i guess. I'll have a look at what may have changed in 5.4 that needs to be considered while updating.

Copy link
Collaborator

@Isaac0-dev Isaac0-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done some testing and it seems that Lua 5.4 works, but has a few strange bugs that make some mods incompatible.
This means we're better off not updating to 5.4 on all platforms, but if this is the only fix that can be found for freebsd, its fine for just this platform for now.
But, please don't add the unnecessary header files that coop doesn't use

@theclashingfritz
Copy link
Collaborator

It's weird that FreeBSD has these issues-Switch doesn't seem to and it's kernal is BSD based at the least. Even if it's very customized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants