cwensley / pablodraw

PabloDraw is an Ansi/Ascii text and RIPscrip vector graphic art editor/viewer with multi-user capabilities.
MIT License
309 stars 21 forks source link

Program crashed when drawing outside the "screen" #73

Closed SoundCrafterYT closed 1 year ago

SoundCrafterYT commented 1 year ago

I was just playing around in the program when suddenly it crashed.

System.IndexOutOfRangeException: Arg_IndexOutOfRangeException
   at Pablo.Formats.Character.MemoryCanvas.GetLine(Int32 y) in D:\a\pablodraw\pablodraw\Source\Pablo\Formats\Character\MemoryCanvas.cs:line 119
   at Pablo.Formats.Character.MemoryCanvas.SetLine(Int32 x, Int32 y, Attribute attrib, Int32 width) in D:\a\pablodraw\pablodraw\Source\Pablo\Formats\Character\MemoryCanvas.cs:line 74
   at Pablo.Formats.Character.Canvas.Fill(Rectangle rect, Attribute attrib) in D:\a\pablodraw\pablodraw\Source\Pablo\Formats\Character\Canvas.cs:line 325
   at Pablo.Formats.Character.Actions.Block.Fill.Do(Nullable`1 cursorPosition, FillAttributes attributes) in D:\a\pablodraw\pablodraw\Source\Pablo\Formats\Character\Actions\Block\Fill.cs:line 88
   at Pablo.Formats.Character.Actions.Block.Fill.Execute(CommandExecuteArgs args) in D:\a\pablodraw\pablodraw\Source\Pablo\Formats\Character\Actions\Block\Fill.cs:line 84
   at Pablo.Formats.Character.Tools.Pencil.Draw(Point location, MouseEventArgs e) in D:\a\pablodraw\pablodraw\Source\Pablo\Formats\Character\Tools\Pencil.cs:line 74
   at Pablo.Formats.Character.Tools.SizeTool.Do(MouseEventArgs e) in D:\a\pablodraw\pablodraw\Source\Pablo\Formats\Character\Tools\SizeTool.cs:line 36
   at Eto.Forms.Control.Callback.OnMouseMove(Control widget, MouseEventArgs e)
   at Eto.WinForms.BubbleEventFilter.MouseEvent(BubbleEventArgs be, Action`3 action, Nullable`1 capture, Func`2 modifyButtons)
   at Eto.WinForms.BubbleEventFilter.PreFilterMessage(Message& message)
   at System.Windows.Forms.Application.ThreadContext.ProcessFilters(MSG& msg, Boolean& modified)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
   at System.Windows.Forms.Application.ThreadContext.Interop.Mso.IMsoComponent.FPreTranslateMessage(MSG* msg)
   at System.Windows.Forms.Application.ComponentManager.Interop.Mso.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Eto.WinForms.Forms.ApplicationHandler.Run()
   at Eto.Forms.Application.Run()
   at PabloDraw.CommandHandlers.EditorCommandLine.Process(ProcessCommandLineArgs args) in D:\a\pablodraw\pablodraw\Source\PabloDraw\CommandHandlers\EditorCommandLine.cs:line 79
cwensley commented 1 year ago

Thanks for reporting the issue! This should be fixed in #76 and the next beta release.