ClaudeMetz / FactoryPlanner

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

Crash on multiplayer server when deleting factories quickly #291

Open blargh2015 opened 1 month ago

blargh2015 commented 1 month ago

Problem Description

I was cleaning up a long list of factories in my factory planner by rapidly clicking the delete button for them. After I had ran out of factories, the server crashed with:

Error while running event factoryplanner::on_gui_click (ID 1) factoryplanner/ui/main/factory_list.lua:279: attempt to index local 'factory' (a nil value) stack traceback: factoryplanner/ui/main/factory_list.lua:279: in function 'handler' factoryplanner/ui/event_handler.lua:157: in function <factoryplanner/ui/event_handler.lua:114>"

Reproduction

  1. Be in a multiplayer game (at least for when I did it)
  2. Have a lot of factories defined (in my case I had about 20 or so).
  3. Click the delete button a lot of times quickly.
  4. Server crashed (although clients didn't).