GPF on XP

John Hunter wrote:

    >> gc.collect() Should cure what ails you!
    >>

    > The good news is that it is a huge improvement, but the
    > bad news is that I'm still getting a GPF, just a lot less
    > often :frowning: Try bumping the minimal test loop up to 5k, it
    > failed at 3057 for me.

Bet you had to wait a while for that one. Maybe you should use
the full test script. At lease you'll fail faster :slight_smile:

matplotlib does some caching in various places for efficiency which
will slowly eat memory. We need to add some automated means to clear
this cache but we don't have it yet.

What happens if you comment out this line in text.py

    self.cached[key] = ret

and this line in backend_agg.py

  _fontd[key] = font

We have a linux/unix specific script for testing for memory leaks in
the mpl src distro unit/memleak_hawaii3.py. You may want to adapt
something like this for windows xp so we can get firm numbers on how
much is leaking per figure. See also
http://matplotlib.sourceforge.net/faq.html#LEAKS. Todd Miller knows a
clever way of getting python to report how may object references it
has a hold of, but I can't remember the magic command right now.

With matplotlib CVS on linux, that script is reporting no detectable
leak. But your script may be exposing a leak not covered by that
one.

JDH

John Hunter wrote:

"Robert" == Robert Leftwich <robert@...488...> writes:

    > The good news is that it is a huge improvement, but the
    > bad news is that I'm still getting a GPF, just a lot less
    > often :frowning: Try bumping the minimal test loop up to 5k, it
    > failed at 3057 for me.

Bet you had to wait a while for that one.

Not on the new laptop!

> Maybe you should use

the full test script. At lease you'll fail faster :slight_smile:

Yep, using the real data, it fails pretty quickly.

What happens if you comment out this line in text.py

    self.cached[key] = ret

and this line in backend_agg.py

  _fontd[key] = font

It's worse, the minimal test fails at 4!, but the real data takes 180 or so.

We have a linux/unix specific script for testing for memory leaks in
the mpl src distro unit/memleak_hawaii3.py. You may want to adapt
something like this for windows xp so we can get firm numbers on how
much is leaking per figure.

I'll attempt this when time permits, possibly late today, but sometime later this week is more likely.

Robert