yafc icon indicating copy to clipboard operation
yafc copied to clipboard

[BUG] IndexOutOfRangeException on the milestone editor

Open Akronymus-git opened this issue 2 years ago • 6 comments

Reproduction step: Remove one item from the milestone editor then click auto sort milestones. Version v0.5.8.0 OS: Windows 10

Stacktrace:

Index was outside the bounds of the array.

at YAFC.Model.Milestones.ComputeWithParameters(Project project, ErrorCollector warnings, FactorioObject[] milestones, Boolean autoSort) in C:\projects\YAFC\YAFCmodel\Analysis\Milestones.cs:line 145 at YAFC.MilestonesEditor.Build(ImGui gui) in C:\projects\YAFC\YAFC\Windows\MilestonesEditor.cs:line 67 at YAFC.UI.ImGui.DoGui(ImGuiAction action) in C:\projects\YAFC\YAFCui\ImGui\ImGuiBuilding.cs:line 182 at YAFC.UI.ImGui.MouseUp(Int32 button) in C:\projects\YAFC\YAFCui\ImGui\ImGuiBuilding.cs:line 257 at YAFC.UI.InputSystem.MouseUp(Int32 button) in C:\projects\YAFC\YAFCui\Core\InputSystem.cs:line 163 at YAFC.UI.Ui.ProcessEvents() in C:\projects\YAFC\YAFCui\Core\Ui.cs:line 100

Akronymus-git avatar May 19 '22 11:05 Akronymus-git

Thanks for the report, I will check it. Unfrtunately, due to rl issues, the development is now slow.

ShadowTheAge avatar Jun 27 '22 16:06 ShadowTheAge

@ChristophGra I can't reproduce this in either 0.5.8 or master. What mods and milestones were you using?

DaleStan avatar Jul 10 '22 17:07 DaleStan

mod-list.txt

My mods. And no particular milestone.

Akronymus-git avatar Jul 11 '22 07:07 Akronymus-git

I still can't reproduce this. I deleted several milestones with no issues. Will you attach a new save instead, please? Also, will you attach a YAFC file if it doesn't happen in an empty project?

DaleStan avatar Jul 13 '22 05:07 DaleStan

https://www.youtube.com/watch?v=JozPXezP-xY project.txt the .yafc file, but renamed as .txt because otherwise I cant upload it. debug_save.zip the save

Akronymus-git avatar Jul 13 '22 05:07 Akronymus-git

I can reproduce this now, but fixing it turned out to be beyond me. Something's weird about your selection of milestones, but that's all I can say for sure.

DaleStan avatar Jul 15 '22 11:07 DaleStan