ClaudeMetz / FactoryPlanner

A mod for Factorio. Allows you to plan out your production in detail.
https://mods.factorio.com/mod/factoryplanner
MIT License
86 stars 43 forks source link

Set Product Amount Crash #298

Open chris67x opened 4 months ago

chris67x commented 4 months ago

Problem Description

Setting product amount of any recipe within a factory plan crashes the mod on submit button click. 100% Reproducable.

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

Error while running event factoryplanner::Custom event (ID 254)
__factoryplanner__/ui/main/production_handler.lua:220: attempt to perform arithmetic on field 'percentage' (a nil value)
stack traceback:
    __factoryplanner__/ui/main/production_handler.lua:220: in function '?'
    __factoryplanner__/ui/dialogs/generic_dialogs.lua:211: in function 'dialog_close'
    __factoryplanner__/ui/base/modal_dialog.lua:187: in function 'exit'
    __factoryplanner__/ui/event_handler.lua:216: in function <__factoryplanner__/ui/event_handler.lua:189>
    [C]: in function 'raise_event'
    __factoryplanner__/util/raise.lua:27: in function 'close_dialog'
    __factoryplanner__/ui/event_handler.lua:54: in function 'special_handler'
    __factoryplanner__/ui/event_handler.lua:133: in function <__factoryplanner__/ui/event_handler.lua:114>
stack traceback:
    [C]: in function 'raise_event'
    __factoryplanner__/util/raise.lua:27: in function 'close_dialog'
    __factoryplanner__/ui/event_handler.lua:54: in function 'special_handler'
    __factoryplanner__/ui/event_handler.lua:133: in function <__factoryplanner__/ui/event_handler.lua:114>

Reproduction

With existing factory plan created, Trying to change the set product amount of any recipe crashes the mod without saving the game state.