Jump to content

Crash on File->Save Dialog with large file.


Recommended Posts

I'll start with the crash log.

Crash log for Paint.NET v2.6 (Release Candidate 2 Release build 2.6.2232.23935)

Time of crash: 2/12/2006 12:09:14 PM

OS version: 5.1.2600.131072 Service Pack 2 Workstation x86

.NET Framework version: 2.0.50727.42 x86

Processor count: 2

Physical memory: 2047 MB

Exception details:

System.ObjectDisposedException: Cannot access a disposed object.

Object name: 'Document'.

at PaintDotNet.Document.Update(RenderArgs dst)

at PaintDotNet.DocumentView.surfaceBox_PrePaint(Object sender, PaintEventArgs2 e)

at PaintDotNet.SurfaceBox.OnPrePaint(PaintEventArgs2 e)

at PaintDotNet.SurfaceBox.OnPaintImpl(PaintEventArgs2 e)

at PaintDotNet.SurfaceBox.OnPaint(PaintEventArgs e)

at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)

at System.Windows.Forms.Control.WmPaint(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at PaintDotNet.SurfaceBox.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

------------------------------------------------------------------------------

File is 120MB tiff from Library of Congress Archives online ar160300. You can download the MrSID viewer and export the image as a TIFF. Trying to save as a jpeg. Crash happens before preview is drawn in Save Dialogue. Also uses 100% of both cores for a long time and TONS of memory before the crash. I'd look at the code myself as .NET is what I do, but time isn't in my favor for doing that right now.

Regards,

Paul Seabury

[EDIT] - Additionally, the processor is an X2-4200. Just in case it's related to the physical hardware. I know that I've had a couple of problems with apps reading the timestamp counters on dual core AMD's (eg. Mozilla Thunderbird) correctly.

[EDIT2] - Crash is actually on jpeg quality change. Seems to produce an error no matter which way I go with the slider, but if I go from default to 100% I usually get the crash. If I go from higher quality to lower, then the "File Size: " label under the preview changes its status to error. The images below are task manager related to PDN. My host seems to be down right now (blizzard and all), but I'll check back to make sure they work once it's back up.

pdn_tm1.JPG

pdn_tm2.JPG

Link to comment
Share on other sites

120MB too big? That's really not all that large....at least I don't think. Seems like PDN handles it mostly fine...just the jpeg quality adjustment doesn't. I played around with the image as far as adding/removing effects, resizing, rotating etc and there were no probs.

Link to comment
Share on other sites

It doesn't matter if it's 100mb. It takes up way more than 100mb after it's been decoded / decompressed.

Take the size of the image, in pixels ... width X height X 4 X (number of layers + 2 ... which means 3 in this case). That's how much memory it takes up. x4 is because each pixel takes 4 bytes (blue, green, red, alpha components), x3 because we have to store the image, a scratch surface, and a composition of the image in memory (mostly important when you have >1 layer).

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

Bob, that actually wouldn't help, most likely. On a 32-bit system, each process is limited to 2 GB of memory usage ... period. So closing down other processes doesn't free up extra addressing space for Paint.NET. From looking at the Task Manager screenshots there, it appears that there is plenty of committable memory left.

Paint.NET's architecture just doesn't handle large images very well on 32-bit systems. If Paul were to migrate to 64-bit Windows, things would probably work but I don't know how good the performance would be.

I tried saving as a JPEG on this 32-bit system here (2GB RAM) and it failed in the same way. I'm in the process of copying the files to my 64-bit system to see if it can handle 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

  • 2 weeks later...

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