NullReferenceException after interrupted shutdown

Description

Yesterday I clicked Shutdown. I immediately regretted that. So, when I got a prompt that Windows could not save all state, I cancelled shutdown. Today I noticed some applications had already been shutdown. Greenshot was still there, but produced an exception when I clicked Capture Region from the system tray icon.
I hope you this can help you. I love this little application! Using it every day in my life as a software developer.


Here is the trace:

Software version: 1.2.10.6-RELEASE-c2414cf0149a1475ea00520effc01b40087c225c (64 bit)
.NET runtime version: 4.0.30319.42000+
Time: 2024-07-02 11:48:44 +02:00
OS: unknown (x64) 10.0 build 19045 revision 0
GDI object count: 260
User object count: 443

Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.

Stack:
at Greenshot.Helpers.CaptureHelper.MakeCapture()
at Greenshot.Helpers.CaptureHelper.CaptureRegion(Boolean captureMouse)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

Configuration dump:

Environment

Windows 10 Enterprise v 10.0.19045

Activity

Details

Assignee

Reporter

Affects versions

Priority

Created July 2, 2024 at 10:09 AM
Updated July 2, 2024 at 10:09 AM