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 when changing interface height #252

Open heinwessels opened 5 months ago

heinwessels commented 5 months ago

Problem Description

Haven't played this save in a long time, so I updated all my mods. Not really sure if Factory Planner was updated, but now my FP window was too small. It wasn't last time I played, I think. Maybe I played on a different screen. So I was trying to make it bigger.

image

I went into preferences,changed the interface height, and clicked on the red x. And crash!

1701.401 Error MainLoop.cpp:1391: Exception at tick 8593836: 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 271)
LuaGuiElement API call when LuaGuiElement was invalid.
stack traceback:
    [C]: in function '__index'
    __factoryplanner__/ui/base/main_dialog.lua:147: in function 'set_pause_state'
    __factoryplanner__/ui/base/main_dialog.lua:109: in function 'rebuild'
    __factoryplanner__/ui/dialogs/preferences_dialog.lua:341: 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/base/modal_dialog.lua:285: in function 'handler'
    __factoryplanner__/ui/event_handler.lua:157: 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/base/modal_dialog.lua:285: in function 'handler'
    __factoryplanner__/ui/event_handler.lua:157: in function <__factoryplanner__/ui/event_handler.lua:114>

Thanks for the awesome mod though! For now I will just play with the tiny UI :)

Reproduction

This is currently consistently reproducable for me using the save file attached and these steps:

  1. Open Factory Planner (using Ctrl-R)
  2. Preferences
  3. Set Interface height to 22 rows.
  4. Click on x
  5. Crash!

Bobs and Angels 2022.zip factorio-current.log