Skip to content
Snippets Groups Projects

Hotfix for "LUA PANIC" crash when joining a netgame

Merged Monster Iestyn requested to merge lua-archive-crash-hotfixes into next

Turns out that it's possible to cause Lua to panic by setting a function, thread or light userdata (or otherwise unrecognised data type) as a table's key. When the server tries to write one of these data types to the $$$.sav for someone joining the netgame, these are instead written as nil type. At the other end, for the person joining the netgame, a "LUA PANIC" crash occurs because of a table key being nil when fed into lua_rawset (a function that actually sets table[key] = value for a particular table).

Now, you just get a bunch of console errors for both the server and joiners, to alert both somebody goofed up a Lua script by using any of those unaccepted key types. (Or perhaps corrupted the savegame) But the game should run fine otherwise, not crash.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading