raiguard / RecipeBook

Recipe Book for Factorio.
MIT License
20 stars 9 forks source link

(Non-Recoverable) Error while running event RecipeBook::on_load() #112

Closed uberdubersoldat closed 2 years ago

uberdubersoldat commented 2 years ago

Describe the Bug

Error while running event RecipeBook::on_load() - Save File cannot load and you're returned to the main menu with the error message Log details:

The mod Recipe Book (3.3.3) caused a non-recoverable error. Please report this error to the mod author.

Error while running event RecipeBook::on_load() RecipeBook/scripts/gui/info/index.lua:616: bad argument #1 of 3 to 'setmetatable' (table expected, got number) stack traceback: [C]: in function 'setmetatable' RecipeBook/scripts/gui/info/index.lua:616: in function 'load' RecipeBook/control.lua:207: in function <RecipeBook/control.lua:187>

To Reproduce

Steps to reproduce the behavior:

  1. Start on previous version of mod (Recipe Book 3.1.5 and K2 1.1.6, among others)
  2. Create a Save File with content in K2 / Recipe Book (see attached save)
  3. Update Mods to current versions (e.g. Recipe Book 3.3.3 and K2 1.2.25, among others)
  4. Load Save File
  5. See error - save file cannot load

Note: There's many other mods included in this save file, but all of them were previously working together successfully after a mod update. I am unsure which mod in specific might be causing a conflict, but I presume it's either K2 or RecipeBook.

Save file & Username

Username: UberDuberSoldat

Save File: (26.5MB google drive link) https://drive.google.com/file/d/1CN4YApY-qEMQ3X7zp4aQqNA5xNfLDVxE/view?usp=sharing

Log file

factorio-current.log

uberdubersoldat commented 2 years ago

If I disable the RecipeBook mod and load the save state, it mentions migration of the following recipes and removed technologies. I presume this might be related to the source of the error migratedcontent

uberdubersoldat commented 2 years ago

Previously, I played in November of 2021, and recently started up again, so this might be a common user path for users of both K2 and Recipe book and that gap in versioning.

uberdubersoldat commented 2 years ago

It looks like I'm able to load the save state after solving the merge conflict above ^. Once you disable the RecipeBook Mod, load the save state, confirm the migrated content merge, re-save it, then go back to the main menu and re-enable the Recipe Book Mod, then I can successfully load my new save file. After this I had to re-add the Recipe Book button to my tool bar to add the content as well.

So this workaround enables me to keep playing with the current versions.