Freehand tool causes crash after color change & undo

Description

Error message:

Software version: 1.2.10.6-RELEASE-c2414cf0149a1475ea00520effc01b40087c225c (64 bit)
.NET runtime version: 4.0.30319.42000+
Time: 2020-11-07 16:09:08 +02:00
OS: unknown (x64) 10.0 build 19041 revision 0
GDI object count: 101
User object count: 69

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)

Configuration dump:

Steps to reproduce:
1) Create new screenshot and open it in Greenshot image editor.
2) Select `Draw freehand` using default color(red).
3) Draw a freehand line.
4) Change color from yellow to red.
5) Click “Undo” to change color back
5) Try to draw another line.

Expected:
It's possible to draw a line.

Actual:
An error has occurred. Se an error message above

Environment

None

Activity

Show:
Jens Klingen
November 8, 2020, 5:42 PM

Thanks for reporting this. I tried hard to reproduce this, but couldn’t. No matter how many lines I draw, and which colors I pick, it always works as expected for me

Is this 100% reproducible for you? Is there anything else that might be relevantin any way for reproduction of this issue?

Thanks a lot

Kateryna Zorina
November 8, 2020, 6:14 PM

After step 4 I reverted previous action. I recorded a video, see attached .gif file. I hope it will help

Jens Klingen
November 8, 2020, 7:32 PM

Wow, that was quick. And also great, just what I needed - I can reproduce the issue now. I have updated the ticket description accordingly.

Thanks again,

Jens

Jens Klingen
November 8, 2020, 7:40 PM

Good news: just noticed that this issue has already been fixed for Greenshot 1.3 (final version is not released yet). In case you want to check out the unstable version1.3 , you can get it from our website here: Greenshot version history

Assignee

Unassigned

Reporter

Kateryna Zorina

Affects versions

None

Components

None

Priority

Major

Labels

None
Configure