We're updating the issue view to help you get more done. 

Crash when editing line after copying to system clipboard

Description

Steps that led to this (can't reproduce it right now of course):

  • Take a screenshot

  • Draw a few lines

  • Copy to system clipboard, paste somewhere

  • Go back to Greenshot and edit line, it will flicker and even though you haven't released the handle, the line will be gone (may require use of Shift key). After releasing the mouse button, Greenshot crashes.

I'm not sure whether there's a time dependency between copy-pasting and going back to editing, perhaps some memory location issue or so... Will update if I can reliably reproduce this, but it's happened twice to me in the last two days.

Software version: 1.2.10.6-RELEASE-c2414cf0149a1475ea00520effc01b40087c225c (64 bit)
.NET runtime version: 4.0.30319.42000+
Time: 2019-05-16 09:34:24 +02:00
OS: unknown (x64) 10.0 build 16299 revision 0
GDI object count: 253
User object count: 128

Exception: System.OverflowException
Message: Overflow error.

Stack:
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawLine(Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2)
at Greenshot.Drawing.LineContainer.Draw(Graphics graphics, RenderMode rm)
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)

Configuration dump:

Environment

Windows 10

Status

Assignee

Unassigned

Reporter

Dick Furr

Affects versions

1.2.10

Components

None

Priority

Major

Labels

None