Jump to content

Out of memory doing a paste that probably wasn't an image


Recommended Posts

I got an error dialog in Windows that I wanted to share.  I hit CTRL-C on it, and got a bing sound effect (probably mean to indicate an error copying the dialog, for some reason.)  I tried anyway to paste it as text, and the system acted as if the clipboard was empty.  On a whim, I tried pasting it into the most recent version of Paint.NET (4.0.16.)  I was expecting it to not be an image either, and for nothing bad to come of the effort.  I was instead rewarded with this traceback:

 

System.OutOfMemoryException: Insufficient memory to continue the execution of the program. ---> System.AggregateException: One or more errors occurred. ---> System.OutOfMemoryException: Out of memory.

   at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)

   at PaintDotNet.ClipboardUtil.FileDropClipboardRetriever.TryGetMaskedSurface(IWin32Window window, IPdnDataObject clipData) in D:\src\pdn\src\PaintDotNet\ClipboardUtil.cs:line 437

   at PaintDotNet.ClipboardUtil.GetClipboardImageImpl(IWin32Window currentWindow, IPdnDataObject clipData) in D:\src\pdn\src\PaintDotNet\ClipboardUtil.cs:line 126

   --- End of inner exception stack trace ---

   --- End of inner exception stack trace ---

   at PaintDotNet.ClipboardUtil.GetClipboardImageImpl(IWin32Window currentWindow, IPdnDataObject clipData) in D:\src\pdn\src\PaintDotNet\ClipboardUtil.cs:line 176

   at PaintDotNet.ClipboardUtil.TryGetClipboardImage(IWin32Window currentWindow, IPdnDataObject clipData) in D:\src\pdn\src\PaintDotNet\ClipboardUtil.cs:line 99

   at PaintDotNet.Actions.PasteInToNewImageAction.PerformAction(AppWorkspace appWorkspace) in D:\src\pdn\src\PaintDotNet\Actions\PasteInToNewImageAction.cs:line 46

 

I can assure you my machine is NOT out of memory.  It has 64G of RAM which TaskManager reports as 30% consumed.  It's probably some missing code in the handler for the paste to note that I what I am attempting to paste is not an actual image.

 

Link to comment
Share on other sites

That doesn't always mean your system's out of memory, so don't take it too personally. It just means that whatever system component was asked to handle this said "out of memory". Sometimes they conflate all sorts of things into generic error messages. GDI+ is infamous in this regard.

 

From that trace, I can tell that the clipboard contained a link to a file that was claimed to be an image. And then loading the image didn't work, and the thing that was supposed to load the image said "out of memory." So that's just the information that Paint.NET has to work with.

 

The clipboard in Windows is notoriously fickle and ornery...

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...