Ishi Posted January 31, 2018 Posted January 31, 2018 So I have a single layer picture opened on PDN v.4.0.21. I did some changes to it and CTRL+A then attempted to copy it to the clipboard FROM PDN to another program being MS Publisher, then I get an error on PDN saying it failed to load the image into the clipboard. I get this error log. System.ComponentModel.Win32Exception (0x80004005): HeapAlloc() returned NULL (requestedSize = 137,816,064 bytes) (0, ERROR_SUCCESS) at PaintDotNet.SystemLayer.NativeUtilities.ThrowOnWin32Error(String message, Int32 lastWin32Error, Boolean alwaysThrow) in D:\src\pdn\src\SystemLayer\NativeUtilities.cs:line 88 at PaintDotNet.SystemLayer.MemoryManagement.HeapBuffer..ctor(HeapAllocator heap, Int64 size, AllocationOptions flags) in D:\src\pdn\src\SystemLayer\MemoryManagement\HeapBuffer.cs:line 68 at PaintDotNet.SystemLayer.MemoryManagement.HeapAllocator.Allocate(Int64 size, AllocationOptions flags) in D:\src\pdn\src\SystemLayer\MemoryManagement\HeapAllocator.cs:line 63 at PaintDotNet.MemoryManagement.Proxies.AllocatorProxy.Allocate(Int64 size, AllocationOptions flags) in D:\src\pdn\src\Base\MemoryManagement\Proxies\AllocatorProxy.cs:line 56 at PaintDotNet.IO.NativeMemoryStream.set_Capacity(Int64 value) in D:\src\pdn\src\Base\IO\NativeMemoryStream.cs:line 111 at PaintDotNet.IO.NativeMemoryStream.EnsureCapacity(Int64 desiredCapacity) in D:\src\pdn\src\Base\IO\NativeMemoryStream.cs:line 411 at PaintDotNet.IO.NativeMemoryStream.Write(Byte* pBuffer, Int64 count) in D:\src\pdn\src\Base\IO\NativeMemoryStream.cs:line 307 at PaintDotNet.IO.NativeMemoryStream.Write(Byte[] buffer, Int64 offset, Int64 count) in D:\src\pdn\src\Base\IO\NativeMemoryStream.cs:line 283 at PaintDotNet.IO.NativeMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count) in D:\src\pdn\src\Base\IO\NativeMemoryStream.cs:line 268 at System.IO.BinaryWriter.Write(Byte[] buffer) at System.Runtime.Serialization.Formatters.Binary.__BinaryWriter.WriteSingleArray(NameInfo memberNameInfo, NameInfo arrayNameInfo, WriteObjectInfo objectInfo, NameInfo arrayElemTypeNameInfo, Int32 length, Int32 lowerBound, Array array) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArray(WriteObjectInfo objectInfo, NameInfo memberNameInfo, WriteObjectInfo memberObjectInfo) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) at PaintDotNet.SystemLayer.Clipboard.Transaction.<>c__DisplayClass13_0.<AddManagedData>b__0(Stream dataStream) in D:\src\pdn\src\SystemLayer\Clipboard.cs:line 335 at PaintDotNet.SystemLayer.Clipboard.Transaction.AddRawNativeData(UInt32 formatID, Action`1 copyToStreamFn) in D:\src\pdn\src\SystemLayer\Clipboard.cs:line 363 at PaintDotNet.SystemLayer.Clipboard.Transaction.AddManagedData(Object data) in D:\src\pdn\src\SystemLayer\Clipboard.cs:line 330 at PaintDotNet.Actions.CopyToClipboardActionBase.PerformAction() in D:\src\pdn\src\PaintDotNet\Actions\CopyToClipboardActionBase.cs:line 98 Quote
null54 Posted January 31, 2018 Posted January 31, 2018 It looks like Paint.NET ran out of memory when trying to copy the image to the clipboard. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait
Rick Brewster Posted January 31, 2018 Posted January 31, 2018 It's an error or a crash? Also, why's it all on one line? That makes it impossible to read Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
Ishi Posted January 31, 2018 Author Posted January 31, 2018 Its a problem that causes PDN to display that dialog box that also shows the error log but it does not really grind PDN to a stop. Here's the error log again. I used the forum function to insert a line of code. I think it does not behave as it once used to. System.ComponentModel.Win32Exception (0x80004005): HeapAlloc() returned NULL (requestedSize = 137,816,064 bytes) (0, ERROR_SUCCESS) at PaintDotNet.SystemLayer.NativeUtilities.ThrowOnWin32Error(String message, Int32 lastWin32Error, Boolean alwaysThrow) in D:\src\pdn\src\SystemLayer\NativeUtilities.cs:line 88 at PaintDotNet.SystemLayer.MemoryManagement.HeapBuffer..ctor(HeapAllocator heap, Int64 size, AllocationOptions flags) in D:\src\pdn\src\SystemLayer\MemoryManagement\HeapBuffer.cs:line 68 at PaintDotNet.SystemLayer.MemoryManagement.HeapAllocator.Allocate(Int64 size, AllocationOptions flags) in D:\src\pdn\src\SystemLayer\MemoryManagement\HeapAllocator.cs:line 63 at PaintDotNet.MemoryManagement.Proxies.AllocatorProxy.Allocate(Int64 size, AllocationOptions flags) in D:\src\pdn\src\Base\MemoryManagement\Proxies\AllocatorProxy.cs:line 56 at PaintDotNet.IO.NativeMemoryStream.set_Capacity(Int64 value) in D:\src\pdn\src\Base\IO\NativeMemoryStream.cs:line 111 at PaintDotNet.IO.NativeMemoryStream.EnsureCapacity(Int64 desiredCapacity) in D:\src\pdn\src\Base\IO\NativeMemoryStream.cs:line 411 at PaintDotNet.IO.NativeMemoryStream.Write(Byte* pBuffer, Int64 count) in D:\src\pdn\src\Base\IO\NativeMemoryStream.cs:line 307 at PaintDotNet.IO.NativeMemoryStream.Write(Byte[] buffer, Int64 offset, Int64 count) in D:\src\pdn\src\Base\IO\NativeMemoryStream.cs:line 283 at PaintDotNet.IO.NativeMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count) in D:\src\pdn\src\Base\IO\NativeMemoryStream.cs:line 268 at System.IO.BinaryWriter.Write(Byte[] buffer) at System.Runtime.Serialization.Formatters.Binary.__BinaryWriter.WriteSingleArray(NameInfo memberNameInfo, NameInfo arrayNameInfo, WriteObjectInfo objectInfo, NameInfo arrayElemTypeNameInfo, Int32 length, Int32 lowerBound, Array array) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArray(WriteObjectInfo objectInfo, NameInfo memberNameInfo, WriteObjectInfo memberObjectInfo) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) at PaintDotNet.SystemLayer.Clipboard.Transaction.<>c__DisplayClass13_0.<AddManagedData>b__0(Stream dataStream) in D:\src\pdn\src\SystemLayer\Clipboard.cs:line 335 at PaintDotNet.SystemLayer.Clipboard.Transaction.AddRawNativeData(UInt32 formatID, Action`1 copyToStreamFn) in D:\src\pdn\src\SystemLayer\Clipboard.cs:line 363 at PaintDotNet.SystemLayer.Clipboard.Transaction.AddManagedData(Object data) in D:\src\pdn\src\SystemLayer\Clipboard.cs:line 330 at PaintDotNet.Actions.CopyToClipboardActionBase.PerformAction() in D:\src\pdn\src\PaintDotNet\Actions\CopyToClipboardActionBase.cs:line 98 Quote
Rick Brewster Posted February 2, 2018 Posted February 2, 2018 This is not a bug. Paint.NET needed to allocate memory and it couldn't, so it told you instead of crashing. Are you using a 64-bit edition of Windows? If not, I recommend you switch to that. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.