SourceForge logo
SourceForge logo
Menu

[matplotlib-devel] wxPython reference leak was (Re: Memory leaks)

From: Michael D. <md...@st...> - 2007年07月06日 12:47:04
I had no trouble reproducing this on my Ubuntu Feisty box.
It turns out that wxPython leaks a dictionary for every object whose 
class subclasses a Wx class. There is a fix for this that made it into 
wxPython-2.8.3.0:
http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1 
<http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1>
I have verified this on my source-built wxPython-2.8.4.0. If I remove 
this line, I can reproduce the reference leak.
** I would recommend that anyone using a wxPython-2.8.x prior to 
wxPython-2.8.4 should upgrade. There are binary packages available for 
a number of distributions on wxpython.org. **
As an aside, I filed a bug for this on Ubuntu launchpad. I don't know 
if this qualifies for the kind of fix they would normally make as a 
maintenance release. Promisingly, my bug was confirmed within about 
five minutes of filing it.
https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381 
<https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381>
Cheers,
Mike
Eric Firing wrote:
> Michael Droettboom wrote:
>> Interesting...
>>
>> When you get a chance, would you mind running the attached script? 
>> This is how I was finding object leaks before. It takes a single 
>> commandline argument that is the number of iterations. Can you send 
>> me the outputs from 1 and 2 iterations? That way we should be able 
>> to see what type of object is being leaked, which is a good first step.
>
> efiring@manini:~/programs/py/mpl/tests$ python memleak_gui_wx.py 1
> 75891 76010
> *** <class 'wx._core.PySimpleApp'>
> *** <class 'wx._core._wxPyDeadObject'>
>
> uncollectable list: []
>
> efiring@manini:~/programs/py/mpl/tests$ python memleak_gui_wx.py 2
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer 
> Dell424 could not be loaded.
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer pslj4m 
> could not be loaded.
> 75891 76014
> *** <class 'wx._core.PySimpleApp'>
> *** <class 'wx._core._wxPyDeadObject'>
>
> uncollectable list: []
>
>
> Eric
>

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /