Jump to content

Some Error


Mangix

Recommended Posts

i cant reproduce it but it happened when i tried drawing outside of bounds with the paintbrush.

Crash log for Paint.NET v2.6 (Alpha 2 Release build 2.6.2179.30797)
Time of crash: 12/22/2005 11:08:19 PM
OS version: 5.1.2600.131072
.NET Framework version: 2.0.50727.42 X86
Processor count: 2

Exception details:
System.ArgumentOutOfRangeException: bounds parameter must be a subset of this Surface's bounds
Parameter name: bounds
Actual value was {X=99,Y=100,Width=202,Height=11}.
  at PaintDotNet.Surface.CreateWindow(Rectangle bounds)
  at PaintDotNet.PlacedSurface..ctor(Surface source, Rectangle roi)
  at PaintDotNet.PaintBrushTool.OnStylusMove(StylusEventArgs e)
  at PaintDotNet.Tool.PerformMouseMove(MouseEventArgs e)
  at PaintDotNet.DocumentWorkspace.DocumentMouseMoveHandler(Object sender, MouseEventArgs e)
  at System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e)
  at PaintDotNet.DocumentView.OnDocumentMouseMove(MouseEventArgs e)
  at PaintDotNet.DocumentView.MouseMoveHandler(Object sender, MouseEventArgs e)
  at System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
  at System.Windows.Forms.Control.WmMouseMove(Message& m)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at PaintDotNet.SurfaceBox.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
------------------------------------------------------------------------------

Link to comment
Share on other sites

I recreated it. I just went back and forth real fast out of a 300x300 square. What do you think is happening, Rick?

Crash log for Paint.NET v2.6 (Alpha 2 Release build 2.6.2179.30797)
Time of crash: 12/24/2005 10:29:27 AM
OS version: 5.1.2600.131072
.NET Framework version: 2.0.50727.42 X86
Processor count: 1

Exception details:
System.ArgumentOutOfRangeException: bounds parameter must be a subset of this Surface's bounds
Parameter name: bounds
Actual value was {X=120,Y=181,Width=181,Height=27}.
  at PaintDotNet.Surface.CreateWindow(Rectangle bounds)
  at PaintDotNet.PlacedSurface..ctor(Surface source, Rectangle roi)
  at PaintDotNet.PaintBrushTool.OnStylusMove(StylusEventArgs e)
  at PaintDotNet.Tool.PerformMouseMove(MouseEventArgs e)
  at PaintDotNet.DocumentWorkspace.DocumentMouseMoveHandler(Object sender, MouseEventArgs e)
  at System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e)
  at PaintDotNet.DocumentView.OnDocumentMouseMove(MouseEventArgs e)
  at PaintDotNet.DocumentView.MouseMoveHandler(Object sender, MouseEventArgs e)
  at System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
  at System.Windows.Forms.Control.WmMouseMove(Message& m)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at PaintDotNet.SurfaceBox.WndProc(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
------------------------------------------------------------------------------

P.S. - I am not using a tablet PC, just a normal desktop

~~

Link to comment
Share on other sites

Oh, it's a rounding error, basically.

For each brush stroke we figure out a rectangle that bounds it so that we can save a copy of the layer before we draw (for undo/redo). We do some adjustments to this rectangle to account for things like anti-aliasing and whatnot. Turns out that there isn't an extra clipping step in there at one point (i.e. chop off the parts of the 'save this area' rectangle that aren't within the bounds of the layer).

What's interesting is that this code has been largely unchanged for over a year and nobody else has reported a problem with it :) Good catch!

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...