#1404 OutOfMemoryException on crop [Unexpected error occured]

closed
Robin Krom
Clipboard (76)
5
2013-04-04
2012-12-05
Anonymous
No

Greetings, below a bug report.

1) Pressed printscr inside a RDP session
2) Rightclicked the greenshot icon in the notification bar
3) Selected "Open image from clipboard"
4) Selected "Open in edit image"
5) Selected the crop tool and selected the spot in the opened image to crop
6) Pressed the green "v"
7) Crash with below bug report

Hope this helps, I really enjoy using Greenshot, keep up the good work.

Regards,
Will

Software version: 1.0.6.2228 (64 bit)
.NET runtime version: 4.0.30319.544
Time: 2012-12-05 10:33:34 +01:00
OS: Windows 7 Service Pack 1 (x64) 6.1 build 7601 revision 10000
GDI object count: 171
User object count: 105
Exception: System.OutOfMemoryException
Message: Onvoldoende geheugen.

Stack:
bij System.Drawing.Bitmap.Clone(Rectangle rect, PixelFormat format)
bij GreenshotPlugin.Core.ImageHelper.CloneArea(Image sourceBitmap, Rectangle sourceRect, PixelFormat targetFormat)
bij Greenshot.Drawing.Surface.ApplyCrop(Rectangle cropRectangle)
bij Greenshot.Drawing.Surface.ConfirmSelectedConfirmableElements(Boolean confirm)
bij Greenshot.ImageEditorForm.BtnConfirmClick(Object sender, EventArgs e)
bij System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
bij System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
bij System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bij System.Windows.Forms.Control.WndProc(Message& m)
bij System.Windows.Forms.ToolStrip.WndProc(Message& m)
bij Greenshot.Controls.ToolStripEx.WndProc(Message& m)
bij System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Configuration dump:
[Core]
Language=nl-NL
RegionHotkey=PrintScreen
WindowHotkey=Alt + PrintScreen
FullscreenHotkey=Ctrl + PrintScreen
LastregionHotkey=Shift + PrintScreen
IEHotkey=Shift + Ctrl + PrintScreen
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\will\Desktop
OutputFileAllowOverwrite=True
OutputFileFilenamePattern=${capturetime:d"yyyy-MM-dd HH_mm_ss"}-${title}
OutputFileFormat=png
OutputFileReduceColors=False
OutputFileAutoReduceColors=True
OutputFileCopyPathToClipboard=True
OutputFileAsFullpath=C:\Users\will\Desktop\agenda minco.png
OutputFileJpegQuality=80
OutputFilePromptQuality=False
OutputFileIncrementingNumber=1
OutputPrintPromptOptions=True
OutputPrintAllowRotate=True
OutputPrintAllowEnlarge=True
OutputPrintAllowShrink=True
OutputPrintCenter=True
OutputPrintInverted=False
OutputPrintGrayscale=False
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=12/04/2012 17:11:43
DisableSettings=False
DisableQuickSettings=False
DisableTrayicon=False
HideExpertSettings=False
ThumnailPreview=True
NoGDICaptureForProduct=intellij,idea
NoDWMCaptureForProduct=citrix,ica,client
OptimizeForRDP=False
MinimizeWorkingSetSize=False
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

Discussion

  • Jens Klingen
    Jens Klingen
    2012-12-05

    • summary: Unexpected error occured --> OutOfMemoryException on crop [Unexpected error occured]
     
  • Jens Klingen
    Jens Klingen
    2012-12-05

    Thanks for the report, Will.
    Actually, I am not sure whether we will be able to do anything about the cause. It seems that there was simply no memory left on the system for Greenshot to do the cropping. We'll have a look whether there's something we can optimize.

    What we should definitely do is add decent error handling for this, displaying a message instead of the unexpected error window.

    Thanks and best regards,
    Jens

     
  • Robin Krom
    Robin Krom
    2012-12-05

    • status: open --> closed-duplicate
     
  • Jens Klingen
    Jens Klingen
    2013-04-04

    • Status: closed-duplicate --> closed