raiguard / RecipeBook

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

Recipe book Crash #132

Closed Brickcaster closed 1 year ago

Brickcaster commented 1 year ago

Description

Got an error while trying to look up robot frame in Nullius. I did not change any prototypes without changing the mod version.

image

I was able to recreate it by opening recipe book search (ctrl-b) and typing "robot " (did not press enter or click the button) in a multiplayer game, but I was not able to recreate it when I loaded an single player save from a few hours prior.

Reproduction

No response

Brickcaster commented 1 year ago

The host gave me the save file and it happened again in single player. I loaded this, opened recipe book, typed "robot " and it happened again

https://drive.google.com/u/0/uc?id=1KQJW9N_Po5i1ugGanFMFIiE5Tv3XbnLi&export=download

ZwerOxotnik commented 1 year ago

Same error message:

4224.452 Info MatchingServer.cpp:124: Matching server game `15599591` has been created.
4224.453 Info ServerMultiplayerManager.cpp:745: Matching server connection resumed
4241.222 Error MainLoop.cpp:1382: Exception at tick 9583432: The mod Recipe Book (3.5.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event RecipeBook::Custom event (ID 239)
__RecipeBook__/scripts/formatter.lua:60: attempt to concatenate local 'inner' (a nil value)
stack traceback:
    __RecipeBook__/scripts/formatter.lua:60: in function 'rich_text'
    __RecipeBook__/scripts/formatter.lua:276: in function 'get_base_tooltip'
    __RecipeBook__/scripts/formatter.lua:566: in function <__RecipeBook__/scripts/formatter.lua:534>
    (...tail calls...)
    __RecipeBook__/scripts/formatter.lua:120: in function '?'
    __RecipeBook__/scripts/formatter.lua:350: in function 'get_tooltip_deets'
    __RecipeBook__/scripts/formatter.lua:582: in function <__RecipeBook__/scripts/formatter.lua:534>
    (...tail calls...)
    __RecipeBook__/scripts/gui/util.lua:88: in function 'update_list_box'
    __RecipeBook__/scripts/gui/search/index.lua:258: in function 'update_history'
    __RecipeBook__/scripts/gui/search/index.lua:501: in function 'build'
    __RecipeBook__/control.lua:255: in function <__RecipeBook__/control.lua:240>
    [C]: in function 'raise_event'
    __flib__/dictionary-lite.lua:366: in function <__flib__/dictionary-lite.lua:314>
stack traceback:
    [C]: in function 'raise_event'
    __flib__/dictionary-lite.lua:366: in function <__flib__/dictionary-lite.lua:314>
4241.223 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod Recipe Book (3.5.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event RecipeBook::Custom event (ID 239)
__RecipeBook__/scripts/formatter.lua:60: attempt to concatenate local 'inner' (a nil value)
stack traceback:
    __RecipeBook__/scripts/formatter.lua:60: in function 'rich_text'
    __RecipeBook__/scripts/formatter.lua:276: in function 'get_base_tooltip'
    __RecipeBook__/scripts/formatter.lua:566: in function <__RecipeBook__/scripts/formatter.lua:534>
    (...tail calls...)
    __RecipeBook__/scripts/formatter.lua:120: in function '?'
    __RecipeBook__/scripts/formatter.lua:350: in function 'get_tooltip_deets'
    __RecipeBook__/scripts/formatter.lua:582: in function <__RecipeBook__/scripts/formatter.lua:534>
    (...tail calls...)
    __RecipeBook__/scripts/gui/util.lua:88: in function 'update_list_box'
    __RecipeBook__/scripts/gui/search/index.lua:258: in function 'update_history'
    __RecipeBook__/scripts/gui/search/index.lua:501: in function 'build'
    __RecipeBook__/control.lua:255: in function <__RecipeBook__/control.lua:240>
    [C]: in function 'raise_event'
    __flib__/dictionary-lite.lua:366: in function <__flib__/dictionary-lite.lua:314>
stack traceback:
    [C]: in function 'raise_event'
    __flib__/dictionary-lite.lua:366: in function <__flib__/dictionary-lite.lua:314>"
4241.223 Info ServerMultiplayerManager.cpp:813: updateTick(9583432) changing state from(InGame) to(Failed)

Simply loaded a save, but when it translated at 99% it crashed with the error. It didn't translate fully before loading the save and I wasn't the host when I saved the game.

raiguard commented 1 year ago

I'm not able to reproduce this. Does triggering a configuration change (control+click the load button) fix the issue?

ZwerOxotnik commented 1 year ago

Unfortunately, Factorio doesn't sync versions of mods for saves properly. It triggers another event which resets some data and doesn't cause the issue again, so I don't know how to provide stuff properly. (My current versions of mods doesn't cause the issue right now and syncing in saves doesn't help to load previous versions of mods)

raiguard commented 1 year ago

In that case, I'll go ahead and close this. Both issues are almost guaranteed to be related to the on_load info caching, and is the primary reason why I am rewriting the mod from scratch. This shouldn't be an issue in 4.0.