ChrislyBear-GH / Factorio-BotPrioritizer

MIT License
3 stars 1 forks source link

Crash when reprioritizing tiles marked for deconstruction #2

Closed King-of-Blades closed 3 years ago

King-of-Blades commented 3 years ago

Noticed in a modded K2/SE game, reproducible in vanilla + bot prioritizer only. Happens 100% of the time when auto-mode is on and you mark tiles for deconstruction, regardless of if you're in a roboport's range or only your personal port's range.

Error while running event BotPrioritizer::on_tick (ID 0)
__BotPrioritizer__/history.lua:28: table index is nil
stack traceback:
__BotPrioritizer__/history.lua:28: in function 'add_to_history'
__BotPrioritizer__/control.lua:96: in function 'reprioritize'
__BotPrioritizer__/control.lua:163: in function 'no_tool'
__BotPrioritizer__/control.lua:209: in function <__BotPrioritizer__/control.lua:200>

Factorio 1.1.14 (Also happened in 1.1.13)

ChrislyBear-GH commented 3 years ago

I cannot reproduce it. When I try to deconstruct tiles it works. I need more information to fix this. What exactly are you doing? Do you deconstruct things in your personal roboport range? In any roboport range? Do you run over, so the deconstructed tiles only come in range a little after you've marked them for deconstruction?

I think the best way would be if you could send me a savegame where this is happening and instructions which steps I have to do to make it crash. Could you send me one via wetransfer.com or a similar file sharing service?

King-of-Blades commented 3 years ago

Here's a fresh save made to demonstrate the crash.

https://we.tl/t-M1zIKDR6T5

image

Load the save, mark the concrete next to you for deconstruction, instant crash.

image

Happens regardless of whether robots exist in a roboport, whether it's under roboport coverage from a building. It occurs whenever a deconstruct order begins to be carried out by a personal bot, whether you're in range when you mark it for deconstruction or out of range and run towards it.

ChrislyBear-GH commented 3 years ago

Thank you for your effort! This helped tremendously to fix the issue. Already uploaded the fix to the mod portal with v0.2.3.

Cheers!