Jump to content

Drawing crashed v2.5...


Recommended Posts

I was drawing (a doodle) and after about 3 mins of drawing it crashed and left me with a log file of the crash. So, hopefully that will help...

Now, when I say "drawing", I mean I was drawing for 3 mins straight with ONE click-hold with one line. So, I click and hold to start my doddle and never let up for 3 mins straight... I am about to try it again...

Yep... in about 3 to 4 mins of a single click hold with the drawing tool it crashes. It affected the desktop this time too, but once I successfully cleared out the program it (the desktop) went back to normal.

I am not sure how you handle the message events but maybe something is going on in there that is being overloaded by the single click event.

In addition Maybe it has to do with the other apps I have running. Meaning if I had less apps running it would take longer for it to crash. I don't have time to research this (wish I did) but it IS repeatable... (my machine has 512MB RAM, Windows 2K AS, Firefox, Thunderbird, Gaim, Subird and Excel, were running when it happened)

If you want the log files (for each crash) let me know, with how to deliver them, and I will GLADLY send them.

I love this app and I think you guys are doing a Super-duper job. (boy is that an indication of my age :( )

Still you guys are doing an awesome job, and if I had the time I would debug it myself but I have a family and a job...

So, thanks a bunch...

Sincerely,

G

Link to comment
Share on other sites

If you want the log files (for each crash) let me know, with how to deliver them, and I will GLADLY send them.

Open the log.

Copy all.

Paste here.

No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio

Link to comment
Share on other sites

Sorry about that...

I diffed the files, there is no diff except the date time ... So, here is one file...

Crash log for Paint.NET v2.5 (Final Release build 2.5.2153.32600)

Time of crash: 12/15/2005 10:09:23 AM

OS version: 5.0.2195.0

.NET Framework version: 1.1.4322.2032

Exception details:

System.ComponentModel.Win32Exception

at PaintDotNet.SystemLayer.NullGraphics..ctor()

at PaintDotNet.SystemLayer.PdnGraphics.GetRegionScans(Region region, Rectangle[]& scans, Int32& area)

at PaintDotNet.PdnRegion.GetRegionScansReadOnlyInt()

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.ControlNativeWindow.OnMessage(Message& m)

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

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

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

There... That's it...

Thanks Bob, I am slightly embarassed for not thinking of that one..

:-D

Link to comment
Share on other sites

I don't understand the whole Paint.NET code to be able to read that crash log, but I tested it out with the Task Manager "Performance" tab selected. When drawing with the Paintbrush, my computer immediately jumps to 100% CPU usage, and the Page File Use goes up steadily, slowly but steadily.

Next time when you try to replicate this, try opening up the Task Manager and look at your system resource usage information while doodling. System.ComponentModel.Win32Exception seems to suggest to me that it could have been a problem outside of Paint.NET, which could be a memory exception.

But then again, what do I know? I'm just a lowly Web Developer. :wink:

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

but I don't think it is something "outside" of Paint.NET... I think it must be something in how Paint.NET is working. Possibly how it is storing history information? (WAG)

I don't know.

I will say that when you close Paint.NET (after the crash) with the Task Man Perf Mon visible you will see that the "rise" in resource use goes back to where it was... That, to me, indicates Paint is crashing itself and cleaning up after itself, which is always good. But, the crash is a bug in Paint... (IMO)

I only posted here because I don't know where the bug tracker is.

Link to comment
Share on other sites

I just wanted to post the log file because it (Paint.NET) produced one. I figured it might help...

Oh if Rick stops by, then it will be very helpful. I'm just another user, and I'm not a C# programmer, so I can't look at the code and decipher it.

but I don't think it is something "outside" of Paint.NET... I think it must be something in how Paint.NET is working. Possibly how it is storing history information?

Well, what I meant by "outside" was that it's not necessarily a bug in a scrap of code in Paint.NET, but a general unhandled system-out-of-memory exception. Sorry, I see your point. I didn't clarify that bit too well.

I am not a mechanism, I am part of the resistance;

I am an organism, an animal, a creature, I am a beast.

~ Becoming the Archetype

Link to comment
Share on other sites

This is actually caused by some old code dating back to Paint.NET v1.0, and a change in the way memory allocation is handled starting with Paint.NET v2.5.

Each stroke of the paintbrush affects a region of the current layer, and we take the bounding rectangle of that region and make a copy of it into a temporary in-memory bitmap before drawing the brush stroke. Before v2.5, these bitmaps were allocated using normal sections of memory, but in v2.5 we actually allocate what's called a DIB (Device Independent Bitmap). For our rendering code this makes it faster to go from our composition surface to the screen. Each of these DIB sections uses up 1 GDI object, of which there is a limited number available for each application.

Notice that as you continually draw with the paintbrush, PaintDotNet.exe's memory usage in Task Manager spirals upward.

The code that dates back to v1.0 was written in the face of certain design limitations. Those limitations are now gone, and I can now go and improve the paintbrush to not crash in this scenario, use less memory in general, and to actually be faster.

By the way, here's the crash log that I got after going for about 2 minutes. If you add the "GDI Handles" column to the Task Manager's Processes tab, it crashes right when the number hits 9,999:

Crash log for Paint.NET v2.6 (Alpha 2 Release build 2.6.2179.30797)
Time of crash: 2005-12-20 8:51:09 PM
OS version: 5.1.2600.131072
.NET Framework version: 2.0.50727.42 X86
Processor count: 2

Exception details:
System.InvalidOperationException: BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress.
  at System.Drawing.BufferedGraphicsContext.Dispose(Boolean disposing)
  at System.Drawing.BufferedGraphicsContext.Dispose()
  at System.Drawing.BufferedGraphicsContext.AllocBufferInTempManager(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
  at System.Drawing.BufferedGraphicsContext.Allocate(IntPtr targetDC, Rectangle targetRectangle)
  at System.Windows.Forms.Control.WmPaint(Message& m)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  at System.Windows.Forms.ToolStrip.WndProc(Message& m)
  at System.Windows.Forms.StatusStrip.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)
------------------------------------------------------------------------------

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