To reproduce:
1. Install my local mod versions, in addition to what you can download from the portal.
2. Try loading the save.
Alas, I didn't think to save the original log, so all you get is a log of me launching Factorio and trying to load the save. FWIW, all three of my autosaves are broken like this, so, whatever it is, it happened more than 10 minutes before this save was made.
[1.1.109] Crash on creating Lua context when loading a save
[1.1.109] Crash on creating Lua context when loading a save
- Attachments
-
- factorio-current.log
- (24.86 KiB) Downloaded 64 times
-
- _autosave3.zip
- (11.03 MiB) Downloaded 48 times
Last edited by curiosity on Wed Aug 14, 2024 10:06 pm, edited 1 time in total.
Re: [1.1.109] Crash on creating Lua context when loading a save
What I would like to know is what in the mod data is causing the crash, so hopefully I could do something about it. I tried GDB, but it's impenetrable. GDB is not intended to be used without source code. Based on 12 downloads, I assume that someone has looked at this.
-
- Filter Inserter
- Posts: 330
- Joined: Thu Jun 01, 2017 12:05 pm
- Contact:
Re: [1.1.109] Crash on creating Lua context when loading a save
Possibly just curious people like me. Anyways, I'm on Arch Linux and confirm the issue. It works if you remove the "factoryplanner-curiosity" mod, and crashes if you have ONLY the "factoryplanner-curiosity" mod.
Figuring out what crashes is easy, you just remove stuff until it works, pinpointing the exactly line it fails at.
Stack trace in lua is
- control.lua:3 - require("__factoryplanner-curiosity__/data/init.lua")
- data/init.lua:6 - Player = require('__factoryplanner-curiosity__/classes/model/Player.lua')
- classes/model/Player.lua:7 - local Library = require('__factoryplanner-curiosity__/classes/model/Library.lua')
- classes/model/Library.lua:6 - local Notifier = require('__factoryplanner-curiosity__/classes/Notifier.lua')
- classes/Notifier.lua:5 - local WeakTable = require('__factoryplanner-curiosity__/classes/WeakTable')
- classes/WeakTable:4 - script.register_metatable('WeakKeyTable', wk_mt)
- Crash in factorio code
I don't know anything about metatables, so I can't help. I don't have source access either, so you probably need a dev to have a look.
Re: [1.1.109] Crash on creating Lua context when loading a save
Issue was identified and is fixed for 2.0.
Please do not use weak tables inside of `global` (classes/Notifier.lua, Notifier.subscribe calls WeakTable.with_keys())
Please do not use weak tables inside of `global` (classes/Notifier.lua, Notifier.subscribe calls WeakTable.with_keys())
Re: [1.1.109] Crash on creating Lua context when loading a save
In 2.0 it will work fine with weak tables. Not using weak tables in 1.1 is just a workaround.