Jump to content

Paint.NET 2.5 Beta 5 constantly crashing...


Recommended Posts

Yeah, I can easily reproduce this. So this is a P1 bug that definitely blocks our release and will force us to put out a Release Candidate 2 in a day or two. Thanks though! It's important to find bugs like this. I'm currently looking in to it.

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

Pffft, way to go me. It's a simple case of > vs. >= (greater than, vs. greater-than-or-equal-to). One character in the code fixes this.

Turns out our "large allocation threshold" is 65,536 bytes. The PNG you are pasting in those steps is 128 x 128, which is exactly 65,536 bytes (128 x 128 x 4 = 65536).

In our code we state, for our constant integer named largeBlockThreshold, "blocks this size or larger are allocated with AllocateLarge instead of Allocate". But then when we allocate we use AllocateLarge for blocks larger than but not equal to this value. Then when we free the memory, we do the comparison correctly. So we end up allocating with AllocateLarge and trying to free with Free instead of FreeLarge. Then Windows gets cranky and throws that "487" error code at us.

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...