Opened 6 years ago

Closed 6 years ago

#190 closed defect (fixed)

Massive GDI object leakages

Reported by: azawawi Owned by:
Priority: critical Milestone:
Component: editor Version: 0.22
Keywords: Cc:

Description

I am adding this on behalf of 'Adam Kennedy' for future reference and tracking purpose. For more information on the discussion of this issues please refer to: http://mail.perlide.org/pipermail/padre-dev/2008-December/000392.html


Adam K says:
I've recently started noticing that if I try to use Padre for long
periods of time (one work day) on Windows it eventually stops
displaying icons and labels.

This is a typical symptom of GDI object exhaustion.

On Windows, all visible application elements interact with the
operating system via the Graphics Device Interface.

http://en.wikipedia.org/wiki/Graphics_Device_Interface

Every panel, icon, button, etc, needs to have a GDI object in order
for Windows to correctly render it to screen.

A typical number of GDI objects used by an application such as an
editor is a few hundred (Ultraedit uses 433, Notepad++ about 350,
Padre is around 250 at startop).

The problem is that Padre is leaking these GDI objects like you
wouldn't believe. For example, Padre is currently leaking one GDI
object per keystroke!

This quickly results in Padre blowing out to 5,000 or 10,000 GDI
objects, exhausting the stack and resulting in ugly degradation of the
GUI.

On older (or all?) Windows (2k at least) this pool is also globally
shared, meaning that GDI exhaustion results in ALL applications on the
machine degrading.

To get some visibility of the GDI objects used by Padre, open the Task
Manager, select the menu View -> Select Columns... and then tick the
"GDI Objects" column.

Then just open an empty document and start typing...

Change History (1)

comment:1 Changed 6 years ago by azawawi

  • Priority changed from major to critical
  • Resolution set to fixed
  • Status changed from new to closed

Fixed it in trunk. Thanks for AdamK++ for reporting it.
This still leaks but far less slowly. Try undo and redo (CTRL-Z,CTRL-Y) several times for some GDI resource leakage. And when you close the file, the GDI leak simply goes away.

For changeset, please see http://padre.perlide.org/changeset/2281

Ahmad

Note: See TracTickets for help on using tickets.