Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MATLAB crash file:/Users/robince/matlab_crash_dump.40224
- ------------------------------------------------------------------------
- Bus error detected at Fri Nov 13 13:36:42 2009
- ------------------------------------------------------------------------
- Configuration:
- MATLAB Version: 7.8.0.347 (R2009a)
- MATLAB License: 161051
- Operating System: Darwin 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386 i386
- Window System: The X.Org Foundation (10402000), display /tmp/launch-2p1ZWg/:0
- Current Visual: 0x24 (class 4, depth 24)
- Processor ID: x86 Family 6 Model 15 Stepping 10, GenuineIntel
- Virtual Machine: Java 1.6.0_15-b03-219 with Apple Inc. Java HotSpot(TM) Client VM mixed mode
- Default Encoding: ISO-8859-1
- Fault Count: 1
- Register State:
- eax = 00000000 ebx = 3323d9be
- ecx = 33868710 edx = 00000000
- esi = 33011dc0 edi = 0000001a
- ebp = b0902938 esp = b0902920
- eip = 3325559f flg = 00010282
- Stack Trace:
- [0] Python:type_dealloc~(0x33011dc0, 0x337e1818, 0x33254f0b, 0x33244410) + 26 bytes
- [1] Python:dict_dealloc~(0x33860ae0, 0x332e4b40 "__builtin__", 0xb09029bc, 0xb09029b8) + 142 bytes
- [2] Python:dict_dealloc~(0x337b39c0, 0x332ee58c "exitfunc", 0xb09029d8, 0x332b96b0) + 142 bytes
- [3] Python:_PyImport_Fini~(0x332ee58c "exitfunc", 0, 0, 0) + 82 bytes
- [4] Python:Py_Finalize~(673024, 1, 0, 0x00ab4700) + 207 bytes
- #include <mex.h>
- #include <Python/Python.h>
- static int PYRUNNING = 0;
- static void Cleanup(void)
- {
- mexPrintf("Finalising Python...\n");
- Py_Finalize();
- }
- void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray*prhs[])
- {
- mexPrintf("hello from mex\n");
- if (!PYRUNNING) {
- Py_Initialize();
- PYRUNNING = 1;
- mexAtExit(Cleanup);
- // add current dir to path for development
- PyRun_SimpleString("import sys,os; sys.path.append(os.getcwd())");
- PyRun_SimpleString("import mexpywrap");
- PyRun_SimpleString("rdr=mexpywrap.MexRedirector();sys.stdin,sys.stdout = rdr,rdr");
- }
- PyRun_SimpleString("print 'hello from python'");
- }
Add Comment
Please, Sign In to add comment