Skip to main content

ipython + matplotlib crashing

I've been having this problem ever since I changed to 1.0.1. It's not clear if it is ipython's fault or matplotlib's fault.

Today I got the first error message before segfault:

objc[56139]: FREED(id): message removeFromSuperviewWithoutNeedingDisplay sent to freed object=0x19b37470

And Mac OS X error report:

Date/Time:       2011-07-15 21:47:54.500 -0400
OS Version:      Mac OS X 10.5.8 (9L30)
Report Version:  6
Anonymous UUID:  655916BF-D521-48C5-B8A3-FBC5E5FA6683

Exception Type:  EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Crashed Thread:  0

Application Specific Information:
objc[56139]: FREED(id): message removeFromSuperviewWithoutNeedingDisplay sent to freed object=0x19b37470

Thread 0 Crashed:
0   libobjc.A.dylib                0x90595bfa _objc_error + 116
1   libobjc.A.dylib                0x90595c30 __objc_error + 52
2   libobjc.A.dylib                0x90594637 _freedHandler + 58
3   com.apple.CoreFoundation       0x93faa676 CFArrayApplyFunction + 198
4   com.apple.AppKit               0x91a0aadc -[NSView _finalizeWithReferenceCounting] + 712
5   com.apple.AppKit               0x91a0a7e8 -[NSView dealloc] + 46
6   com.apple.Foundation           0x9524e68f NSPopAutoreleasePool + 1007
7   _macosx.so                     0x02932580 wait_for_stdin + 561 (_macosx.m:171)
8   readline.so                    0x0133bac0 call_readline + 432
9   org.python.python              0x001e04de PyOS_Readline + 254
10  org.python.python              0x0028dbfc builtin_raw_input + 412
11  org.python.python              0x00296165 PyEval_EvalFrameEx + 19429
12  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
13  org.python.python              0x0029634c PyEval_EvalFrameEx + 19916
14  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
15  org.python.python              0x0029634c PyEval_EvalFrameEx + 19916
16  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
17  org.python.python              0x0029634c PyEval_EvalFrameEx + 19916
18  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
19  org.python.python              0x0029634c PyEval_EvalFrameEx + 19916
20  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
21  org.python.python              0x0029634c PyEval_EvalFrameEx + 19916
22  org.python.python              0x002982dd PyEval_EvalCodeEx + 2109
23  org.python.python              0x002983f7 PyEval_EvalCode + 87
24  org.python.python              0x002bcf08 PyRun_FileExFlags + 168
25  org.python.python              0x002bddf3 PyRun_SimpleFileExFlags + 867
26  org.python.python              0x002cf902 Py_Main + 3122
27  org.python.python              0x00001f82 0x1000 + 3970
28  org.python.python              0x00001ea9 0x1000 + 3753

Comments

Popular posts from this blog

A note on Python's __exit__() and errors

Python's context managers are a very neat way of handling code that needs a teardown once you are done. Python objects have do have a destructor method ( __del__ ) called right before the last instance of the object is about to be destroyed. You can do a teardown there. However there is a lot of fine print to the __del__ method. A cleaner way of doing tear-downs is through Python's context manager , manifested as the with keyword. class CrushMe: def __init__(self): self.f = open('test.txt', 'w') def foo(self, a, b): self.f.write(str(a - b)) def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): self.f.close() return True with CrushMe() as c: c.foo(2, 3) One thing that is important, and that got me just now, is error handling. I made the mistake of ignoring all those 'junk' arguments ( exc_type, exc_val, exc_tb ). I just skimmed the docs and what popped out is that you need to return True or

Using adminer on Mac OS X

adminer is a nice php based sqlite manager. I prefer the firefox plugin "sqlite manager" but it currently has a strange issue with FF5 that basically makes it unworkable, so I was looking for an alternative to tide me over. I really don't want apache running all the time on my computer and don't want people browsing to my computer, so what I needed to do was: Download the adminer php script into /Library/WebServer/Documents/ Change /etc/apache2/httpd.conf to allow running of php scripts (uncomment the line that begins: LoadModule php5_module Start the apache server: sudo apachectl -k start Operate the script by going to localhost Stop the server: sudo apachectl -k stop