haven1433 / HexManiacAdvance

A tool for editing tables, text, scripts, images, and other data in Pokemon GBA games
MIT License
225 stars 51 forks source link

venusaur foot print crash #223

Closed Magicflash67 closed 1 month ago

Magicflash67 commented 3 months ago

I was changing the foot print of venusaur, when it gave the error

Notes from crash.log:

Version Number: 0.5.6
Release Version
6/5/2024 10:36:32 PM
General Information:
Current tab count: 2
Current selected tab: 1
---
Tab is ViewPort for Pokemon - FireRed Version (USA, Europe) (Rev 1).gba
Game Code: BPRE1
Data Length: 0x1000000
Pokemon Count: 412
---
Tab is HavenSoft.HexManiac.Core.ViewModels.ImageEditorViewModel
Image Editor
---
Exception Information:
System.IndexOutOfRangeException
Index was outside the bounds of the array.
   at HavenSoft.HexManiac.Core.ViewModels.ImageEditorViewModel.SelectionTool.SwapUnderPixelsWithCurrentPixels() in D:\root\GitHub\HexManiac\src\HexManiac.Core\ViewModels\ImageEditorViewModel.cs:line 1085
   at HavenSoft.HexManiac.Core.ViewModels.ImageEditorViewModel.SelectionTool.ToolDrag(Point point) in D:\root\GitHub\HexManiac\src\HexManiac.Core\ViewModels\ImageEditorViewModel.cs:line 980
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.MouseDevice.Synchronize()
   at System.Windows.Input.MouseDevice.PostProcessInput(Object sender, ProcessInputEventArgs e)
   at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(Tuple`2 postProcessInput, ProcessInputEventArgs processInputEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

-------------------------------------------
haven1433 commented 2 months ago

It looks like you're using the release version, not the debug version, so the callstack isn't showing me exactly where the crash occurred. I did try to reproduce it by editing Venasaur's footprint and using the Selection Tool to drag part of the image around, but I couldn't reproduce the crash.

Please either provide a debug call stack, or steps to reliably reproduce this issue.

haven1433 commented 1 month ago

Closing until more information is provided