Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1545 Failing to overwrite existing PNG

1.0.6
open
nobody
None
none
5
2013-08-23
2013-08-19
Quitch
No

Using Save As, choose existing PNG and attempt to save. The following error is displayed:

Software version: 1.1.5.2643 (64 bit)
.NET runtime version: 4.0.30319.18052+
Time: 2013-08-19 10:40:36 +01:00
OS: Windows 7 Service Pack 1 (x64) 6.1 build 7601 revision 10000
GDI object count: 240
User object count: 211
Surface count: 2
Exception: System.IO.IOException
Message: The process cannot access the file 'C:\Users\pcocker\Pictures\Word Encryption.png' because it is being used by another process.

Stack:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at GreenshotPlugin.Core.ImageOutput.Save(ISurface surface, String fullPath, Boolean allowOverwrite, SurfaceOutputSettings outputSettings, Boolean copyPathToClipboard)
at GreenshotPlugin.Core.ImageOutput.SaveWithDialog(ISurface surface, ICaptureDetails captureDetails)
at Greenshot.Destinations.FileDestination.ExportCapture(Boolean manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
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.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 Greenshot.Controls.ToolStripEx.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=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\pcocker\Desktop
OutputFileAllowOverwrite=True
OutputFileFilenamePattern=${capturetime:d"yyyy-MM-dd HH_mm_ss"}-${title}
OutputFileFormat=png
OutputFileReduceColors=False
OutputFileAutoReduceColors=False
OutputFileCopyPathToClipboard=True
OutputFileAsFullpath=C:\Users\pcocker\Pictures\Word Encryption 9.png
OutputFileJpegQuality=80
OutputFilePromptQuality=False
OutputFileIncrementingNumber=1
OutputPrintPromptOptions=True
OutputPrintAllowRotate=True
OutputPrintAllowEnlarge=True
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=08/19/2013 09:39:36
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

Discussion

  • Robin Krom
    Robin Krom
    2013-08-19

    Hi,

    Although the message might be a bit extreme... Could it actually be that you have the bitmap open in other application?

    Best wishes,
    Robin

     
  • Steve Lowman
    Steve Lowman
    2013-08-23

    Very similar. Same exception and circumstances, but a different error message. Trying to overwrite an existing png. It was not open in any application. Never had this trouble before, and done it multiple times.

    Here's all the gubbins:

    Software version: 1.1.5.2643 (64 bit)
    .NET runtime version: 4.0.30319.18051+
    Time: 2013-08-23 10:46:00 +01:00
    OS: Windows 8 (x64) 6.2 build 9200 revision 0
    GDI object count: 196
    User object count: 111
    Surface count: 1
    Exception: System.IO.IOException
    Message: The requested operation cannot be performed on a file with a user-mapped section open.

    Stack:
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
    at GreenshotPlugin.Core.ImageOutput.Save(ISurface surface, String fullPath, Boolean allowOverwrite, SurfaceOutputSettings outputSettings, Boolean copyPathToClipboard)
    at GreenshotPlugin.Core.ImageOutput.SaveWithDialog(ISurface surface, ICaptureDetails captureDetails)
    at Greenshot.Destinations.FileWithDialogDestination.ExportCapture(Boolean manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
    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.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 Greenshot.Controls.ToolStripEx.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=True
    CaptureWindowsInteractive=False
    CaptureDelay=100
    ScreenCaptureMode=Auto
    ScreenToCapture=1
    WindowCaptureMode=Auto
    WindowCaptureAllChildLocations=False
    DWMBackgroundColor=Transparent
    PlayCameraSound=False
    ShowTrayNotification=True
    OutputFilePath=M:\Estate Office\Personal\S Lowman\Saved site maps\Web images and photos
    OutputFileAllowOverwrite=True
    OutputFileFilenamePattern=${capturetime:d"yyyy-MM-dd HH_mm_ss"}-${title}
    OutputFileFormat=png
    OutputFileReduceColors=False
    OutputFileAutoReduceColors=False
    OutputFileCopyPathToClipboard=True
    OutputFileAsFullpath=C:\Users\slowman\Documents\Current work\Bowhill web images and photos\Hartwoodmyres Byre - Promap.png
    OutputFileJpegQuality=80
    OutputFilePromptQuality=False
    OutputFileIncrementingNumber=1
    OutputPrintPromptOptions=False
    OutputPrintAllowRotate=True
    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=08/23/2013 09:15:40
    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

     
  • Steve Lowman
    Steve Lowman
    2013-08-23

    It won't let me edit my comment ...
    Just to say, the save and overwrite worked fine on second attempt.