Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] Crash after repair / repair glitch #349

Closed
orgi opened this issue Mar 19, 2023 · 10 comments
Closed

[Bug report] Crash after repair / repair glitch #349

orgi opened this issue Mar 19, 2023 · 10 comments
Assignees
Labels
bug Something isn't working fixed in code or data Fixed in code/data but not released yet v1.8

Comments

@orgi
Copy link
Sponsor

orgi commented Mar 19, 2023

Describe the bug
After a fight ("Huegelhoehlen"), I ended up with two broken magical throwing axe's (if that is the english translation).

Then I used a scroll (not a spell) to repair one of those. Game crashed . After the crash, using the backup save game, the axe was repaired but the scroll was not used :)

Same later on for reparing the 2nd axe.

Crash Stack Trace:

Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at Ambermoon.UI.Layout.GetItemSlotPosition(ItemSlot itemSlot)
   at Ambermoon.Game.<>c__DisplayClass553_0.<ApplySpellEffect>g__PlayItemMagicAnimation|1(Action animationFinishAction)
   at Ambermoon.Game.<>c__DisplayClass553_0.<ApplySpellEffect>b__5()
   at Ambermoon.Game.Cast(Action action, Action finishAction, Action failAction, Boolean checkFail)
   at Ambermoon.Game.<>c__DisplayClass553_0.<ApplySpellEffect>g__Cast|0(Action action, Action finishAction, Action failAction)
   at Ambermoon.Game.ApplySpellEffect(Spell spell, Character caster, ItemSlot itemSlot, Action finishAction, Boolean checkFail)
   at Ambermoon.Game.<>c__DisplayClass603_0.<UseSpell>g__TargetItemPicked|13(ItemGrid itemGrid, Int32 slotIndex, ItemSlot itemSlot)
   at Ambermoon.Game.FinishPickingTargetInventory(ItemGrid itemGrid, Int32 slotIndex, ItemSlot itemSlot)
   at Ambermoon.UI.Layout.<TargetInventoryPlayerSelected>g__FinishPickingTargetItem|258_0(ItemGrid itemGrid, Int32 slotIndex, ItemSlot itemSlot)
   at Ambermoon.UI.ItemGrid.Click(Position position, DraggedItem draggedItem, ItemAction& itemAction, MouseButtons mouseButtons, CursorType& cursorType, Action`1 dragHandler, KeyModifiers keyModifiers)
   at Ambermoon.UI.Layout.Click(Position position, MouseButtons buttons, CursorType& cursorType, UInt32 currentTicks, Boolean pickingNewLeader, Boolean pickingTargetPlayer, Boolean pickingTargetInventory, KeyModifiers keyModifiers)
   at Ambermoon.Game.OnMouseDown(Position position, MouseButtons buttons, KeyModifiers keyModifiers)
   at Ambermoon.GameWindow.Mouse_MouseDown(IMouse mouse, MouseButton button)
   at Silk.NET.Input.Internals.MouseImplementationBase.HandleMouseDown(IMouse mouse, MouseButton button)
   at Silk.NET.Input.Glfw.GlfwMouse.<Subscribe>b__36_2(WindowHandle* _, MouseButton btn, InputAction action, KeyModifiers mods)
   at Silk.NET.Input.Glfw.GlfwEvents.<.ctor>b__0_2(WindowHandle* a, MouseButton b, InputAction c, KeyModifiers d)
   at Silk.NET.GLFW.Glfw.PollEvents()
   at Silk.NET.Windowing.Internals.ViewImplementationBase.Silk.NET.Windowing.IView.DoEvents()
   at Silk.NET.Windowing.WindowExtensions.<>c__DisplayClass2_0.<Run>b__0()
   at Silk.NET.Windowing.Internals.ViewImplementationBase.Run(Action onFrame)
   at Silk.NET.Windowing.WindowExtensions.Run(IView view)
   at Ambermoon.GameWindow.Run(Configuration configuration)
   at Ambermoon.Program.Main()
Press return to exit

Desktop (please complete the following information):

  • OS: Win11
  • Version: 1.17
@orgi orgi added the bug Something isn't working label Mar 19, 2023
@Pyrdacor
Copy link
Owner

Thanks for reporting. I will have a look at this soon.

@Pyrdacor Pyrdacor added the v1.8 label Mar 19, 2023
@orgi
Copy link
Sponsor Author

orgi commented Mar 20, 2023

Just wanted to let you know: This issue seems to be easy to reproduce for me. Just happened for the 3rd time. Please let me know in case it makes sense that I provide the save game files.

@Pyrdacor
Copy link
Owner

As I can't reproduce it on my end the savegame would be helpful. Thanks!

@orgi
Copy link
Sponsor Author

orgi commented Mar 20, 2023

In the attached savegames zip, please find savegame number 10, which was saved before the last occurrence and no 11 afterwards.

Hope that helps.

Savegames.zip

@Pyrdacor
Copy link
Owner

Do you have a savegame with a broken item? Both savegames have only non-broken items so I can't test the repair.

@orgi
Copy link
Sponsor Author

orgi commented Mar 22, 2023

The axe just broke again. Saved the game before repair. However on a different island. Also I now have 3 more repair scrolls. Could not reproduce.
Will load one of the old save games to try to reproduce.

@orgi
Copy link
Sponsor Author

orgi commented Mar 22, 2023

Tried with the old save game. Not reproducible anymore. Maybe once I save the game WITH the broken axe this fixes the issue?

@Pyrdacor
Copy link
Owner

Pyrdacor commented Mar 23, 2023

I found the issue. It's caused by scrolling the inventory. I will work on a fix now.

It only happens if you need to scroll to get to the the item to repair.

@Pyrdacor Pyrdacor added the fixed in code or data Fixed in code/data but not released yet label Mar 23, 2023
@Pyrdacor
Copy link
Owner

Should be fixed in 1.8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in code or data Fixed in code/data but not released yet v1.8
Projects
None yet
Development

No branches or pull requests

2 participants