Jump to content

PDN Crashes Whilst Undoing A Flatten


Geoff
 Share

Recommended Posts

I have been experiencing a problem that occurs when i undo a flatten through a few versions of PDN so i thought it was about time to bring it up.

I first started noticing this problem in PDN 3.10, 3.20 and now 3.22b.This problem only ever occurs whenever i have a large canvas with a number of active layers. The problem starts once i have flattened all layers of the .pdn file, save it (as a .jpg/.png), and then undo the flatten to continue on editing the .pdn file. During processing the undo flatten PDN will instantly crash and place a log on my desktop (i will post it if you want it). However if i do the same thing without saving it as another file type, PDN will not crash whilst undoing the flatten.

If anyone else is experiencing or has experienced this problem please feel free to reply to this post.

Geoff

Signatureb.jpg

Link to comment
Share on other sites

"Exception details:

System.OutOfMemoryException: CreateDIBSection returned NULL (8) while attempting to allocate 5000x5000 bitmap"

You ran out of memory :D

Not surprising, with a 5000x5000 image with multiple layers and only a little over 1GB of RAM.

Time for an upgrade, maybe?

Still, though, IMO, it shouldn't cause a crash, but instead just a friendly error message.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

Well, obviously you had enough memory to have all those layers before flattening and saving, and since the issue only appears after saving, my guess would be that the saving process uses some additional memory, and is maybe not cleaning up after itself completely, or just not getting garbage collected in time.

Of course, I'm certainly no expert when it comes to memory management. I've had both Rick Brewster and Ed Harvey yell at me about my memory practices on separate occasions...

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

Thanks for your quick replies, and yes i agree with you that PDN should just create a warning message telling you that your out of memory instead of just crashing without giving you the option to do something about the issue.

Geoff

Signatureb.jpg

Link to comment
Share on other sites

There is code to protect against crashes caused by out of memory conditions in many places. Unfortunately, it has not been possible to protect the history system. When you undo a flatten operation, a large amount of memory must be allocated in order to restore the image back to its pre-flattened state.

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.

 Share

×
×
  • Create New...