raiguard / RecipeBook

Recipe Book for Factorio.
MIT License
21 stars 10 forks source link

Crash when searching for a recipe #80

Closed Eldrinn-Elantey closed 3 years ago

Eldrinn-Elantey commented 3 years ago

Describe the Bug

I opened the mod menu and started looking for recipes related to uranium.

To Reproduce

I typed the word and immediately there was a crash.

Save file & Username

Username: Eldrinn

Save file: https://yadi.sk/d/bEl_uN4k6VHuuQ

Log file

factorio-current.log


Пожалуйста, сообщите об этой ошибке автору мода.

Error while running event RecipeBook::on_tick (ID 0)
__RecipeBook__/scripts/formatter.lua:511: attempt to concatenate field 'after' (a nil value)
stack traceback:
    __RecipeBook__/scripts/formatter.lua:511: in function <__RecipeBook__/scripts/formatter.lua:484>
    (...tail calls...)
    __RecipeBook__/scripts/formatter.lua:103: in function '?'
    __RecipeBook__/scripts/formatter.lua:326: in function 'get_tooltip_deets'
    __RecipeBook__/scripts/formatter.lua:534: in function <__RecipeBook__/scripts/formatter.lua:484>
    (...tail calls...)
    __RecipeBook__/scripts/gui/search/actions.lua:220: in function '?'
    __RecipeBook__/scripts/gui/search/index.lua:11: in function 'handle_action'
    __RecipeBook__/control.lua:175: in function 'handle_gui_action'
    __RecipeBook__/control.lua:360: in function <__RecipeBook__/control.lua:353>```
raiguard commented 3 years ago

While I have no clue how this could have happened normally, I've applied a band-aid for the next version. In this case, it'll show the prototype name instead of crashing.