Crash on drawing outside of window

Description

The following crash message appeared when using the Pencil tool to draw a white line of width 4 over an existing item on the left edge of the screenshot. The screenshot was replaced with a red "X" in the graphics control.

I drew a very short stroke from within the editor near the left edge, moving my mouse to outside of the editor. I was not able to reproduce it - fuzzing may help, perhaps?

This produced the following crash report:

Software version: 1.2.9.129-RELEASE-569de711c0353860aaeb5e5ec4d272e383a101e9 (64 bit)
.NET runtime version: 4.0.30319.42000+
Time: 2017-05-05 06:06:43 -04:00
OS: unknown (x64) 6.1 build 7601 revision 10000
GDI object count: 237
User object count: 242

Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: path

Stack:
at System.Drawing.Graphics.DrawPath(Pen pen, GraphicsPath path)
at Greenshot.Drawing.FreehandContainer.Draw(Graphics graphics, RenderMode renderMode)
at Greenshot.Drawing.DrawableContainer.DrawContent(Graphics graphics, Bitmap bmp, RenderMode renderMode, Rectangle clipRectangle)
at Greenshot.Drawing.DrawableContainerList.Draw(Graphics g, Bitmap bitmap, RenderMode renderMode, Rectangle clipRectangle)
at Greenshot.Drawing.Surface.SurfacePaint(Object sender, PaintEventArgs paintEventArgs)
at System.Windows.Forms.Control.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Taking another screenshot of the failure worked:

https://i.imgur.com/HpgskOu.png

Environment

Windows 7 x64

Gliffy Diagrams

Activity

Robin Krom August 1, 2017 at 5:55 AM

There will be a fix available in Greenshot 1.2.10, when this is there I will update this ticket.

Fixed

Details

Assignee

Reporter

Affects versions

Components

Priority

Labels

Time tracking

30m logged

Sprint

Created May 5, 2017 at 10:16 AM
Updated September 12, 2017 at 8:13 PM
Resolved August 1, 2017 at 5:55 AM