Greenshot crashs with "Exception: System.AccessViolationException"

Description

Greenshot crash with this error message when starting it up.
I am using the latest version of Greenshot installed via MSI file to local disk.

I hope you are able to quick help with that ?

This is the error message:

Software version: 1.1.5.2643 (64 bit)
.NET runtime version: 4.0.30319.296
Time: 2013-06-25 11:36:23 +02:00
OS: Windows 7 Enterprise Service Pack 1 (x64) 6.1 build 7601 revision 10000
GDI object count: 88
User object count: 59
Surface count: 1
Exception: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Stack:
at System.Drawing.SafeNativeMethods.Gdip.GdipFillRectangleI(HandleRef graphics, HandleRef brush, Int32 x, Int32 y, Int32 width, Int32 height)
at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
at System.Windows.Forms.ToolStripProfessionalRenderer.RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor, Orientation orientation)
at System.Windows.Forms.ToolStripProfessionalRenderer.RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor)
at System.Windows.Forms.ToolStripProfessionalRenderer.OnRenderToolStripPanelBackground(ToolStripPanelRenderEventArgs e)
at System.Windows.Forms.ToolStripPanel.OnPaintBackground(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmEraseBkgnd(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:
[Core]
Language=en-US
RegionHotkey=PrintScreen
WindowHotkey=Alt + PrintScreen
FullscreenHotkey=Ctrl + PrintScreen
LastregionHotkey=Shift + PrintScreen
IEHotkey=Ctrl + Shift + PrintScreen
IsFirstLaunch=False
Destinations=Editor
ClipboardFormats=DIB,PNG
CaptureMousepointer=False
CaptureWindowsInteractive=False
CaptureDelay=100
ScreenCaptureMode=Auto
ScreenToCapture=1
WindowCaptureMode=Auto
WindowCaptureAllChildLocations=False
DWMBackgroundColor=Transparent
PlayCameraSound=False
ShowTrayNotification=True
OutputFilePath=C:\Temp
OutputFileAllowOverwrite=True
OutputFileFilenamePattern=${capturetime:d"yyyy-MM-dd HH_mm_ss"}-${title}
OutputFileFormat=jpg
OutputFileReduceColors=False
OutputFileAutoReduceColors=False
OutputFileCopyPathToClipboard=True
OutputFileAsFullpath=C:\Users\KlingelT\Desktop\dummy.png
OutputFileJpegQuality=80
OutputFilePromptQuality=False
OutputFileIncrementingNumber=1
OutputPrintPromptOptions=True
OutputPrintAllowRotate=False
OutputPrintAllowEnlarge=False
OutputPrintAllowShrink=True
OutputPrintCenter=True
OutputPrintInverted=False
OutputPrintGrayscale=False
OutputPrintMonochrome=False
OutputPrintMonochromeThreshold=127
OutputPrintFooter=True
OutputPrintFooterPattern=${capturetime:d"D"} ${capturetime:d"T"} - ${title}
NotificationSound=default
UseProxy=True
IECapture=True
IEFieldCapture=False
WindowClassesToCheckForIE=AfxFrameOrView70,IMWindowClass
AutoCropDifference=10
IncludePlugins=
ExcludePlugins=
ExcludeDestinations=OneNote
UpdateCheckInterval=1
LastUpdateCheck=
DisableSettings=False
DisableQuickSettings=False
DisableTrayicon=False
HideExpertSettings=False
ThumnailPreview=True
NoGDICaptureForProduct=intellij,idea
NoDWMCaptureForProduct=citrix,ica,client
OptimizeForRDP=False
MinimizeWorkingSetSize=False
WindowCaptureRemoveCorners=True
CheckForUnstable=False
ActiveTitleFixes=Firefox,IE,Chrome
TitleFixMatcher.Firefox= - Mozilla Firefox.*
TitleFixMatcher.IE= - (Microsoft|Windows) Internet Explorer.*
TitleFixMatcher.Chrome= - Google Chrome.*
TitleFixReplacer.Firefox=
TitleFixReplacer.IE=
TitleFixReplacer.Chrome=
EnableSpecialDIBClipboardReader=True
WindowCornerCutShape=5,3,2,1,1
LeftClickAction=SHOW_CONTEXT_MENU
DoubleClickAction=OPEN_LAST_IN_EXPLORER
ZoomerEnabled=True
MaxMenuItemLength=25
MailApiTo=
MailApiCC=
MailApiBCC=
OptimizePNGCommand=
OptimizePNGCommandArguments="{0}"
LastSaveWithVersion=1.1.5.2643

Environment

None

Activity

Show:
Robin Krom
July 9, 2013, 6:35 PM

Hi Tim,

I believe the locking of your Windows triggers the issue, somehow I found some other people having simular issues with different applications. Can you reproduce (force) the issue to happen?

If so, I might want you to try a specially build Greenshot. Is this possible?

P.S.
Do you use the shadow or torn edge functionaly? This uses GDI plus, although it's a long shot... This might be related.

Best wishes,
Robin

HELLspawnTIM
July 12, 2013, 10:58 AM

Hi Robin,

no sorry, i can't reproduce or force it.
It happens unreguarly nearly every 2-3 weeks again.
I leave my working PC running over weeks, most of the times only the Microsoft-Patch-Day is a time to reboot

I would be happy to test a special beta build, but as told it could take weeks until i can post any results.

I am not sure what you mean by shadow or torn edge functions? Is this a function of Greenshot or of Windows7 Desktop Themes?
For Greenshot i use the following .ini file and for Windows7-Desktop-Themes i use the "Windows7-Basic" Theme if you look into ControlPanel->Appearence->Personalization

Here is a Screenshot of the used Desktop-Theme
http://images.ntwind.com/winsnap3/uac-theme-2.png

And here is the Greenshot .ini

; Greenshot core configuration
[Core]
; The language in IETF format (e.g. en-US)
Language=de-DE
; Hotkey for starting the region capture
RegionHotkey=PrintScreen
; Hotkey for starting the window capture
WindowHotkey=Alt + PrintScreen
; Hotkey for starting the fullscreen capture
FullscreenHotkey=Ctrl + PrintScreen
; Hotkey for starting the last region capture
LastregionHotkey=Shift + PrintScreen
; Hotkey for starting the IE capture
IEHotkey=Ctrl + Shift + PrintScreen
; Is this the first time launch?
IsFirstLaunch=False
; Which destinations? Possible options (more might be added by plugins) are: Editor, FileDefault, FileWithDialog, Clipboard, Printer, EMail, Picker
Destinations=Editor
; Specify which formats we copy on the clipboard? Options are: PNG, HTML, HTMLDATAURL and DIB
ClipboardFormats=PNG,DIB
; Should the mouse be captured?
CaptureMousepointer=False
; Use interactive window selection to capture? (false=Capture active window)
CaptureWindowsInteractive=False
; Capture delay in millseconds.
CaptureDelay=99
; The capture mode used to capture a screen. (Auto, FullScreen, Fixed)
ScreenCaptureMode=Auto
; The screen number to capture when using ScreenCaptureMode Fixed.
ScreenToCapture=1
; The capture mode used to capture a Window (Screen, GDI, Aero, AeroTransparent, Auto).
WindowCaptureMode=Auto
; Enable/disable capture all children, very slow but will make it possible to use this information in the editor.
WindowCaptureAllChildLocations=False
; The background color for a DWM window capture.
DWMBackgroundColor=Transparent
; Play a camera sound after taking a capture.
PlayCameraSound=False
; Show a notification from the systray when a capture is taken.
ShowTrayNotification=True
; Output file path.
OutputFilePath=C:\Temp
; If the target file already exists True will make Greenshot always overwrite and False will display a 'Save-As' dialog.
OutputFileAllowOverwrite=True
; Filename pattern for screenshot.
OutputFileFilenamePattern=${title}${YYYY}${MM}${DD}${hh}${mm}${ss}
; Default file type for writing screenshots. (bmp, gif, jpg, png, tiff)
OutputFileFormat=png
; If set to true, than the colors of the output file are reduced to 256 (8-bit) colors
OutputFileReduceColors=False
; If set to true the amount of colors is counted and if smaller than 256 the color reduction is automatically used.
OutputFileAutoReduceColors=False
; When saving a screenshot, copy the path to the clipboard?
OutputFileCopyPathToClipboard=True
; SaveAs Full path?
OutputFileAsFullpath=C:\Users\KlingelT\Desktop\WXPCAD040_Harddrive_08-July-2013.png
; JPEG file save quality in %.
OutputFileJpegQuality=80
; Ask for the quality before saving?
OutputFilePromptQuality=False
; The number for the ${NUM} in the filename pattern, is increased automatically after each save.
OutputFileIncrementingNumber=1
; Ask for print options when printing?
OutputPrintPromptOptions=True
; Allow rotating the picture for fitting on paper?
OutputPrintAllowRotate=True
; Allow growing the picture for fitting on paper?
OutputPrintAllowEnlarge=True
; Allow shrinking the picture for fitting on paper?
OutputPrintAllowShrink=True
; Center image when printing?
OutputPrintCenter=True
; Print image inverted (use e.g. for console captures)
OutputPrintInverted=False
; Force grayscale printing
OutputPrintGrayscale=False
; Force monorchrome printing
OutputPrintMonochrome=False
; Threshold for monochrome filter (0 - 255), lower value means less black
OutputPrintMonochromeThreshold=127
; Print footer on print?
OutputPrintFooter=True
; Footer pattern
OutputPrintFooterPattern=${capturetime:d"D"} ${capturetime:d"T"} - ${title}
; The wav-file to play when a capture is taken, loaded only once at the Greenshot startup
NotificationSound=default
; Use your global proxy?
UseProxy=False
; Enable/disable IE capture
IECapture=True
; Enable/disable IE field capture, very slow but will make it possible to annotate the fields of a capture in the editor.
IEFieldCapture=False
; Comma separated list of Window-Classes which need to be checked for a IE instance!
WindowClassesToCheckForIE=AfxFrameOrView70,IMWindowClass
; Sets how to compare the colors for the autocrop detection, the higher the more is 'selected'. Possible values are from 0 to 255, where everything above ~150 doesn't make much sense!
AutoCropDifference=10
; Comma separated list of Plugins which are allowed. If something in the list, than every plugin not in the list will not be loaded!
IncludePlugins=
; Comma separated list of Plugins which are NOT allowed.
ExcludePlugins=
; Comma separated list of destinations which should be disabled.
ExcludeDestinations=OneNote
; How many days between every update check? (0=no checks)
UpdateCheckInterval=1
; Last update check
LastUpdateCheck=07/11/2013 18:19:41
; Enable/disable the access to the settings, can only be changed manually in this .ini
DisableSettings=False
; Enable/disable the access to the quick settings, can only be changed manually in this .ini
DisableQuickSettings=False
; Disable the trayicon, can only be changed manually in this .ini
DisableTrayicon=False
; Hide expert tab in the settings, can only be changed manually in this .ini
HideExpertSettings=False
; Enable/disable thumbnail previews
ThumnailPreview=True
; List of products for which GDI capturing doesn't work.
NoGDICaptureForProduct=intellij,idea
; List of products for which DWM capturing doesn't work.
NoDWMCaptureForProduct=citrix,ica,client
; Make some optimizations for usage with remote desktop
OptimizeForRDP=False
; Optimize memory footprint, but with a performance penalty!
MinimizeWorkingSetSize=False
; Remove the corners from a window capture
WindowCaptureRemoveCorners=True
; Also check for unstable version updates
CheckForUnstable=False
; The fixes that are active.
ActiveTitleFixes=Firefox,IE,Chrome
; The regular expressions to match the title with.
TitleFixMatcher.Firefox= - Mozilla Firefox.*
TitleFixMatcher.IE= - (Microsoft|Windows) Internet Explorer.*
TitleFixMatcher.Chrome= - Google Chrome.*
; The replacements for the matchers.
TitleFixReplacer.Firefox=
TitleFixReplacer.IE=
TitleFixReplacer.Chrome=
; Enable a special DIB clipboard reader
EnableSpecialDIBClipboardReader=True
; The cutshape which is used to remove the window corners, is mirrorred for all corners
WindowCornerCutShape=5,3,2,1,1
; Specify what action is made if the tray icon is left clicked, if a double-click action is specified this action is initiated after a delay (configurable via the windows double-click speed)
LeftClickAction=SHOW_CONTEXT_MENU
; Specify what action is made if the tray icon is double clicked
DoubleClickAction=OPEN_LAST_IN_EXPLORER
; Sets if the zoomer is enabled
ZoomerEnabled=False
; Maximum length of submenu items in the context menu, making this longer might cause context menu issues on dual screen systems.
MaxMenuItemLength=25
; The 'to' field for the email destination (settings for Outlook can be found under the Office section)
MailApiTo=
; The 'CC' field for the email destination (settings for Outlook can be found under the Office section)
MailApiCC=
; The 'BCC' field for the email destination (settings for Outlook can be found under the Office section)
MailApiBCC=
; Optional command to execute on a temporary PNG file, the command should overwrite the file and Greenshot will read it back. Note: this command is also executed when uploading PNG's!
OptimizePNGCommand=
; Arguments for the optional command to execute on a PNG, {0} is replaced by the temp-filename from Greenshot. Note: Temp-file is deleted afterwards by Greenshot.
OptimizePNGCommandArguments="{0}"
; Version of Greenshot which created this .ini
LastSaveWithVersion=1.1.5.2643

; Greenshot ExternalCommand Plugin configuration
[ExternalCommand]
; The commands that are available.
Commands=MS Paint
; The commandline for the output command.
Commandline.MS Paint=C:\Windows\System32\mspaint.exe
; The arguments for the output command.
Argument.MS Paint="{0}"
; Should the command be started in the background.
RunInbackground.MS Paint=True

; Greenshot Imgur Plugin configuration
[Imgur]
; Url to Imgur system.
ImgurApiUrl=http://api.imgur.com/2
; What file type to use for uploading
UploadFormat=png
; JPEG file save quality in %.
UploadJpegQuality=80
; Reduce color amount of the uploaded image to 256
UploadReduceColors=False
; Use pagelink instead of direct link on the clipboard
UsePageLink=False
; Use anonymous access to Imgur
AnonymousAccess=True
; Is the title passed on to Imgur
AddTitle=True
; Is the filename passed on to Imgur
AddFilename=True
; Imgur upload history (ImgurUploadHistory.hash=deleteHash)

; Greenshot Office configuration
[Office]
; Default type for emails. (Text, HTML)
OutlookEmailFormat=HTML
; Email subject pattern, works like the OutputFileFilenamePattern
EmailSubjectPattern=${title}
; Default value for the to in emails that are created
EmailTo=
; Default value for the CC in emails that are created
EmailCC=
; Default value for the BCC in emails that are created
EmailBCC=
; Allow export in meeting items
OutlookAllowExportInMeetings=False
; For Word: Lock the aspect ratio of the image
WordLockAspectRatio=True

; Greenshot editor configuration
[Editor]
; Last used colors
RecentColors=255, 255, 255
; Field values, make sure the last used settings are re-used
LastFieldValue.TextContainer.LINE_THICKNESS=System.Int32,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:2
LastFieldValue.TextContainer.LINE_COLOR=System.Drawing.Color,System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:Red
LastFieldValue.TextContainer.FILL_COLOR=System.Drawing.Color,System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:255, 255, 255
LastFieldValue.TextContainer.SHADOW=System.Boolean,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:True
LastFieldValue.TextContainer.FONT_ITALIC=System.Boolean,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:False
LastFieldValue.TextContainer.FONT_BOLD=System.Boolean,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:False
LastFieldValue.TextContainer.FONT_FAMILY=System.String,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:Microsoft Sans Serif
LastFieldValue.TextContainer.FONT_SIZE=System.Single,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:15
LastFieldValue.TextContainer.TEXT_HORIZONTAL_ALIGNMENT=System.Windows.Forms.HorizontalAlignment,System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:Center
LastFieldValue.TextContainer.TEXT_VERTICAL_ALIGNMENT=Greenshot.Plugin.VerticalAlignment,GreenshotPlugin:CENTER
LastFieldValue.RectangleContainer.LINE_THICKNESS=System.Int32,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:2
LastFieldValue.RectangleContainer.LINE_COLOR=System.Drawing.Color,System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:Red
LastFieldValue.RectangleContainer.FILL_COLOR=System.Drawing.Color,System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:Transparent
LastFieldValue.RectangleContainer.SHADOW=System.Boolean,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:True
LastFieldValue.EllipseContainer.LINE_THICKNESS=System.Int32,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:5
LastFieldValue.EllipseContainer.LINE_COLOR=System.Drawing.Color,System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:Red
LastFieldValue.EllipseContainer.FILL_COLOR=System.Drawing.Color,System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:Transparent
LastFieldValue.EllipseContainer.SHADOW=System.Boolean,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:True
LastFieldValue.ArrowContainer.LINE_THICKNESS=System.Int32,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:4
LastFieldValue.ArrowContainer.LINE_COLOR=System.Drawing.Color,System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:Red
LastFieldValue.ArrowContainer.SHADOW=System.Boolean,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:True
LastFieldValue.ArrowContainer.ARROWHEADS=System.Int32,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:2
LastFieldValue.ArrowContainer.FILL_COLOR=System.Drawing.Color,System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:Transparent
; Match the editor window size to the capture
MatchSizeToCapture=True
; Placement flags
WindowPlacementFlags=0
; Show command
WindowShowCommand=Normal
; Position of minimized window
WindowMinPosition=-1, -1
; Position of maximized window
WindowMaxPosition=-1, -1
; Position of normal window
WindowNormalPosition=350, 120, 1004, 546
; Reuse already open editor
ReuseEditor=False
; The smaller this number, the less smoothing is used. Decrease for detailed drawing, e.g. when using a pen. Increase for smoother lines. e.g. when you want to draw a smooth line.
FreehandSensitivity=3
; Suppressed the 'do you want to save' dialog when closing the editor.
SuppressSaveDialogAtClose=False

Robin Krom
October 30, 2013, 1:43 PM

Hi Tim,

I did make some changes to 1.1.6, which is out now, could you please have a look at how this behaves?

Best wishes,
Robin

Robin Krom
October 30, 2013, 1:43 PM
  • *assigned_to*: Robin Krom

Robin Krom
February 17, 2020, 12:36 PM

This might have been caused by 3rd party software like FileOpen

See: https://www.fileopen.com/blog/features-screen-capture-prevention-watermarking

Please let me know if this might have been the case for you.

Assignee

Robin Krom

Reporter

HELLspawnTIM

Affects versions

None

Components

None

Priority

Labels

Configure