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

GUI crash when frenzly navigating the GUIs #310

Open RedRafe opened 3 months ago

RedRafe commented 3 months ago

Problem Description

Game crashed while quickly opening/closing windows of Factory Planner. I guess it tried to reference a tab that was no longer open at https://github.com/ClaudeMetz/FactoryPlanner/blob/fdb119863dd62a7a99869eaf362f63856c3fda47/modfiles/ui/main/production_handler.lua#L168.

Error while running event factoryplanner::on_gui_click (ID 1)
__factoryplanner__/ui/main/production_handler.lua:168: attempt to index field 'parent' (a nil value)
stack traceback:
    __factoryplanner__/ui/main/production_handler.lua:168: in function 'handler'
    __factoryplanner__/ui/event_handler.lua:157: in function <__factoryplanner__/ui/event_handler.lua:114>
11829.926 Info BlueprintShelf.cpp:724: Saving blueprint storage.

Log file: fp_crash.log

Reproduction

I was probably editing the modules to select, closed the window, reopened the whole planner, and crash.

ClaudeMetz commented 3 months ago

https://discord.com/channels/600791114814980141/600791114831757416/1255475875273773106