renoth / factorio-factory-levels

MIT License
6 stars 3 forks source link

Crash when activating mod on existing save #61

Closed ololduck closed 2 hours ago

ololduck commented 3 hours ago

Hi, I wanted to have a look at this mod, because i like the idea of self-improving hardware. However, when loading the mod, the following error occurred:

image

Here's the text version for convenience:

The mod Factory Levels (0.7.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event factory-levels::on_runtime_mod_setting_changed (ID 63)
Invalid ItemID: expected LuaItemPrototype, LuaItemStack, LuaItem or string.
stack traceback:
    [C]: in function 'insert'
    __factory-levels__/control.lua:347: in function 'insert_inventory_contents'
    __factory-levels__/control.lua:415: in function 'upgrade_factory'
    __factory-levels__/control.lua:439: in function 'replace_machines'
    __factory-levels__/control.lua:31: in function 'get_built_machines'
    __factory-levels__/control.lua:553: in function <__factory-levels__/control.lua:550>

It is not a blocking issue, as my old savegame, without the mod active, loads fine.

Context of the crash

I've looked at the other opened issues, and although they present a similar issue, in my error message, the line numbers are different.

How to reproduce

Loading the game with the Factory Levels mod enabled. The popup appears immediately after load. I'm not sure, but maybe i can send you my save file(s)?

I tried to reproduce it on a new save, but whatever i did, i could not reproduce it. I may be missing something.

renoth commented 2 hours ago

Please try 0.7.7

ololduck commented 2 hours ago

Well, it actually works! Well done and thank you!

IG2WTC commented 2 hours ago

0.7.7 seems to have also fixed it for me! Thank you so much!