raiguard / RecipeBook

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

Error while running event RecipeBook::on_gui_click (ID 1) #149

Closed Uzere closed 3 months ago

Uzere commented 8 months ago

This error happens when I click on some recipes in RecipeBook search results, like chrome plates.

8167.336 Error MainLoop.cpp:1391: Exception at tick 33417157: The mod Recipe Book (3.5.7) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event RecipeBook::on_gui_click (ID 1)
__RecipeBook__/scripts/gui/info/list-box.lua:84: bad argument #1 of 2 to 'lower' (string expected, got nil)
stack traceback:
        [C]: in function 'lower'
        __RecipeBook__/scripts/gui/info/list-box.lua:84: in function 'update'
        __RecipeBook__/scripts/gui/info/index.lua:328: in function 'update_contents'
        __RecipeBook__/scripts/gui/info/index.lua:606: in function 'build'
        __RecipeBook__/scripts/gui/info/actions.lua:136: in function '?'
        __RecipeBook__/scripts/gui/info/index.lua:43: in function 'dispatch'
        __RecipeBook__/control.lua:298: in function 'handle_gui_action'
        __RecipeBook__/control.lua:305: in function 'read_gui_action'
        __RecipeBook__/control.lua:315: in function <__RecipeBook__/control.lua:313>
8167.337 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod Recipe Book (3.5.7) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event RecipeBook::on_gui_click (ID 1)
__RecipeBook__/scripts/gui/info/list-box.lua:84: bad argument #1 of 2 to 'lower' (string expected, got nil)
stack traceback:
        [C]: in function 'lower'
        __RecipeBook__/scripts/gui/info/list-box.lua:84: in function 'update'
        __RecipeBook__/scripts/gui/info/index.lua:328: in function 'update_contents'
        __RecipeBook__/scripts/gui/info/index.lua:606: in function 'build'
        __RecipeBook__/scripts/gui/info/actions.lua:136: in function '?'
        __RecipeBook__/scripts/gui/info/index.lua:43: in function 'dispatch'
        __RecipeBook__/control.lua:298: in function 'handle_gui_action'
        __RecipeBook__/control.lua:305: in function 'read_gui_action'
        __RecipeBook__/control.lua:315: in function <__RecipeBook__/control.lua:313>"
8167.338 Info ServerMultiplayerManager.cpp:816: updateTick(33417157) changing state from(InGame) to(Failed)
8167.345 Quitting: multiplayer error.

8167.581 Info ServerMultiplayerManager.cpp:154: Quitting multiplayer connection.
8167.582 Info ServerMultiplayerManager.cpp:816: updateTick(4294967295) changing state from(Failed) to(Closed)

mods are mostly https://mods.factorio.com/mod/SeaBlockMetaPack - https://gist.github.com/Uzere/3a8c4bc27efaa0706b5a142275093620

raiguard commented 8 months ago

I have gotten this same crash report so many times but have never been able to reproduce it. As far as I can tell, the flib-supplied translation for something is just missing. I would greatly appreciate a save file and consistent reproduction steps so I can figure out the root issue instead of applying a band-aid solution.

Yecgaa1 commented 7 months ago

I had the same problem on the server side, but in particular, he wouldn 't crash when I was running locally in the same configuration ( same saves and mod version ). Here 's my log

○ 0,20:03:46.450: gui.on_gui_click Left bob-logistics 

○ 0,20:03:56.200: gui.on_gui_click Left  

○ 0,20:04:01.733: gui.on_gui_click Left angels-components 

○ 0,20:04:08.216: gui.on_gui_click Left  

○ 0,20:04:13.200: gui.on_gui_click Left  

○ 0,20:04:19.200: gui.on_gui_click Left  

1444.063 Error MainLoop.cpp:1391: Exception at tick 4335552: The mod Recipe Book (3.5.7) caused a non-recoverable error.

Please report this error to the mod author.

Error while running event RecipeBook::on_gui_click (ID 1)

__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/gui/info/list-box.lua:95: in function 'update'

    __RecipeBook__/scripts/gui/info/index.lua:328: in function 'update_contents'

    __RecipeBook__/scripts/gui/info/actions.lua:138: in function '?'

    __RecipeBook__/scripts/gui/info/index.lua:43: in function 'dispatch'

    __RecipeBook__/control.lua:298: in function 'handle_gui_action'

    __RecipeBook__/control.lua:305: in function 'read_gui_action'

    __RecipeBook__/control.lua:315: in function <__RecipeBook__/control.lua:313>

1444.063 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod Recipe Book (3.5.7) caused a non-recoverable error.

Please report this error to the mod author.

Error while running event RecipeBook::on_gui_click (ID 1)

__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/gui/info/list-box.lua:95: in function 'update'

    __RecipeBook__/scripts/gui/info/index.lua:328: in function 'update_contents'

    __RecipeBook__/scripts/gui/info/actions.lua:138: in function '?'

    __RecipeBook__/scripts/gui/info/index.lua:43: in function 'dispatch'

    __RecipeBook__/control.lua:298: in function 'handle_gui_action'

    __RecipeBook__/control.lua:305: in function 'read_gui_action'

    __RecipeBook__/control.lua:315: in function <__RecipeBook__/control.lua:313>"

1444.063 Info ServerMultiplayerManager.cpp:814: updateTick(4335552) changing state from(InGame) to(Failed)

1444.063 Quitting: multiplayer error.

1444.628 Info ServerMultiplayerManager.cpp:154: Quitting multiplayer connection.

1444.628 Info ServerMultiplayerManager.cpp:814: updateTick(4294967295) changing state from(Failed) to(Closed)

1444.630 Info UDPSocket.cpp:233: Closing socket

1444.630 Info UDPSocket.cpp:263: Socket closed

1444.630 Info UDPSocket.cpp:233: Closing socket
1444.845 Info UDPSocket.cpp:233: Closing socket
1444.845 Info UDPSocket.cpp:263: Socket closed
1444.846 Goodbye
Yecgaa1 commented 7 months ago

I am sorry that the conclusion has just been wrong, the archiving progress is the same, and there is no problem in the first test run. Then I load the archive onto the server. After saving, the error can be triggered ( my trigger is to view the wood material ). Even if I download the archive back to the local operation, it can also be triggered in the same way. So I come to two conclusions : 1.This error is related to the process of loading and saving the server. 2.This error is related to the data in the archive

raiguard commented 7 months ago

I'm aiming to complete Recipe Book 4 by the end of January, so hopefully we won't have to deal with this for that much longer. RB4 won't have this issue.

raiguard commented 3 months ago

This should be fixed in the latest version of flib (Factorio Library).