Crash when saving screenshot of window

Description

Greenshot crashed when I tried to save a screenshot of a dialog. I had created a new folder within the save window (if that has anything to do with it).

The program asked me to post the following info:

Software version: 1.2.4.10-RELEASE-94d66e09eb89 (64 bit)
.NET runtime version: 4.0.30319.34209+
Time: 2015-06-25 14:07:19 +02:00
OS: Windows 7 Service Pack 1 (x64) 6.1 build 7601 revision 10000
GDI object count: 126
User object count: 69
Surface count: 1
Exception: System.IO.PathTooLongException
Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Stack:
at System.IO.PathHelper.Append(Char value)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPath(String path)
at System.Windows.Forms.IntSecurity.UnsafeGetFullPath(String fileName)
at System.Windows.Forms.IntSecurity.DemandFileIO(FileIOPermissionAccess access, String fileName)
at System.Windows.Forms.FileDialog.get_FileName()
at GreenshotPlugin.Core.ImageOutput.SaveWithDialog(ISurface surface, ICaptureDetails captureDetails)
at Greenshot.Destinations.FileWithDialogDestination.ExportCapture(Boolean manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
at GreenshotPlugin.Core.AbstractDestination.<>c_DisplayClasse.<ShowPickerMenu>b_b(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Configuration dump:
[Core]
Language=en-US
RegionHotkey=Ctrl + PrintScreen
WindowHotkey=Shift + PrintScreen
FullscreenHotkey=PrintScreen
LastregionHotkey=None
IEHotkey=None
IsFirstLaunch=False
Destinations=Picker
ClipboardFormats=PNG,DIB
CaptureMousepointer=True
CaptureWindowsInteractive=False
CaptureDelay=100
ScreenCaptureMode=Auto
ScreenToCapture=1
WindowCaptureMode=Auto
WindowCaptureAllChildLocations=False
DWMBackgroundColor=Transparent
PlayCameraSound=False
ShowTrayNotification=True
OutputFilePath=C:\Users\elias.mossholm\Desktop
OutputFileAllowOverwrite=True
OutputFileFilenamePattern=${capturetime:d"yyyy-MM-dd HH_mm_ss"}-${title}
OutputFileFormat=png
OutputFileReduceColors=False
OutputFileAutoReduceColors=False
OutputFileReduceColorsTo=256
OutputFileCopyPathToClipboard=True
OutputFileAsFullpath=C:\Users\elias.mossholm\Documents\Alfa Laval\Wrong connStandard value, DN100 when ASME is selectd + pinbolt pressure rating missing for TL10B selection, data error¿ (2015-06-25 12_26).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=
UpdateCheckInterval=1
LastUpdateCheck=05/21/2015 09:36:28
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
ZoomerOpacity=1
MaxMenuItemLength=25
MailApiTo=
MailApiCC=
MailApiBCC=
OptimizePNGCommand=
OptimizePNGCommandArguments="{0}"
LastSaveWithVersion=1.2.4.10
ProcessEXIFOrientation=True
LastCapturedRegion=2418, 317, 682, 179
WebRequestTimeout=10
WebRequestReadWriteTimeout=100
IconSize=16, 16

Environment

Windows 7, SP1, 64 bit.

Gliffy Diagrams

Activity

Robin KromJune 25, 2015 at 9:50 PM

Filename size is hitting the Windows limit, we should build something to prevent this error.
Just so you understand, Greenshot wanted to write:
C:\Users\elias.mossholm\Documents\Alfa Laval\Wrong connStandard value, DN100 when ASME is selectd + pinbolt pressure rating missing for TL10B selection, data error¿ (2015-06-25 12_26).png

Elias MossholmJune 25, 2015 at 2:06 PM

Now I tried making another snapshot of the dialog and saving it in the same folder (but it was already created now so that is not the problem) and Greenshot again crashed. I gave the file a pretty long and descriptive name, maybe that's the problem? Usually Windows Explorer complains about that and lets you shorten the name, but maybe Greenshot doesn't use standard functionality for that and then has problems with it?

Anyway, here is the error log:

Software version: 1.2.4.10-RELEASE-94d66e09eb89 (64 bit)
.NET runtime version: 4.0.30319.34209+
Time: 2015-06-25 15:42:31 +02:00
OS: Windows 7 Service Pack 1 (x64) 6.1 build 7601 revision 10000
GDI object count: 143
User object count: 86
Surface count: 2
Exception: System.IO.PathTooLongException
Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Stack:
at System.IO.PathHelper.Append(Char value)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPath(String path)
at System.Windows.Forms.IntSecurity.UnsafeGetFullPath(String fileName)
at System.Windows.Forms.IntSecurity.DemandFileIO(FileIOPermissionAccess access, String fileName)
at System.Windows.Forms.FileDialog.get_FileName()
at GreenshotPlugin.Core.ImageOutput.SaveWithDialog(ISurface surface, ICaptureDetails captureDetails)
at Greenshot.Destinations.FileWithDialogDestination.ExportCapture(Boolean manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
at GreenshotPlugin.Core.AbstractDestination.<>c_DisplayClasse.<ShowPickerMenu>b_b(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Configuration dump:
[Core]
Language=en-US
RegionHotkey=Ctrl + PrintScreen
WindowHotkey=Shift + PrintScreen
FullscreenHotkey=PrintScreen
LastregionHotkey=None
IEHotkey=None
IsFirstLaunch=False
Destinations=Picker
ClipboardFormats=PNG,DIB
CaptureMousepointer=True
CaptureWindowsInteractive=False
CaptureDelay=100
ScreenCaptureMode=Auto
ScreenToCapture=1
WindowCaptureMode=Auto
WindowCaptureAllChildLocations=False
DWMBackgroundColor=Transparent
PlayCameraSound=False
ShowTrayNotification=True
OutputFilePath=C:\Users\elias.mossholm\Desktop
OutputFileAllowOverwrite=True
OutputFileFilenamePattern=${capturetime:d"yyyy-MM-dd HH_mm_ss"}-${title}
OutputFileFormat=png
OutputFileReduceColors=False
OutputFileAutoReduceColors=False
OutputFileReduceColorsTo=256
OutputFileCopyPathToClipboard=True
OutputFileAsFullpath=C:\Users\elias.mossholm\Documents\Alfa Laval\Wrong connStandard value, DN100 when ASME is selectd + pinbolt pressure rating missing for TL10B selection, data error¿ (2015-06-25 12_26).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=
UpdateCheckInterval=1
LastUpdateCheck=05/21/2015 09:36:28
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
ZoomerOpacity=1
MaxMenuItemLength=25
MailApiTo=
MailApiCC=
MailApiBCC=
OptimizePNGCommand=
OptimizePNGCommandArguments="{0}"
LastSaveWithVersion=1.2.4.10
ProcessEXIFOrientation=True
LastCapturedRegion=2544, 288, 682, 179
WebRequestTimeout=10
WebRequestReadWriteTimeout=100
IconSize=16, 16

Details

Assignee

Reporter

Affects versions

Priority

Created June 25, 2015 at 1:27 PM
Updated June 25, 2015 at 9:50 PM