devdot / dqol-resource-monitor

0 stars 1 forks source link

Error when mod that add ressource get removed from a game. #3

Closed Stargateur closed 1 week ago

Stargateur commented 2 months ago

Played with deep core mining, remove it from mod, launch game again, crash cause monitor try to access a deleted thing. Don't know if you want to handle such barbaric behavior of removing a resource mod.

  74.665 Error MainLoop.cpp:1404: Exception at tick 4254840: The mod Resource Monitor (1.1.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event dqol-resource-monitor::on_nth_tick(60)
__dqol-resource-monitor__/components/ui/menu.lua:642: attempt to index field '?' (a nil value)
stack traceback:
    __dqol-resource-monitor__/components/ui/menu.lua:642: in function 'getSites'
    __dqol-resource-monitor__/components/ui/dashboard.lua:36: in function 'update'
    __dqol-resource-monitor__/components/ui/dashboard.lua:91: in function <__dqol-resource-monitor__/components/ui/dashboard.lua:89>
devdot commented 1 week ago

Long time no reply, but this is an interesting issue. I don't really see many people encountering this, but I've added a fix anyways because it was simple to do. Will be fixed in 1.2.4