From: John H. <jdh...@ac...> - 2004-03-11 16:28:13
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes: Flavio> Hi I have a variant of the embedding_in_wx script that Flavio> worked fine on my previous version of matplotlib. Now, Flavio> with version 0.51 it's seg faulting. I updated the script Flavio> to reflect the changes in the library but still... Can Flavio> anyone see what may be going wrong? Please resend as an attachment - your lines are wrapped and hence the code is doubly difficult to debug. A couple of suggestions: wx swallows exceptions. This makes it virtually impossible to debug scripts using wx since you cannot read the stack trace. The problem may be a simple syntax error in your script having nothing to do with matplotlib or the wx backend per se, and you wouldn't see it because of the exception swallowing problem. Workarounds: 1) insert some print statements at the top of each function so you can see when the failure occurs. This is essentially what Jeremy does in backend_wx. Change the _DEBUG level to a low number in backend_wx to get more debugging information. 2) try running pychecker on your script. A lifetime supply of free bugfixes to any wx guru who knows how to fix this problem - Jeremy and I have certainly suffered with it long enough. JDH |