This looks like that was introduced by a patching error when fixing the 
Tk save figure bug recently.  The bug tracker added an extraneous 
newline to my patch submitted as a comment.  (That's the last time I do 
that ;)

http://sourceforge.net/tracker/index.php?func=detail&aid=1716732&group_id=80706&atid=560720
 


The segfault was happening because it was trying to blit to a window 
that had been destroyed (and the figure manager wasn't creating a new 
window as it should have.)

I've committed a fix on the Python end, and also a check to the C side 
(_tkagg.cpp), so that if we get ourselves into that situation again, 
we'll get a Python exception rather than a segfault.

If you still see crashes with the Qt backend, also let us know.  This 
fix doesn't affect Qt at all.

Cheers,
Mike

Michael Droettboom wrote:
> FWIW, I'm able to reproduce this here.  I have a hunch it may be related 
> to my recent Tk memory leak "improvements".  I'll look into this further 
> and get back soon.
>
> Cheers,
> Mike
>
> John Hunter wrote:
>   
>> On 7/13/07, Rob Hetland <[EMAIL PROTECTED]> wrote:
>>   
>>     
>>> Nope -- the same occurs in the regular terminal, so it's not
>>> iPython's fault.
>>>
>>> Also, although I though I remembered this happening with qt4 (as
>>> posted below), I do not seem to be able to reproduce this now..
>>>
>>> Also, clearing and closing the figure works fine -- only clicking it
>>> away triggers the bug.
>>> So:  Almost surely MPL, probably Tk, is my guess.
>>>     
>>>       
>> Included below are our standard segfault instructions.  The first
>> thing to do is to make sure you blow away your build dir and installed
>> mpl and get a clean build.  Secondly, make sure you are using numpy
>> and your rc numerix setting is numpy.  Here are the instructions::
>>
>>
>> # How to diagnose where a segfault is occurring
>>
>> First thing to try is simply rm -rf the site-packages/matplotlib and
>> build subdirs and get a clean install.  Installing a new version over
>> a pretty old version has been known to cause trouble, segfault, etc.
>>
>> Try importing these packages individually
>>
>>   import matplotlib._image
>>   import matplotlib._transforms
>>
>>   #one of these three depending on which numerix package you are using
>>   import matplotlib.backends._na_backend_agg # for numarray
>>   import matplotlib.backends._nc_backend_agg # for Numeric
>>   import matplotlib.backends._ns_backend_agg # for numpy
>>
>>   import matplotlib.backends._tkagg
>>   import matplotlib._agg
>>
>>
>> If the last two work and the others don't, it is likely you need to
>> upgrade your gcc, because on some platforms (OS X for sure) old
>> versions of gcc cannot compile new versions of pycxx, which matplotlib
>> uses for building some but not all of it's extensions.  Report back
>> which if any work or segfault or raise tracebacks,
>>
>> If that shed additional light, again flush the build and install dirs,
>> and try setting VERBOSE=True in setup.py before doing a clean install.
>> The VERBOSE setting will generate lots of extra output and may help
>> indicate where the segfault is occurring
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Matplotlib-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>   
>>     
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to