7

I can open smaller tifs no problem, but these tifs at 100+MB cannot be opened in Paint.NET. I don't think it's memory issue, because other software can open with no problems (IrfanView, XNViewPortable). Is this a software limitation?

"There was an unspecified error while opening the file."

http://dl.dropbox.com/u/1156285/PaintDotCrash_OpenBifTif.avi

I'm using Paint.NET v3.5.5 (Final Release build 3.55.3767.28608) on XP SP3.

Update:

I think Joel Coehoorn's answer is on the right track. I converted the image to black/white resulting in a file size of just under 5MB. Then attempted to open and received the error again.

Using the original, I tried all sorts of things and eventually figured out that if I reduced the pixels from 6000x6000 to 5000x5000, I could open the image in Paint.NET (even 24bit color).

2
  • You should send Rick Brewster (the developer of paint.net) a bug report.
    – akid
    Oct 28, 2010 at 17:37
  • Actually, I found Rick Brewster's explanation: goo.gl/ddV3 It's a known feature (or bug). Oct 28, 2010 at 17:42

3 Answers 3

4

It sounds like you're getting an OutOfMemory exception. The .Net OutOfMemory exception is a bit misleading. It's much more common to see this exception when you run out of address space, which is a little different than physical memory. This means things like checking the task manager to see how much memory is used may not help you track the problem.

Instead, the problem is likely the result of a bug in Paint.Net, such that certain parts of the image are placed by the .Net runtime on something called the Large Object Heap. The file is then loaded in such a way that this same set of memory is created and destroyed several times, perhaps such that it gets a little larger each time. The garbage collector doesn't free up or compact the address space from the Large Object Heap very well (even though the physical memory was released or paged), and so suddenly you get an OutOfMemory exception.

The solution is either for Microsoft to change the behavior of the .Net runtime with respect to the LOH, such that it can go in and compact the LOH in certain situations (perhaps on request, or before throwing the OutOfMemory exception), or for the Paint.Net program to fix the way it loads the file such that it correctly grows whatever existing data structure is causing the problem, rather than recreating it over and over.

2
  • 1
    I think this message on the Paint.NET forum describes what is happening: goo.gl/ddV3 Oct 28, 2010 at 17:35
  • @Jay - that's a good way of looking at it. I'm not sure that's exactly your issue, though, as your problem as I understand it is more consistent: you can never load the image, while the link you posted describes a situation where you could load it successfully, but only if it's the first image you open after starting up Paint.Net. Oct 28, 2010 at 17:47
3

The way a file like this is stored in memory affects how much memory it requires. The other applications might be more memory-efficient.

Given your description, it really sounds like Paint.NET runs out of memory. You could try having the Task Manager open while trying to open the file to see if memory usage grows.

2
  • Good suggestion. I checked and the memory doesn't change. The error occurs instantly--almost like Paint.NET isn't even trying to open the file. Oct 28, 2010 at 13:15
  • btw, when i get 15 rep, i'll +1 this answer. Oct 28, 2010 at 13:16
3

it may be trying to allocate a contiguous block of memory to read the file, try closing as many apps as possible then retry opening it.

1
  • I did try that yesterday, but that doesn't seem to be the issue. Oct 28, 2010 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .