malloc error when extending Python to call C++ function - python

I am trying to wrap a C++ function to call from Python.
My C++ code compiles and runs successfully, but when I call it from python I get the following error:
python(6805,0x7fff78401300) malloc: *** mach_vm_map(size=8245930807582093312) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
zsh: abort python
Here is my C++ function, which crawls my filesystem:
const char * crawlDirectory(const string directory)
{
std::vector<std::string> filesVector;
std::vector<std::string> dirsVector;
dirsVector.push_back(directory);
int currDirectoryIndex = 0;
while (currDirectoryIndex < dirsVector.size()) {
GetFilesInDirectory(filesVector, dirsVector, dirsVector[currDirectoryIndex].c_str());
currDirectoryIndex++;
}
std::string filesListString = "";
for (int i=0; i<filesVector.size()-1; i++) {
filesListString += filesVector[i].c_str() + SEPARATOR;
}
//add the last file path without the separator -- faster than a conditional for every iteration
filesListString += filesVector[filesVector.size()-1].c_str();
const char * retString = filesListString.c_str();
return retString;
}
I don't think the problem is in 'GetFilesInDirectory()', but I will post it if necessary.
Here is the extern block, which helps me wrap the function:
extern "C" {
Crawler* Crawler_new(){ return new Crawler(); }
const char * Crawler_crawlDirectory(Crawler* crawler, const string directory){ return(crawler->crawlDirectory(directory)); }
}
Here is the python file that defines the Crawler class:
from ctypes import cdll
from ctypes import *
lib = cdll.LoadLibrary('./libcrawler.so')
lib.Crawler_crawlDirectory.restype = c_char_p
lib.Crawler_crawlDirectory.argtypes = [c_void_p, c_char_p]
lib.Crawler_new.restype = c_void_p
class Crawler(object):
def __init__(self):
self.obj = lib.Crawler_new()
def crawlDirectory(self, path):
return lib.Crawler_crawlDirectory(self.obj, path)
I am positive that my C++ code is being compiled correctly (with g++ as a dylib), because I have tested the wrapper with other functions that return simple things like char*s and integers, and they work correctly.
Here is how I am calling the function from python:
>>> from wrapper import *
>>> c = Crawler()
>>> files = c.crawlDirectory('/Users/whatever/desktop')
Can anyone give insight about solving this issue?
Edit: here is the problem report:
Process: Python [7057]
Path: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.7.6 (2.7.6)
Code Type: X86-64 (Native)
Parent Process: zsh [390]
Responsible: Terminal [285]
User ID: 501
PlugIn Path: /Users/USER/Documents/*/libcrawler.so
PlugIn Identifier: libcrawler.so
PlugIn Version: ??? (0)
Date/Time: 2014-06-08 16:36:24.623 -0700
OS Version: Mac OS X 10.10 (14A238x)
Report Version: 11
Anonymous UUID: F5B91E6D-C318-117A-A457-522AB46FF6DC
Sleep/Wake UUID: E228A7B4-D89E-4DBF-ABF3-510F4CF0EC3B
Time Awake Since Boot: 29000 seconds
Time Since Wake: 8000 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
abort() called
terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff90f5637a __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff88fcc5ff abort + 129
2 libc++abi.dylib 0x00007fff8b95fb31 abort_message + 257
3 libc++abi.dylib 0x00007fff8b9879b9 default_terminate_handler() + 243
4 libobjc.A.dylib 0x00007fff8849c522 _objc_terminate() + 124
5 libc++abi.dylib 0x00007fff8b9850a1 std::__terminate(void (*)()) + 8
6 libc++abi.dylib 0x00007fff8b984b2c __cxa_throw + 121
7 libc++abi.dylib 0x00007fff8b98527a operator new(unsigned long) + 90
8 libc++.1.dylib 0x00007fff94fd1f05 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long) + 59
9 libcrawler.so 0x000000010747cce0 Crawler_crawlDirectory + 32
10 libffi.dylib 0x00007fff90eaaf44 ffi_call_unix64 + 76
11 libffi.dylib 0x00007fff90eab781 ffi_call + 853
12 _ctypes.so 0x0000000106d3c76e _ctypes_callproc + 874
13 _ctypes.so 0x0000000106d36bb9 PyCData_set + 2386
14 org.python.python 0x00000001069f03b8 PyObject_Call + 99
15 org.python.python 0x0000000106a6cc23 PyEval_EvalFrameEx + 11365
16 org.python.python 0x0000000106a7062a 0x1069e6000 + 566826
17 org.python.python 0x0000000106a6d406 PyEval_EvalFrameEx + 13384
18 org.python.python 0x0000000106a69d8a PyEval_EvalCodeEx + 1413
19 org.python.python 0x0000000106a697ff PyEval_EvalCode + 54
20 org.python.python 0x0000000106a897d1 0x1069e6000 + 669649
21 org.python.python 0x0000000106a895ed PyRun_InteractiveOneFlags + 353
22 org.python.python 0x0000000106a890fc PyRun_InteractiveLoopFlags + 192
23 org.python.python 0x0000000106a88fa6 PyRun_AnyFileExFlags + 60
24 org.python.python 0x0000000106a9ab0f Py_Main + 3051
25 libdyld.dylib 0x00007fff8a5575c9 start + 1
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff59221af8 rdx: 0x0000000000000000
rdi: 0x0000000000000d0f rsi: 0x0000000000000006 rbp: 0x00007fff59221b20 rsp: 0x00007fff59221af8
r8: 0x0000000000000000 r9: 0x00007fff88ff6e80 r10: 0x0000000008000000 r11: 0x0000000000000206
r12: 0x00007fff59221c80 r13: 0x00007fff592222e0 r14: 0x00007fff78401300 r15: 0x00007fff59221b60
rip: 0x00007fff90f5637a rfl: 0x0000000000000206 cr2: 0x00007fff785f2fc8
Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133
Binary Images:
0x1069dd000 - 0x1069ddfff org.python.python (2.7.6 - 2.7.6) <4E825039-BF7C-36CC-95A6-2838E8CE9459> /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
0x1069e6000 - 0x106ad7fff org.python.python (2.7.6 - 2.7.6) <CC202176-2054-3AFB-96FE-20A5BA7CDBB6> /System/Library/Frameworks/Python.framework/Versions/2.7/Python
0x106c9b000 - 0x106cd9ff7 +readline.so (???) <91E41C1B-723F-375F-B456-45B90A19C9F6> /Library/Python/2.7/site-packages/readline-6.2.4.1-py2.7-macosx-10.7-intel.egg/readline.so
0x106d34000 - 0x106d42fff _ctypes.so (83) <BAFE040D-E6AE-3E23-A09F-263880D952DC> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so
0x106d4d000 - 0x106d50fff _struct.so (83) <D7F99BC3-044F-36EF-BB24-8ABA131FFABB> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so
0x106d57000 - 0x106d5aff7 math.so (83) <A4587FDC-4D30-3FC5-B69B-C83E8008F5BF> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so
0x106d60000 - 0x106e36fff +multiarray.so (0) <06018061-CCAB-3799-9DC3-1A519A7FD31C> /Library/Python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/core/multiarray.so
0x106edf000 - 0x106ee8fff datetime.so (83) <9C16F413-04EE-3A67-AB8A-0590C51A555C> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/datetime.so
0x106ef1000 - 0x106f32ff7 +umath.so (0) <EBCBAE97-82A7-3F13-8470-7118A54E7511> /Library/Python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/core/umath.so
0x106f9f000 - 0x106fa1fff _collections.so (83) <47D407DA-2ED6-32E6-AA28-2A82F6677A6F> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so
0x106fa7000 - 0x106faafff operator.so (83) <360151DB-EDA1-3AAA-ADCC-16F4B3B57B38> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so
0x106fb0000 - 0x106fb4fff itertools.so (83) <B4F4CA00-C7A9-30CD-A834-B2202E33D057> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so
0x106fbd000 - 0x106fbefff _heapq.so (83) <F1606EC5-85A7-3D25-BD0F-6CD1089F18B8> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so
0x106fc3000 - 0x106fcefff cPickle.so (83) <38BE83AC-100C-31E5-B6BE-BFBA38F24AC4> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so
0x106fd4000 - 0x106fd5fff cStringIO.so (83) <583550C2-A4BB-3038-8AE6-58D8C35CAB79> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so
0x106fda000 - 0x106fddff7 +_dotblas.so (0) <0D2C0BAC-0A7E-3324-BDBA-4E3C01FFD3CB> /Library/Python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/core/_dotblas.so
0x107021000 - 0x107022fff _functools.so (83) <C07D086C-63A9-32E0-9460-553B67CC9006> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so
0x107026000 - 0x10703ffff +scalarmath.so (0) <207D4985-9B9D-353B-8419-A7A2FA6F6D3A> /Library/Python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/core/scalarmath.so
0x107192000 - 0x107193fff time.so (83) <39A9DB75-94B0-3D91-B970-ADE4E1B7BBAC> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so
0x1071da000 - 0x1071deff7 +_compiled_base.so (0) <CEF1E8DA-3736-39D9-AA2C-132F70776AB4> /Library/Python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/lib/_compiled_base.so
0x1071e2000 - 0x1071e3fff +lapack_lite.so (0) <7CDD20D3-3903-3875-82D0-6177C0550787> /Library/Python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/linalg/lapack_lite.so
0x1071e7000 - 0x1071f2ff7 +_umath_linalg.so (0) <093CF1DC-B775-3078-AB5F-F4ABB3BCE778> /Library/Python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/linalg/_umath_linalg.so
0x10723e000 - 0x10724dfff _io.so (83) <B1E4FC21-3C8B-344C-AE56-177D85591782> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
0x10725c000 - 0x10725cfff grp.so (83) <10BFB045-A784-327B-9A1C-851884AF47B8> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/grp.so
0x107260000 - 0x107260fff future_builtins.so (83) <93EF8852-740A-39D8-B2D1-3094593CCC8B> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/future_builtins.so
0x1072a4000 - 0x1072abff7 +fftpack_lite.so (0) <2026A712-A912-32B2-9A66-A7AA0C5D1457> /Library/Python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/fft/fftpack_lite.so
0x1072af000 - 0x1072b2fff strop.so (83) <AE1A7549-6FB1-3D72-AEDE-9B5B25F144C3> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so
0x1073b7000 - 0x1073f3fff +mtrand.so (0) <51712F8D-F79E-3166-AA9C-92518E35EF91> /Library/Python/2.7/site-packages/numpy-1.9.0.dev_297f54b-py2.7-macosx-10.9-intel.egg/numpy/random/mtrand.so
0x10747c000 - 0x107480fff +libcrawler.so (0) <4B56359C-6C37-3293-81AD-06588E1A8735> /Users/USER/Documents/*/libcrawler.so
0x7fff6c79c000 - 0x7fff6c7d265f dyld (352.2) <8C17275C-F355-3C22-B10F-ADA53C8AEBD9> /usr/lib/dyld
0x7fff8847d000 - 0x7fff88486fff libsystem_pthread.dylib (96) <B5C91A1D-6806-32C3-80DA-5E09F1418E59> /usr/lib/system/libsystem_pthread.dylib
0x7fff88488000 - 0x7fff88489fff libSystem.B.dylib (1212) <9461AF62-9273-3236-B9E6-FBAC96467BBC> /usr/lib/libSystem.B.dylib
0x7fff8848b000 - 0x7fff8866f257 libobjc.A.dylib (642) <63DD3921-EDF7-30A5-9F65-6CA368E0B6F1> /usr/lib/libobjc.A.dylib
0x7fff88f6f000 - 0x7fff88ffbfe7 libsystem_c.dylib (1041) <A34BCDEC-6C21-31C5-A233-BD36BD0A69D7> /usr/lib/system/libsystem_c.dylib
0x7fff8958e000 - 0x7fff895c5ffb libsystem_network.dylib (356) <30D3DC75-3499-3BD9-A089-2776C6381625> /usr/lib/system/libsystem_network.dylib
0x7fff8961e000 - 0x7fff8964ef9f libsystem_m.dylib (3083) <E791F535-7C94-3EC5-AE16-DD5B4E581228> /usr/lib/system/libsystem_m.dylib
0x7fff896e2000 - 0x7fff896eafff libsystem_dnssd.dylib (557) <D5492C76-213A-39E5-AD06-55702A2EE270> /usr/lib/system/libsystem_dnssd.dylib
0x7fff89803000 - 0x7fff8981ffff libsystem_malloc.dylib (51) <4CB1DDAA-16D4-3028-89C8-489B320C8FAA> /usr/lib/system/libsystem_malloc.dylib
0x7fff8986b000 - 0x7fff8988ffff libdispatch.dylib (416) <5FC03BF1-E013-3DA8-9106-1E9C5BD09053> /usr/lib/system/libdispatch.dylib
0x7fff8a554000 - 0x7fff8a557ff7 libdyld.dylib (352.2) <58EDCF19-9F5E-3EBB-9F2F-6AAF4F29C3A7> /usr/lib/system/libdyld.dylib
0x7fff8a571000 - 0x7fff8a572ffb libremovefile.dylib (34) <223DA82A-6689-30EB-A8CD-8E06E9D80DFA> /usr/lib/system/libremovefile.dylib
0x7fff8a66e000 - 0x7fff8a66efff com.apple.Accelerate (1.10 - Accelerate 1.10) <0FAD7731-3711-3050-BF41-6D5FBBF782B1> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x7fff8a66f000 - 0x7fff8a671fff libsystem_configuration.dylib (671) <EE252873-1698-31F7-9431-1CD4C954DA39> /usr/lib/system/libsystem_configuration.dylib
0x7fff8a69b000 - 0x7fff8a6dfff7 libauto.dylib (186) <17AE377B-4C54-34E0-8545-22C36C51805B> /usr/lib/libauto.dylib
0x7fff8b72c000 - 0x7fff8b72dff7 libsystem_blocks.dylib (65) <E05B234F-8036-301B-B2F1-1D170F6D3D97> /usr/lib/system/libsystem_blocks.dylib
0x7fff8b8d0000 - 0x7fff8b8dbfff libcommonCrypto.dylib (60058) <655061E6-30D0-38AA-B50F-A87160E91A58> /usr/lib/system/libcommonCrypto.dylib
0x7fff8b937000 - 0x7fff8b95efff libxpc.dylib (496.0.0.0.4) <BA0E0D3B-7E92-3FD4-969B-8B30AF78314A> /usr/lib/system/libxpc.dylib
0x7fff8b95f000 - 0x7fff8b98afff libc++abi.dylib (125) <89FF241B-5BFB-330A-AA8B-931EBE9FDC3F> /usr/lib/libc++abi.dylib
0x7fff8b98b000 - 0x7fff8b98ffff libcache.dylib (69) <69FA8935-1BDF-369C-8DA5-37F2E651FC1D> /usr/lib/system/libcache.dylib
0x7fff8bf3c000 - 0x7fff8bf3eff7 libsystem_coreservices.dylib (6) <CE029CE6-341E-316D-A63E-36018A87B630> /usr/lib/system/libsystem_coreservices.dylib
0x7fff8c7e8000 - 0x7fff8cbf5ff7 libLAPACK.dylib (1119) <6AAD6821-F578-382A-952A-BF47B13BE997> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fff8d51b000 - 0x7fff8d632fef libvDSP.dylib (497) <E14B640E-E093-3792-9944-720385AA833B> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x7fff8d976000 - 0x7fff8d97dff7 libcompiler_rt.dylib (35) <0F6AAF40-BCB9-3629-B6CD-4047D99B52F7> /usr/lib/system/libcompiler_rt.dylib
0x7fff8d9c6000 - 0x7fff8dd5aff7 com.apple.CoreFoundation (6.9 - 1132.15) <2595DDF9-31C2-3B2B-B8B7-E805F41FE73E> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff8ddd2000 - 0x7fff8dfb1ffb libicucore.A.dylib (531.17) <4CD56103-046A-360B-A5BC-B81A103BBDBC> /usr/lib/libicucore.A.dylib
0x7fff8e4a4000 - 0x7fff8e4d4ff7 libncurses.5.4.dylib (44) <5092AA8D-0816-3EEF-B702-BEA98BF1E088> /usr/lib/libncurses.5.4.dylib
0x7fff8e56e000 - 0x7fff8e572ff7 libsystem_stats.dylib (160.0.0.0.1) <44D7BDF8-C833-3F3B-85B6-C76ACDB81BC4> /usr/lib/system/libsystem_stats.dylib
0x7fff8ea25000 - 0x7fff8ea25ff7 libkeymgr.dylib (28) <552CCAE4-E242-3005-AB85-24C6E533D6E9> /usr/lib/system/libkeymgr.dylib
0x7fff8f039000 - 0x7fff8f03bff7 libsystem_sandbox.dylib (344) <69ACEB2A-8DC9-3B89-8ECF-667AD6B485FC> /usr/lib/system/libsystem_sandbox.dylib
0x7fff8f6af000 - 0x7fff8f6c4ff7 libsystem_asl.dylib (260) <3398113B-8429-3D3E-B728-E44205BAD4E2> /usr/lib/system/libsystem_asl.dylib
0x7fff8fa82000 - 0x7fff8fa89ff7 libcopyfile.dylib (115) <802774AD-A71F-3A46-A7A9-810F8B8DA205> /usr/lib/system/libcopyfile.dylib
0x7fff8fbae000 - 0x7fff8fc73fef libvMisc.dylib (497) <658E4CC2-DA85-30A1-978E-5386DAA361E3> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x7fff902c1000 - 0x7fff902d4ff7 libLinearAlgebra.dylib (1119) <F6A6D050-E257-3427-A05D-A46D2F4B57AB> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
0x7fff90eaa000 - 0x7fff90eabfff libffi.dylib (18.1) <BE2846BF-C1BA-3136-903F-A914CDBC7328> /usr/lib/libffi.dylib
0x7fff90f40000 - 0x7fff90f5dfff libsystem_kernel.dylib (2738.0.0.0.5) <07664A85-DF08-3113-8817-B726F7774B14> /usr/lib/system/libsystem_kernel.dylib
0x7fff9106e000 - 0x7fff910e3fff libcorecrypto.dylib (211.0.0.0.1) <6D9E2007-EF3B-3665-AA15-A356090540B6> /usr/lib/system/libcorecrypto.dylib
0x7fff9162d000 - 0x7fff91632fff libsystem_networkextension.dylib (112) <4C3B20D2-18FB-35BE-A695-8E56BAC1D3A8> /usr/lib/system/libsystem_networkextension.dylib
0x7fff91638000 - 0x7fff91638fff com.apple.Accelerate.vecLib (3.10 - vecLib 3.10) <1AEEC774-2F65-3763-B52E-C04C0DD05F63> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff918e2000 - 0x7fff918e7ff7 libunwind.dylib (35.3) <4BD86D0A-A203-3FEB-BFED-5668B180AB49> /usr/lib/system/libunwind.dylib
0x7fff93093000 - 0x7fff93099fff libsystem_trace.dylib (47.0.0.0.2) <3496EA08-6D61-37F0-A557-8AD734F0480E> /usr/lib/system/libsystem_trace.dylib
0x7fff93945000 - 0x7fff93946fff libunc.dylib (28) <43600429-64D7-3578-ACCE-7642190EE835> /usr/lib/system/libunc.dylib
0x7fff93947000 - 0x7fff9394ffff libsystem_platform.dylib (61) <90DD0380-D3ED-346A-B4A8-1F1D11D42032> /usr/lib/system/libsystem_platform.dylib
0x7fff93952000 - 0x7fff9395bffb libsystem_notify.dylib (129) <7F8F5086-AD7A-3C80-BBCB-AD54EA44376B> /usr/lib/system/libsystem_notify.dylib
0x7fff94168000 - 0x7fff945bafef com.apple.vImage (8.0 - 8.0) <ACD86E88-A9F7-3E95-BA51-4208E2D879B8> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x7fff9469e000 - 0x7fff946a0ff7 libquarantine.dylib (73) <EE50CAE5-1596-3344-8760-579EFAF176F2> /usr/lib/system/libquarantine.dylib
0x7fff94f92000 - 0x7fff94fe6fff libc++.1.dylib (120) <C6EFD658-B948-36F4-905D-A9780797D0D1> /usr/lib/libc++.1.dylib
0x7fff9556f000 - 0x7fff95580fff libsystem_coretls.dylib (29) <B95FEAC8-6C16-382A-BE5C-5B34F6A4E8FD> /usr/lib/system/libsystem_coretls.dylib
0x7fff9574c000 - 0x7fff958d9fff libBLAS.dylib (1119) <93F54197-FEA7-31A1-B960-CCD78F87702E> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff95ce4000 - 0x7fff95ce4ff7 liblaunch.dylib (496.0.0.0.4) <25D0EE80-85D2-379D-BF76-09B417C0FD19> /usr/lib/system/liblaunch.dylib
0x7fff95d83000 - 0x7fff95d88ff7 libmacho.dylib (861) <BF14A7C8-2711-38E7-B05E-6AE66D5323CA> /usr/lib/system/libmacho.dylib
0x7fff961f6000 - 0x7fff96207ff7 libz.1.dylib (55) <68DE8C8A-0320-3269-AABF-D26D73F50001> /usr/lib/libz.1.dylib
0x7fff96564000 - 0x7fff96565fff libDiagnosticMessagesClient.dylib (100) <9F8277CE-07E0-39CD-A2EE-581D02EBE58B> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff96672000 - 0x7fff9669aff3 libsystem_info.dylib (456) <E997A3CF-82FE-36F5-B246-3E73C98BEE02> /usr/lib/system/libsystem_info.dylib
0x7fff96a65000 - 0x7fff96a66fff libsystem_secinit.dylib (16) <F2CA96CB-D627-3407-830C-E2E1D48E457B> /usr/lib/system/libsystem_secinit.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 203216
thread_create: 0
thread_set_state: 493
VM Region Summary:
ReadOnly portion of Libraries: Total=100.7M resident=15.8M(16%) swapped_out_or_unallocated=85.0M(84%)
Writable regions: Total=31.9M written=8868K(27%) resident=11.9M(37%) swapped_out=0K(0%) unallocated=20.0M(63%)
REGION TYPE VIRTUAL
=========== =======
Kernel Alloc Once 4K
MALLOC 23.3M
MALLOC (admin) 16K
STACK GUARD 56.0M
Stack 8192K
VM_ALLOCATE 16K
__DATA 2080K
__LINKEDIT 74.3M
__TEXT 26.4M
__UNICODE 544K
shared memory 4K
=========== =======
TOTAL 190.7M
Model: MacBookPro5,4, BootROM MBP53.00AC.B03, 2 processors, Intel Core 2 Duo, 2.53 GHz, 8 GB, SMC 1.49f2
Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1067 MHz, 0x857F, 0x483634353155363446373036364700000000
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1067 MHz, 0x857F, 0x483634353155363446373036364700000000
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.98.100.24)
Bluetooth: Version 4.3.0d49 14130, 3 services, 24 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Serial ATA Device: Samsung SSD 840 EVO 750GB, 750.16 GB
Serial ATA Device: MATSHITADVD-R UJ-868
USB Device: Built-in iSight
USB Device: Internal Memory Card Reader
USB Device: Apple Internal Keyboard / Trackpad
USB Device: IR Receiver
USB Device: BRCM2046 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus:
Edit: Stack trace from gdb:
http://pastebin.com/ncx5fTRg
(reached SO question size limit).
Thanks.

Related

py2app build errors Terminating app due to uncaught exception 'NSInvalidArgumentException'

I am new to building standalone files using py2app for MacOS. I am getting the following error when I launch the app after the build
Terminating app due to uncaught exception 'NSInvalidArgumentException' reason: '-[__NSCFString count]: unrecognized selector sent to instance 0x6000026004e0'
I would highly appreciate if someone points me how to resolve this issue.
Below is my setup file
from setuptools import setup
APP = ['jarvis_starter.py']
DATA_FILES = ['Template2.pptx']
OPTIONS = {'iconfile':'jarvislogo.icns',
'argv_emulation': True,
'packages': 'certifi',
'plist': {
'PyRuntimeLocations':'/Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib',
'LSPrefersPPC':True,
}
}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
I am posting error log below
Path: /Users/USER/Documents/*/jarvis_starter.app/Contents/MacOS/jarvis_starter
Identifier: org.pythonmac.unspecified.jarvis_starter
Version: 0.0.0 (0.0.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: jarvis_starter [64308]
User ID: 501
Date/Time: 2020-01-26 17:59:07.513 -0800
OS Version: Mac OS X 10.15.2 (19C57)
Report Version: 12
Bridge OS Version: 3.0 (14Y908)
Anonymous UUID: 0333FAC2-3E0F-7B44-E2C1-9EEFF2508FB0
Sleep/Wake UUID: E6B1DB47-C4DB-424F-834B-90F142B2FBF5
Time Awake Since Boot: 390000 seconds
Time Since Wake: 700 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString count]: unrecognized selector sent to instance 0x6000026004e0'
abort() called
terminating with uncaught exception of type NSException
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff2bfd48ab __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff62245805 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2c053b61 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff2bf38adf ___forwarding___ + 1427
4 CoreFoundation 0x00007fff2bf384b8 _CF_forwarding_prep_0 + 120
5 jarvis_starter 0x0000000100001674 py2app_main + 372
6 jarvis_starter 0x0000000100000f48 main + 344
7 jarvis_starter 0x0000000100000dc4 start + 52
8 ??? 0x0000000000000001 0x0 + 1
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff636fa7fa __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff637b7bc1 pthread_kill + 432
2 libsystem_c.dylib 0x00007fff63681a1c abort + 120
3 libc++abi.dylib 0x00007fff6071fbe8 abort_message + 231
4 libc++abi.dylib 0x00007fff6071fd9c demangling_terminate_handler() + 262
5 libobjc.A.dylib 0x00007fff6224778a _objc_terminate() + 96
6 libc++abi.dylib 0x00007fff6072cdc7 std::__terminate(void (*)()) + 8
7 libc++abi.dylib 0x00007fff6072cb6c __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 27
8 libc++abi.dylib 0x00007fff6071e45d __cxa_throw + 113
9 libobjc.A.dylib 0x00007fff62245933 objc_exception_throw + 350
10 com.apple.CoreFoundation 0x00007fff2c053b61 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
11 com.apple.CoreFoundation 0x00007fff2bf38adf ___forwarding___ + 1427
12 com.apple.CoreFoundation 0x00007fff2bf384b8 _CF_forwarding_prep_0 + 120
13 org.pythonmac.unspecified.jarvis_starter 0x0000000100001674 py2app_main + 372
14 org.pythonmac.unspecified.jarvis_starter 0x0000000100000f48 main + 344
15 org.pythonmac.unspecified.jarvis_starter 0x0000000100000dc4 start + 52
Thread 1:
0 libsystem_pthread.dylib 0x00007fff637b3818 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x00007fff637b3818 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x00007fff637b3818 start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000109351dc0 rcx: 0x00007ffeefbfbfe8 rdx: 0x0000000000000000
rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007ffeefbfc010 rsp: 0x00007ffeefbfbfe8
r8: 0x00007ffeefbfbeb0 r9: 0x00007ffeefbfc080 r10: 0x0000000109351dc0 r11: 0x0000000000000246
r12: 0x0000000000000307 r13: 0x0000003000000008 r14: 0x0000000000000006 r15: 0x0000000000000016
rip: 0x00007fff636fa7fa rfl: 0x0000000000000246 cr2: 0x0000000000000000
Logical CPU: 0
Error Code: 0x00000000
Trap Number: 0
Binary Images:
0x100000000 - 0x100005fff +org.pythonmac.unspecified.jarvis_starter (0.0.0 - 0.0.0) <E4EAF2F4-CF49-3C47-B544-F79C80860A1D> /Users/USER/Documents/*/jarvis_starter.app/Contents/MacOS/jarvis_starter
0x109288000 - 0x109318cb7 dyld (733.8) <EEA931D0-403E-3BC8-862A-CBA037DE4A74> /usr/lib/dyld
0x7fff27c7d000 - 0x7fff27c7dfff com.apple.Accelerate (1.11 - Accelerate 1.11) <EEBE6680-1AAB-3192-AA7C-450537B07F27> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x7fff27c95000 - 0x7fff28300fef com.apple.vImage (8.1 - 524.2) <2BDE5231-B5ED-313E-918A-876ACE1C0FCF> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x7fff28301000 - 0x7fff2856afff libBLAS.dylib (1303.60.1) <94F6B3C0-5039-3F66-8B2E-98791287E459> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff2856b000 - 0x7fff2885aff7 libBNNS.dylib (144.40.3) <F15D7D9E-0B9F-34FF-B144-DCA264614C54> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib
0x7fff2885c000 - 0x7fff28c01fff libLAPACK.dylib (1303.60.1) <DCC36295-FF39-35A1-8DF1-1E8A714E2265> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fff28c02000 - 0x7fff28c17ff8 libLinearAlgebra.dylib (1303.60.1) <E3C0CC64-906B-3B44-B8AA-3075BA20E161> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
0x7fff28c18000 - 0x7fff28c1dff3 libQuadrature.dylib (7) <17EC31E3-3D77-3B5A-8ADD-6A3DBC1531E7> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib
0x7fff28c1e000 - 0x7fff28c8efff libSparse.dylib (103) <350DAE1C-C990-343F-A98A-1B4317EAA869> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib
0x7fff28c8f000 - 0x7fff28ca1fef libSparseBLAS.dylib (1303.60.1) <8C0C7291-AC3A-3808-9D45-E359A5E03F0E> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
0x7fff28ca2000 - 0x7fff28e7bffb libvDSP.dylib (735.40.1) <BD49856D-39CE-397F-A069-

Why my PySimpleGUI crash on Mac OS X 10.15.1, but works fine on Mac OS X 10.13

Crash logs:
Process: Test6 [1858]
Path: /Users/USER/Desktop/*/App-1.1.app/Contents/MacOS/Test6
Identifier: App-1.1
Version: 0
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Test6 [1858]
User ID: 501
Date/Time: 2019-12-23 18:29:43.866 +0800
OS Version: Mac OS X 10.15.1 (19B88)
Report Version: 12
Bridge OS Version: 3.0 (14Y906)
Anonymous UUID: 9952FE86-6763-6994-E7F6-20DEB896E05E
Sleep/Wake UUID: E4ED98DC-0E7E-4921-BCA0-511DE41E4C5D
Time Awake Since Boot: 28000 seconds
Time Since Wake: 1400 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
dyld2 mode
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff7064249a __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff706ff6cb pthread_kill + 384
2 libsystem_c.dylib 0x00007fff705caa1c abort + 120
3 Python 0x000000010ac1b1ae fatal_error + 547
4 Python 0x000000010ac1a7de Py_InitializeEx + 136
5 App-1.1 0x000000010ab47768 main + 440
6 libdyld.dylib 0x00007fff704f32e5 start + 1
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000114b46dc0 rcx: 0x00007ffee50b9518 rdx: 0x0000000000000000
rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007ffee50b9540 rsp: 0x00007ffee50b9518
r8: 0x0000000000000000 r9: 0x0000000054f023e4 r10: 0x0000000000000000 r11: 0x0000000000000246
r12: 0x0000000000000307 r13: 0x0000000000000000 r14: 0x0000000000000006 r15: 0x0000000000000016
rip: 0x00007fff7064249a rfl: 0x0000000000000246 cr2: 0x000000010aea5020
Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133
Binary Images:
0x10ab46000 - 0x10ab47fff +App-1.1 (0) <F8D9BE9C-E118-36FB-A55B-5FE23569915D> /Users/USER/Desktop/*/App-1.1.app/Contents/MacOS/Test6
0x10ab4c000 - 0x10acd3fff +Python (0) <836E2A2F-2279-3E85-B279-61047DAB23C5> /Users/USER/Desktop/*/App-1.1.app/Contents/MacOS/Python
0x114a7d000 - 0x114b0db5f dyld (733.6) <DAFEA246-2F9A-3DCB-A37C-4246D4F92770> /usr/lib/dyld
0x7fff2d695000 - 0x7fff2d6a4ff7 libSimplifiedChineseConverter.dylib (76) <D25428B0-07E7-33DA-8939-5ED3C50D3154> /System/Library/CoreServices/Encodings/libSimplifiedChineseConverter.dylib
0x7fff38fdf000 - 0x7fff3945efe7 com.apple.CoreFoundation (6.9 - 1673.126) <15D61616-B29B-3BDB-8624-4B84A4956485> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff6ce76000 - 0x7fff6ce78fff libDiagnosticMessagesClient.dylib (112) <83F42398-DB41-3BB2-B8A1-10D78C4B5778> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff6d33e000 - 0x7fff6d33fff3 libSystem.B.dylib (1281) <1DD1BCD2-2C85-3B81-8CAF-224FB042F441> /usr/lib/libSystem.B.dylib
0x7fff6d61c000 - 0x7fff6d66ffff libc++.1.dylib (800.7) <1D42387D-206A-3F06-9B5F-705B83EAC295> /usr/lib/libc++.1.dylib
0x7fff6d670000 - 0x7fff6d684fff libc++abi.dylib (800.7) <D89ABFBF-3754-35AB-BAEE-FBF14857F79B> /usr/lib/libc++abi.dylib
0x7fff6e0e5000 - 0x7fff6e0e7ff7 libfakelink.dylib (149) <528A0ABE-B583-3DA1-8E5B-9CA7E89303DE> /usr/lib/libfakelink.dylib
0x7fff6e1f7000 - 0x7fff6e44fff7 libicucore.A.dylib (64243.0.1) <4CBF52D7-7235-34C8-9FF1-8657076B604F> /usr/lib/libicucore.A.dylib
0x7fff6f17e000 - 0x7fff6f1afff6 libobjc.A.dylib (781) <D866A31E-5CB1-3327-8D22-C4F83C9225D0> /usr/lib/libobjc.A.dylib
0x7fff6f856000 - 0x7fff6f868fff libz.1.dylib (76) <3EC7A143-AF2D-35EE-9C08-542B2907E3D2> /usr/lib/libz.1.dylib
0x7fff702ce000 - 0x7fff702d3ff7 libcache.dylib (83) <74F6459D-3606-3ADB-9808-F6B0FE70062D> /usr/lib/system/libcache.dylib
0x7fff702d4000 - 0x7fff702dfff7 libcommonCrypto.dylib (60165) <1333752F-5117-3E86-803A-06E166D80C8C> /usr/lib/system/libcommonCrypto.dylib
0x7fff702e0000 - 0x7fff702e7fff libcompiler_rt.dylib (101.2) <0437EBEF-8191-3912-A365-D6BB75C7A810> /usr/lib/system/libcompiler_rt.dylib
0x7fff702e8000 - 0x7fff702f1fff libcopyfile.dylib (166.40.1) <7FAF372E-BAD5-30E6-A8F2-A3D06B91DC80> /usr/lib/system/libcopyfile.dylib
0x7fff702f2000 - 0x7fff70389fef libcorecrypto.dylib (866.40.8) <AE25C9EE-5D63-3E49-B3AA-D482D35C085A> /usr/lib/system/libcorecrypto.dylib
0x7fff704a0000 - 0x7fff704e1ff0 libdispatch.dylib (1173.40.5) <1FF421B6-4BF0-3B5F-8F56-5ED3B3EFE06F> /usr/lib/system/libdispatch.dylib
0x7fff704e2000 - 0x7fff70517fff libdyld.dylib (733.6) <2FA4B359-624B-337C-9207-CDCF841C2E52> /usr/lib/system/libdyld.dylib
0x7fff70518000 - 0x7fff70518ffb libkeymgr.dylib (30) <7EEF9246-30B4-34DD-8AD6-79679D1A7784> /usr/lib/system/libkeymgr.dylib
0x7fff70526000 - 0x7fff70526ff7 liblaunch.dylib (1738.40.10) <CC02D5B3-A95D-3B16-8EE5-D62521CFE899> /usr/lib/system/liblaunch.dylib
0x7fff70527000 - 0x7fff7052cff7 libmacho.dylib (949.0.1) <6C3E49B2-594D-3B9D-82DB-C4ABEB9788AB> /usr/lib/system/libmacho.dylib
0x7fff7052d000 - 0x7fff7052fff3 libquarantine.dylib (110.40.3) <A1BCAA32-A194-3DBE-9930-8F49A4AEF284> /usr/lib/system/libquarantine.dylib
0x7fff70530000 - 0x7fff70531ff7 libremovefile.dylib (48) <DD7AE862-F179-3C07-A4FC-5775DDD4D3E6> /usr/lib/system/libremovefile.dylib
0x7fff70532000 - 0x7fff70549fff libsystem_asl.dylib (377.40.1) <ECE44856-D279-3B5D-A0AA-8BE421D200C4> /usr/lib/system/libsystem_asl.dylib
0x7fff7054a000 - 0x7fff7054afff libsystem_blocks.dylib (74) <DC521115-905A-3A0D-9337-C55FACCEA85F> /usr/lib/system/libsystem_blocks.dylib
0x7fff7054b000 - 0x7fff705d2ff7 libsystem_c.dylib (1353.41.1) <5AD50779-955E-3F56-BCB9-1E14833B3455> /usr/lib/system/libsystem_c.dylib
0x7fff705d3000 - 0x7fff705d6fff libsystem_configuration.dylib (1061.40.2) <7A2329E0-3C84-3DB7-BC32-E7796C50D621> /usr/lib/system/libsystem_configuration.dylib
0x7fff705d7000 - 0x7fff705daff7 libsystem_coreservices.dylib (114) <DF341577-A307-3722-BB24-D4AACEAB19B3> /usr/lib/system/libsystem_coreservices.dylib
0x7fff705db000 - 0x7fff705e2fff libsystem_darwin.dylib (1353.41.1) <E862B5B1-A367-39CA-8319-B2F9DFADF606> /usr/lib/system/libsystem_darwin.dylib
0x7fff705e3000 - 0x7fff705eaffb libsystem_dnssd.dylib (1096.40.7) <2A9C6F3E-427B-332E-BDD3-D4651306F3DE> /usr/lib/system/libsystem_dnssd.dylib
0x7fff705eb000 - 0x7fff705ecffb libsystem_featureflags.dylib (17) <B94C0052-B75A-3169-80AA-5F480588AF6E> /usr/lib/system/libsystem_featureflags.dylib
0x7fff705ed000 - 0x7fff7063aff7 libsystem_info.dylib (538) <18CC56C5-5325-3375-BF99-FAE7F4F19DDD> /usr/lib/system/libsystem_info.dylib
0x7fff7063b000 - 0x7fff70667ff7 libsystem_kernel.dylib (6153.41.3) <18918E9C-45BC-3D5A-A6B6-3DBC60EEE2E1> /usr/lib/system/libsystem_kernel.dylib
0x7fff70668000 - 0x7fff706afff7 libsystem_m.dylib (3178) <636A1A1C-7AFC-3E82-B86B-0173912A3437> /usr/lib/system/libsystem_m.dylib
0x7fff706b0000 - 0x7fff706d7ff7 libsystem_malloc.dylib (283.40.1) <F82A587B-44A2-3699-A218-9D3ECEE23D5A> /usr/lib/system/libsystem_malloc.dylib
0x7fff706d8000 - 0x7fff706e5ff3 libsystem_networkextension.dylib (1095.40.22) <7F206A43-A941-3BAB-AE3A-16169F2FE6AB> /usr/lib/system/libsystem_networkextension.dylib
0x7fff706e6000 - 0x7fff706effff libsystem_notify.dylib (241) <C95CC58E-35E7-3828-AA2A-6EED73C12DE5> /usr/lib/system/libsystem_notify.dylib
0x7fff706f0000 - 0x7fff706f9fe7 libsystem_platform.dylib (220) <0CCDD81F-0891-3400-8A97-6CAC3BBBE2F9> /usr/lib/system/libsystem_platform.dylib
0x7fff706fa000 - 0x7fff70704ff7 libsystem_pthread.dylib (416.40.3) <53C65598-9E9E-36FF-BDC2-74F228E58C5C> /usr/lib/system/libsystem_pthread.dylib
0x7fff70705000 - 0x7fff70709ffb libsystem_sandbox.dylib (1217.41.1) <2183D15E-2CFD-3160-80CE-A948F0529005> /usr/lib/system/libsystem_sandbox.dylib
0x7fff7070a000 - 0x7fff7070cfff libsystem_secinit.dylib (62.40.2) <D2782294-ACDC-30FF-A794-B4C1B324526B> /usr/lib/system/libsystem_secinit.dylib
0x7fff7070d000 - 0x7fff70714ffb libsystem_symptoms.dylib (1238.40.4) <A44E4405-E22E-32E9-83DE-8C7A82401DA0> /usr/lib/system/libsystem_symptoms.dylib
0x7fff70715000 - 0x7fff7072bff2 libsystem_trace.dylib (1147.40.13) <376CC435-E656-37D9-A5FF-C49B6E4525E2> /usr/lib/system/libsystem_trace.dylib
0x7fff7072d000 - 0x7fff70732ffb libunwind.dylib (35.4) <44448F1F-08E5-3425-ADBA-C38A9E8F90C7> /usr/lib/system/libunwind.dylib
0x7fff70733000 - 0x7fff70767ff6 libxpc.dylib (1738.40.10) <99CC9436-D653-3762-ADBB-9054EBD1BA2B> /usr/lib/system/libxpc.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 16785
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=366.5M resident=0K(0%) swapped_out_or_unallocated=366.5M(100%)
Writable regions: Total=557.6M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=557.6M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Kernel Alloc Once 8K 1
MALLOC 164.3M 19
MALLOC guard page 16K 4
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 56.0M 1
Stack 8192K 1
VM_ALLOCATE 1024K 4
__DATA 2581K 49
__DATA_CONST 20K 1
__LINKEDIT 353.3M 4
__OBJC_RO 32.0M 1
__OBJC_RW 1780K 2
__TEXT 13.2M 47
__UNICODE 564K 1
shared memory 8K 2
=========== ======= =======
TOTAL 1.0G 138
TOTAL, minus reserved VM space 632.6M 138
Model: MacBookPro14,2, BootROM 202.0.0.0.0, 2 processors, Dual-Core Intel Core i5, 3.1 GHz, 8 GB, SMC 2.44f2
Graphics: kHW_IntelIrisGraphics650Item, Intel Iris Plus Graphics 650, spdisplays_builtin
Memory Module: BANK 0/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x80CE, 0x4B3445364533303445422D45474347202020
Memory Module: BANK 1/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x80CE, 0x4B3445364533303445422D45474347202020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x171), Broadcom BCM43xx 1.0 (7.77.106.3 AirPortDriverBrcmNIC-1435.3)
Bluetooth: Version 7.0.1f1, 3 services, 18 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.0 Bus
USB Device: Apple T1 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.3
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.3

osx 10.10.5 Python 2.7 "Fatal Python error: PyThreadState_Get: no current thread Abort trap: 6" error

I am using homebrew python 2.7 and I installed nupic
$ pip install nupic
Then I get error when i try to import nupic
$ python
Python 2.7.11 (default, Jan 22 2016, 08:28:37)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from nupic.bindings.algorithms import SpatialPooler as SP
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
$
After I get the error:
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
Python exits and it asks if i want to report it to apple.
Here is the report.
Process: Python [72449]
Path: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.7.11 (2.7.11)
Code Type: X86-64 (Native)
Parent Process: bash [93469]
Responsible: Terminal [93466]
User ID: 501
Date/Time: 2016-02-06 17:30:50.442 +0900
OS Version: Mac OS X 10.10.5 (14F1021)
Report Version: 11
Anonymous UUID: 855D5299-1DD9-879D-F358-9483D5CA0033
Sleep/Wake UUID: A2948A3A-B3AB-4F3C-8214-250AAC8AB13F
Time Awake Since Boot: 75000 seconds
Time Since Wake: 7800 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff85532286 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff932e79b3 abort + 129
2 org.python.python 0x000000010a8fa2a3 Py_FatalError + 49
3 org.python.python 0x000000010a8f9785 PyThreadState_Get + 28
4 org.python.python 0x000000010a8f6522 Py_InitModule4_64 + 62
5 _algorithms.so 0x000000010a0d7c7c init_algorithms + 796
6 org.python.python 0x0000000108fdb98b _PyImport_LoadDynamicModule + 140
7 org.python.python 0x0000000108fdb422 imp_load_module + 243
8 org.python.python 0x0000000108fc5be5 PyEval_EvalFrameEx + 26858
9 org.python.python 0x0000000108fc9745 fast_function + 264
10 org.python.python 0x0000000108fc5b0b PyEval_EvalFrameEx + 26640
11 org.python.python 0x0000000108fbf109 PyEval_EvalCodeEx + 1583
12 org.python.python 0x0000000108fbead4 PyEval_EvalCode + 54
13 org.python.python 0x0000000108fd7f0f PyImport_ExecCodeModuleEx + 241
14 org.python.python 0x0000000108fdac27 load_source_module + 1089
15 org.python.python 0x0000000108fda689 import_submodule + 267
16 org.python.python 0x0000000108fda24f load_next + 284
17 org.python.python 0x0000000108fd946b PyImport_ImportModuleLevel + 1195
18 org.python.python 0x0000000108fba70a builtin___import__ + 135
19 org.python.python 0x0000000108f45ef0 PyObject_Call + 99
20 org.python.python 0x0000000108fc9087 PyEval_CallObjectWithKeywords + 165
21 org.python.python 0x0000000108fc438a PyEval_EvalFrameEx + 20623
22 org.python.python 0x0000000108fbf109 PyEval_EvalCodeEx + 1583
23 org.python.python 0x0000000108fbead4 PyEval_EvalCode + 54
24 org.python.python 0x0000000108fe2eb9 run_mod + 53
25 org.python.python 0x0000000108fe2f5c PyRun_FileExFlags + 133
26 org.python.python 0x0000000108fe2aab PyRun_SimpleFileExFlags + 698
27 org.python.python 0x0000000108ff445d Py_Main + 3137
28 libdyld.dylib 0x00007fff9331a5c9 start + 1
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff56ccd9f8 rdx: 0x0000000000000000
rdi: 0x0000000000000713 rsi: 0x0000000000000006 rbp: 0x00007fff56ccda20 rsp: 0x00007fff56ccd9f8
r8: 0x00007fff56ccda10 r9: 0x00007fff75557300 r10: 0x0000000008000000 r11: 0x0000000000000206
r12: 0x0000000109d92e94 r13: 0x000000010a4a9010 r14: 0x00007fff75557300 r15: 0x000000010906c310
rip: 0x00007fff85532286 rfl: 0x0000000000000206 cr2: 0x00007fff75ea9fd8
Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133
Binary Images:
0x108f31000 - 0x108f32fff +org.python.python (2.7.11 - 2.7.11) <798BC1F6-00F9-31F0-81E0-2B45D55E8D9B> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
0x108f3b000 - 0x109031ff7 +org.python.python (2.7.11, [c] 2001-2015 Python Software Foundation. - 2.7.11) <006A4B30-6420-3484-A665-DA24EC4C7EC0> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Python
0x10924f000 - 0x109251fff +_locale.so (0) <20687CD8-F52A-3BAD-88FB-9BE03FEFC81C> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
0x1092d4000 - 0x1092d7ff7 +math.so (0) <C55F5074-AC08-3B15-B4F8-84DFBD1ADDC0> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so
0x1092dc000 - 0x109433fff +multiarray.so (???) <5B71DE58-9764-3D6B-A574-757C96F5F7F7> /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so
0x1094ed000 - 0x1094f6ff7 +datetime.so (0) <C56B55F8-7D34-3234-88BA-AF4C61C763B3> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/datetime.so
0x1094ff000 - 0x10955eff7 +umath.so (???) <73DFD541-C165-3D3E-BBD1-C90CFB6E3D3D> /usr/local/lib/python2.7/site-packages/numpy/core/umath.so
0x1095cb000 - 0x1095cefff +_collections.so (0) <CD07A4D1-4505-353A-8D97-466AF00273AC> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so
0x1095d3000 - 0x1095d6fff +operator.so (0) <7AFEBDE5-555B-326F-B651-76D5E736B62C> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so
0x1095dc000 - 0x1095e1fff +itertools.so (0) <828A4F03-17C4-3640-AE55-740BFC4409CF> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so
0x1095ea000 - 0x1095ebfff +_heapq.so (0) <1AEE9933-BC4F-3E4E-8AB5-4D9BBB76636A> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so
0x1095ef000 - 0x1095fafff +cPickle.so (0) <7085F368-7F9B-311E-AC2B-2ECF506FE4FA> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so
0x109640000 - 0x109641fff +cStringIO.so (0) <106617DC-C0B4-367F-AE02-790002237B0A> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so
0x109646000 - 0x10964bff7 +_dotblas.so (???) <809BDF78-123C-38FC-863D-9D82F05D21A9> /usr/local/lib/python2.7/site-packages/numpy/core/_dotblas.so
0x10964f000 - 0x109650fff +_functools.so (0) <9F51DD89-251B-32CB-B020-FC70B28C090B> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so
0x109653000 - 0x10967aff7 +scalarmath.so (???) <C15C5850-42F0-3586-B8F6-A666A343561F> /usr/local/lib/python2.7/site-packages/numpy/core/scalarmath.so
0x1097cc000 - 0x1097ceff7 +time.so (0) <6EC635F4-E9F9-3DF4-8F22-313F7D892629> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so
0x109813000 - 0x109814fff +grp.so (0) <2DF43676-F9A0-3C6A-8EF2-8E19A6416BF8> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/grp.so
0x109817000 - 0x109826fff +_io.so (0) <5614CD2E-13DF-30CC-A724-4D7D8E37F9B5> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
0x109838000 - 0x10983bfff +binascii.so (0) <A61ACC22-2A70-39A5-B30D-0436E6A38AAF> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so
0x10983e000 - 0x109840fff +_hashlib.so (0) <6705DEE4-D957-3140-9FFA-B93C5EFBBBAF> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so
0x109844000 - 0x109882fff +libssl.1.0.0.dylib (0) <733D4350-77AD-3504-ABFC-E1C41261B9D2> /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
0x10989e000 - 0x109a0d8df +libcrypto.1.0.0.dylib (0) <87599B7D-0474-3047-8362-3279DAB41455> /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
0x109a85000 - 0x109a86fff +_random.so (0) <09D7F46C-1C20-34AD-A904-5973542C197A> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so
0x109a89000 - 0x109a8afff +fcntl.so (0) <0B4E0194-4046-32FB-B2E9-726CBE47D07E> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so
0x109acd000 - 0x109ad1ff7 +_compiled_base.so (???) <5D442C0C-6B62-3A70-968E-2670052500AB> /usr/local/lib/python2.7/site-packages/numpy/lib/_compiled_base.so
0x109b15000 - 0x109b17fff +lapack_lite.so (???) <6C3A7FF9-1A79-3146-B70C-E69A67999400> /usr/local/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so
0x109b1b000 - 0x109b30fff +_umath_linalg.so (???) <E242EBAE-3418-38E6-896F-CCD1C52F22BF> /usr/local/lib/python2.7/site-packages/numpy/linalg/_umath_linalg.so
0x109b3c000 - 0x109b3cfff +future_builtins.so (0) <D6C14BF6-23BB-3C57-A53D-5BE766837860> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/future_builtins.so
0x109b7f000 - 0x109b87fff +fftpack_lite.so (???) <2F049C9E-E682-30A2-B732-FC7A036D13AF> /usr/local/lib/python2.7/site-packages/numpy/fft/fftpack_lite.so
0x109bcb000 - 0x109c3bff7 +mtrand.so (???) <DE2327A6-D66E-3B85-A7D1-DD5F868D2ED6> /usr/local/lib/python2.7/site-packages/numpy/random/mtrand.so
0x109ccf000 - 0x109cdefff +_ctypes.so (0) <D6A61F6C-676E-3B72-B8DF-8C7B3C094E0C> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so
0x109ce9000 - 0x109cecfff +_struct.so (0) <6AA070ED-02B7-3DE3-9851-0FA49DB24FA9> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so
0x109de8000 - 0x109debff7 +strop.so (0) <E355E7B8-570F-30A6-AE38-ECD08FCE1C8D> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so
0x109def000 - 0x109df2fff +zlib.so (0) <FCB3E46D-4B9C-3A51-8F99-A2720E72AD75> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/zlib.so
0x109e36000 - 0x109e3efff +_socket.so (0) <1D54A3B9-A146-3B52-A2EC-A531CB2815B1> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so
0x109e48000 - 0x109e52fff +_ssl.so (0) <67DA7263-C866-3DFF-836E-659C527E0494> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so
0x109edc000 - 0x109eddfff +_scproxy.so (0) <3E573FA0-10A0-3614-AD54-07320FFC3452> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_scproxy.so
0x109f60000 - 0x109f68fff +parser.so (0) <1EA858FF-78CC-3A56-B732-E870DF04287E> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/parser.so
0x109fac000 - 0x109fcafff +pyexpat.so (0) <A2CE4072-E964-3DBD-AB26-E989C7395BA6> /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/pyexpat.so
0x10a0d5000 - 0x10a51ffff +_algorithms.so (0) <B32F93B6-B3D0-3EEC-A802-D6376794C564> /usr/local/lib/python2.7/site-packages/nupic/bindings/_algorithms.so
0x10a857000 - 0x10a949fff org.python.python (2.7.10 - 2.7.10) <E4356925-959C-36B1-9991-1D925E7B6C94> /System/Library/Frameworks/Python.framework/Versions/2.7/Python
0x7fff68d9b000 - 0x7fff68dd1887 dyld (353.2.3) <B1B370A5-479F-3533-8AD7-97B687D4F989> /usr/lib/dyld
0x7fff83936000 - 0x7fff83947ff7 libz.1.dylib (55) <88C7C7DE-04B8-316F-8B74-ACD9F3DE1AA1> /usr/lib/libz.1.dylib
0x7fff83eab000 - 0x7fff83eabff7 liblaunch.dylib (559.40.1) <4F81CA3A-D2CE-3030-A89D-42F3DAD7BA8F> /usr/lib/system/liblaunch.dylib
0x7fff83eac000 - 0x7fff83eb4ffb libcopyfile.dylib (118.1.2) <0C68D3A6-ACDD-3EF3-991A-CC82C32AB836> /usr/lib/system/libcopyfile.dylib
0x7fff84d34000 - 0x7fff84d35ff3 libSystem.B.dylib (1213) <1866C519-C5F3-3D09-8C17-A8F703664521> /usr/lib/libSystem.B.dylib
0x7fff84ec9000 - 0x7fff84f0fff7 libauto.dylib (186) <A260789B-D4D8-316A-9490-254767B8A5F1> /usr/lib/libauto.dylib
0x7fff8551c000 - 0x7fff85539fff libsystem_kernel.dylib (2782.50.1) <1EE815DA-FF1B-3A53-AE9B-C98BD8177A9D> /usr/lib/system/libsystem_kernel.dylib
0x7fff8555f000 - 0x7fff85561fff libsystem_configuration.dylib (699.40.2) <56F94DCE-DBDE-3615-8F07-DE6270D9F8BE> /usr/lib/system/libsystem_configuration.dylib
0x7fff85597000 - 0x7fff8559bfff libcache.dylib (69) <45E9A2E7-99C4-36B2-BEE3-0C4E11614AD1> /usr/lib/system/libcache.dylib
0x7fff856fc000 - 0x7fff856fdff7 libsystem_blocks.dylib (65) <9615D10A-FCA7-3BE4-AA1A-1B195DACE1A1> /usr/lib/system/libsystem_blocks.dylib
0x7fff85b55000 - 0x7fff85b71ff7 libsystem_malloc.dylib (53.30.1) <DDA8928B-CC0D-3255-BD8A-3FEA0982B890> /usr/lib/system/libsystem_malloc.dylib
0x7fff85bf7000 - 0x7fff85f12fcf com.apple.vImage (8.0 - 8.0) <1183FE6A-FDB6-3B3B-928D-50C7909F2308> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x7fff85f2c000 - 0x7fff85f3dff3 libsystem_coretls.dylib (35.40.1) <155DA0A9-2046-332E-BFA3-D7974A51F731> /usr/lib/system/libsystem_coretls.dylib
0x7fff869cb000 - 0x7fff86b59fff libBLAS.dylib (1128) <497912C1-A98E-3281-BED7-E9C751552F61> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff86e00000 - 0x7fff86e00ff7 libunc.dylib (29) <5676F7EA-C1DF-329F-B006-D2C3022B7D70> /usr/lib/system/libunc.dylib
0x7fff8798d000 - 0x7fff8799dff7 libbsm.0.dylib (34) <A3A2E56C-2B65-37C7-B43A-A1F926E1A0BB> /usr/lib/libbsm.0.dylib
0x7fff87b8e000 - 0x7fff87bbefff libsystem_m.dylib (3086.1) <1E12AB45-6D96-36D0-A226-F24D9FB0D9D6> /usr/lib/system/libsystem_m.dylib
0x7fff87be9000 - 0x7fff87bebff7 libsystem_coreservices.dylib (9) <41B7C578-5A53-31C8-A96F-C73E030B0938> /usr/lib/system/libsystem_coreservices.dylib
0x7fff87bec000 - 0x7fff87beefff libquarantine.dylib (76.20.1) <7AF90041-2768-378A-925A-D83161863642> /usr/lib/system/libquarantine.dylib
0x7fff88c2f000 - 0x7fff88ca7ff7 com.apple.SystemConfiguration (1.14.4 - 1.14) <3DFFD7F7-BD23-3F4C-A209-C4A0D99F6573> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fff899a0000 - 0x7fff899f4fff libc++.1.dylib (120) <1B9530FD-989B-3174-BB1C-BDC159501710> /usr/lib/libc++.1.dylib
0x7fff89a03000 - 0x7fff89a03ff7 libkeymgr.dylib (28) <77845842-DE70-3CC5-BD01-C3D14227CED5> /usr/lib/system/libkeymgr.dylib
0x7fff8a39f000 - 0x7fff8a3a0ffb libremovefile.dylib (35) <3485B5F4-6CE8-3C62-8DFD-8736ED6E8531> /usr/lib/system/libremovefile.dylib
0x7fff8a3a1000 - 0x7fff8a3b8ff7 libLinearAlgebra.dylib (1128) <E78CCBAA-A999-3B65-8EC9-06DB15E67C37> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
0x7fff8a3b9000 - 0x7fff8a3e1fff libsystem_info.dylib (459.40.1) <2E16C4B3-A327-3957-9C41-143911979A1E> /usr/lib/system/libsystem_info.dylib
0x7fff8a5b8000 - 0x7fff8a5bdfff libsystem_stats.dylib (163.30.2) <D0E96837-3CF6-323D-B711-6DF6F660E530> /usr/lib/system/libsystem_stats.dylib
0x7fff8ad36000 - 0x7fff8ad3efff libsystem_platform.dylib (63) <64E34079-D712-3D66-9CE2-418624A5C040> /usr/lib/system/libsystem_platform.dylib
0x7fff8ad93000 - 0x7fff8b1a0ff7 libLAPACK.dylib (1128) <F9201AE7-B031-36DB-BCF8-971E994EF7C1> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fff8b327000 - 0x7fff8b32eff7 libcompiler_rt.dylib (35) <BF8FC133-EE10-3DA6-9B90-92039E28678F> /usr/lib/system/libcompiler_rt.dylib
0x7fff8bda2000 - 0x7fff8bdb8ff7 libsystem_asl.dylib (267) <F153AC5B-0542-356E-88C8-20A62CA704E2> /usr/lib/system/libsystem_asl.dylib
0x7fff8bdf2000 - 0x7fff8bdf4fff libsystem_sandbox.dylib (358.20.5) <3F5E973F-C702-31AC-97BC-05F5C195683C> /usr/lib/system/libsystem_sandbox.dylib
0x7fff8c836000 - 0x7fff8ca3046f libobjc.A.dylib (647) <759E155D-BC42-3D4E-869B-6F57D477177C> /usr/lib/libobjc.A.dylib
0x7fff8cb22000 - 0x7fff8cb5afff libsystem_network.dylib (412.20.3) <6105C134-6722-3C0A-A4CE-5E1261E2E1CC> /usr/lib/system/libsystem_network.dylib
0x7fff8cbcb000 - 0x7fff8cbccfff libsystem_secinit.dylib (18) <581DAD0F-6B63-3A48-B63B-917AF799ABAA> /usr/lib/system/libsystem_secinit.dylib
0x7fff8cbcd000 - 0x7fff8cbd6ff7 libsystem_notify.dylib (133.1.1) <61147800-F320-3DAA-850C-BADF33855F29> /usr/lib/system/libsystem_notify.dylib
0x7fff8ccbc000 - 0x7fff8ccbcfff com.apple.Accelerate.vecLib (3.10 - vecLib 3.10) <9D749502-A228-3BF1-B52F-A182DEEB2C4D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff8d03e000 - 0x7fff8d044fff libsystem_trace.dylib (72.20.1) <840F5301-B55A-3078-90B9-FEFFD6CD741A> /usr/lib/system/libsystem_trace.dylib
0x7fff8dd5f000 - 0x7fff8dd65ff7 libsystem_networkextension.dylib (167.40.3) <BA58B30B-8377-3B0A-8AE3-4F84021D9D4E> /usr/lib/system/libsystem_networkextension.dylib
0x7fff8dd66000 - 0x7fff8dd90ff7 libdispatch.dylib (442.50.1) <A61E703C-784A-3698-B513-75DD12AAD6DC> /usr/lib/system/libdispatch.dylib
0x7fff8e065000 - 0x7fff8e06aff7 libmacho.dylib (862) <126CA2ED-DE91-308F-8881-B9DAEC3C63B6> /usr/lib/system/libmacho.dylib
0x7fff8ef0d000 - 0x7fff8ef0dfff com.apple.Accelerate (1.10 - Accelerate 1.10) <2C8AF258-4F11-3BEC-A826-22D7199B3975> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x7fff8ef4c000 - 0x7fff8ef55fff libsystem_pthread.dylib (105.40.1) <ACE90967-ECD0-3251-AEEB-461E3C6414F7> /usr/lib/system/libsystem_pthread.dylib
0x7fff8f9c2000 - 0x7fff8f9c3fff libDiagnosticMessagesClient.dylib (100) <2EE8E436-5CDC-34C5-9959-5BA218D507FB> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff9028b000 - 0x7fff9039dff7 libvDSP.dylib (516) <151B3CCB-77D3-3715-A3D0-7C74CD5C7FFC> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x7fff914ff000 - 0x7fff91504ff7 libunwind.dylib (35.3) <BE7E51A0-B6EA-3A54-9CCA-9D88F683A6D6> /usr/lib/system/libunwind.dylib
0x7fff917f1000 - 0x7fff9186afe7 libcorecrypto.dylib (233.30.1) <5779FFA0-4D9A-3AD4-B7F2-618227621DC8> /usr/lib/system/libcorecrypto.dylib
0x7fff91adc000 - 0x7fff91ae4fff libsystem_dnssd.dylib (576.50.2) <9EC5AF92-D0D2-3BDE-92B6-D3730D3865C8> /usr/lib/system/libsystem_dnssd.dylib
0x7fff91eaf000 - 0x7fff91f5efe7 libvMisc.dylib (516) <6739E390-46E7-3BFA-9B69-B278562326E6> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x7fff91f5f000 - 0x7fff922f7ff7 com.apple.CoreFoundation (6.9 - 1153.18) <5C0892B8-9691-341F-9279-CA3A74D59AA0> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff922fc000 - 0x7fff924e1ff7 libicucore.A.dylib (531.50) <CAA7ACE0-4012-3A13-864D-2B56B4B072FD> /usr/lib/libicucore.A.dylib
0x7fff92a54000 - 0x7fff92a7cfff libxpc.dylib (559.40.1) <5C829202-962E-3744-8B50-00D38CC88E84> /usr/lib/system/libxpc.dylib
0x7fff92acd000 - 0x7fff92af8fff libc++abi.dylib (125) <88A22A0F-87C6-3002-BFBA-AC0F2808B8B9> /usr/lib/libc++abi.dylib
0x7fff92c13000 - 0x7fff92c1efff libcommonCrypto.dylib (60061.30.1) <E789748D-F9A7-3CFF-B317-90DF348B1E95> /usr/lib/system/libcommonCrypto.dylib
0x7fff9328a000 - 0x7fff93316fe7 libsystem_c.dylib (1044.40.1) <F0635E0F-FE4B-34DB-ACF9-A58C1E9070E9> /usr/lib/system/libsystem_c.dylib
0x7fff93317000 - 0x7fff9331aff7 libdyld.dylib (353.2.3) <CFBBE540-D503-3AFC-B5D6-644F1E69949B> /usr/lib/system/libdyld.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 73166
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=109.5M resident=95.1M(87%) swapped_out_or_unallocated=14.4M(13%)
Writable regions: Total=53.9M written=13.3M(25%) resident=15.8M(29%) swapped_out=0K(0%) unallocated=38.1M(71%)
REGION TYPE VIRTUAL
=========== =======
Kernel Alloc Once 4K
MALLOC 44.8M
MALLOC (admin) 16K
STACK GUARD 56.0M
Stack 8192K
VM_ALLOCATE 16K
__DATA 2940K
__LINKEDIT 75.9M
__TEXT 33.6M
__UNICODE 552K
shared memory 4K
=========== =======
TOTAL 221.8M
Model: MacBookPro12,1, BootROM MBP121.0167.B14, 2 processors, Intel Core i5, 2.7 GHz, 8 GB, SMC 2.28f7
Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54414C41522D4E5544
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54414C41522D4E5544
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.15.166.24.3)
Bluetooth: Version 4.3.6f3 16238, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0256G, 251 GB
USB Device: Internal Memory Card Reader
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1
The problem does not happen if I run the native python installed on my mac. The following works just fine.
$ /usr/bin/python
Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from nupic.bindings.algorithms import SpatialPooler as SP
>>>
Any help would be greatly appreciated.

Python program using dbm database on Mac crashes when database is over 1 Gig

I'm having this same problem with both python2 and python3 on my Mac running Yosemite 10.10.2 (I have 8GiB of RAM)
I had written some code that adds entries to two different dictionaries and searches for entries in both dictionaries. However, the dictionaries are now getting too big to store in RAM and so I am trying to use the simple "dbm" module (import dbm) database provided with python/python3...
But the db code crashes when the combined size of both dictionaries exceeds a Gig! This is an even worse size limitation than storing the dictionaries in RAM since there I can go up to (and have gone up to) about 8Gigs... I'm wondering if anyone has run into python crashing with large dbm databases on mac?
Here's some code that may explain better than my English explanation:
myDB=dbm.open('mine','c')
targDB=dbm.open('cats','c')
count=0
countTarg=0
while(True):
headerTarg=str(countTarg).encode("utf-8")
testString=f(headerTarg) #function f returns byte string
if testString in myDB:
myHeader=myDB[testString]
targHeader=headerTarg
break
else:
targDB[testString]=str(countTarg).encode("utf-8")
countTarg+=1
header=str(count).encode("utf-8")
checkMeString=g(header) #function g returns byte string
if checkMeString in targDB:
targHeader=targDB[checkMeString]
myHeader=header
break
else:
myDB[checkMeString]=str(count).encode("utf-8")
count+=1
Actually, I don't think the details of the code matter much. Basically, these databases get created and get more and more entries, and are searched in the loop until a match is found. However, sometimes it takes a very long time to find a match and very large databases are required... and if the combined database size is bigger than a Gig the code crashes.
If I use dictionaries in RAM instead of database files the code doesn't crash, but in that case I am limited by the size of RAM. So, I want to switch to some kind of database. Any help would be greatly appreciated.
Finally, I was wondering, should I just eschew the built in dbm module altogether and go with some SQL module? If that's the way to go, please let me know. Thank you.
EDIT: Here is the crash report as requested:
Process: Python [553]
Path: /Library/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.4.2 (3.4.2)
Code Type: X86-64 (Native)
Parent Process: bash [308]
Responsible: Terminal [305]
User ID: 501
Date/Time: 2015-02-03 19:16:21.916 -0800
OS Version: Mac OS X 10.10.2 (14C109)
Report Version: 11
Anonymous UUID: 05C92373-2318-7473-A6A2-125AD71157CF
Time Awake Since Boot: 3300 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
VM Regions Near 0x8:
-->
__TEXT 0000000100000000-0000000100001000 [ 4K] r-x/rwx SM=COW /Library/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_c.dylib 0x00007fff92538460 __get_buf + 137
1 libsystem_c.dylib 0x00007fff925370e0 hash_access + 104
2 libsystem_c.dylib 0x00007fff92539fc3 dbm_fetch + 29
3 _dbm.so 0x00000001003f672c dbm_contains + 76
4 org.python.python 0x00000001000e291d PyEval_EvalFrameEx + 21869
5 org.python.python 0x00000001000e604d PyEval_EvalCodeEx + 2349
6 org.python.python 0x00000001000e610f PyEval_EvalCode + 63
7 org.python.python 0x000000010011064e PyRun_FileExFlags + 206
8 org.python.python 0x00000001001109fd PyRun_SimpleFileExFlags + 717
9 org.python.python 0x00000001001281be Py_Main + 3262
10 org.python.python 0x0000000100000e32 0x100000000 + 3634
11 org.python.python 0x0000000100000c84 0x100000000 + 3204
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000000000101 rsi: 0x0000000000010100 rbp: 0x00007fff5bfff210 rsp: 0x00007fff5bfff1b0
r8: 0x0000000100913800 r9: 0x00007fff5bfff2f0 r10: 0x0000000000000000 r11: 0x00000001003f66e0
r12: 0x0000000100434620 r13: 0x0000000100434620 r14: 0x00000001003d5438 r15: 0x000000010099c000
rip: 0x00007fff92538460 rfl: 0x0000000000010206 cr2: 0x0000000000000008
Logical CPU: 2
Error Code: 0x00000006
Trap Number: 14
Binary Images:
0x100000000 - 0x100000ff7 +org.python.python (3.4.2 - 3.4.2) <D486A30F-8362-E06E-B0A9-6E3CF809F506> /Library/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python
0x100003000 - 0x1001f1fe7 +org.python.python (3.4.2, [c] 2004-2014 Python Software Foundation. - 3.4.2) <E1D17D5C-238B-E208-B930-CBF0CE505400> /Library/Frameworks/Python.framework/Versions/3.4/Python
0x1003f5000 - 0x1003f6ff7 +_dbm.so (???) <875B3ED4-96DE-7FFA-F760-79CA470CCE40> /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/lib-dynload/_dbm.so
0x1003fa000 - 0x1003fcff7 +_hashlib.so (???) <6F568F50-759E-6851-2A21-DCCBFDD4AADA> /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/lib-dynload/_hashlib.so
0x1020b1000 - 0x1020b6ff7 +_struct.so (???) <F0078D5D-9663-F767-63F7-FDE4C6DDE1B2> /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/lib-dynload/_struct.so
0x1020be000 - 0x1020f4ff7 libssl.0.9.8.dylib (52.10.1) <4A2D6ECA-A07E-38B5-98D4-315A4A1E8CE6> /usr/lib/libssl.0.9.8.dylib
0x10210a000 - 0x10210bff7 +_heapq.so (???) <199DA290-627E-D49D-2525-4D3CE9D2C8A2> /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/lib-dynload/_heapq.so
0x7fff69e52000 - 0x7fff69e88837 dyld (353.2.1) <65DCCB06-339C-3E25-9702-600A28291D0E> /usr/lib/dyld
0x7fff8a1c9000 - 0x7fff8a2adfff libcrypto.0.9.8.dylib (52.10.1) <2A2924DE-63FB-37F6-B102-84D69240675B> /usr/lib/libcrypto.0.9.8.dylib
0x7fff8b00d000 - 0x7fff8b038fff libc++abi.dylib (125) <88A22A0F-87C6-3002-BFBA-AC0F2808B8B9> /usr/lib/libc++abi.dylib
0x7fff8b0e7000 - 0x7fff8b0fdff7 libsystem_asl.dylib (267) <F153AC5B-0542-356E-88C8-20A62CA704E2> /usr/lib/system/libsystem_asl.dylib
0x7fff8d6a5000 - 0x7fff8d6d5fff libsystem_m.dylib (3086.1) <1E12AB45-6D96-36D0-A226-F24D9FB0D9D6> /usr/lib/system/libsystem_m.dylib
0x7fff8dd19000 - 0x7fff8dd2aff7 libz.1.dylib (55) <88C7C7DE-04B8-316F-8B74-ACD9F3DE1AA1> /usr/lib/libz.1.dylib
0x7fff8dd50000 - 0x7fff8dd59ff7 libsystem_notify.dylib (133.1.1) <61147800-F320-3DAA-850C-BADF33855F29> /usr/lib/system/libsystem_notify.dylib
0x7fff8e418000 - 0x7fff8e435fff libsystem_kernel.dylib (2782.10.72) <97CD7ACD-EA0C-3434-BEFC-FCD013D6BB73> /usr/lib/system/libsystem_kernel.dylib
0x7fff8e465000 - 0x7fff8e48fff7 libdispatch.dylib (442.1.4) <502CF32B-669B-3709-8862-08188225E4F0> /usr/lib/system/libdispatch.dylib
0x7fff8e492000 - 0x7fff8e493fff libDiagnosticMessagesClient.dylib (100) <2EE8E436-5CDC-34C5-9959-5BA218D507FB> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff8e5a1000 - 0x7fff8e5a3fff libsystem_configuration.dylib (699.1.5) <5E14864E-089A-3D84-85A4-980B776427A8> /usr/lib/system/libsystem_configuration.dylib
0x7fff8e5a4000 - 0x7fff8e5a5ff7 libsystem_blocks.dylib (65) <9615D10A-FCA7-3BE4-AA1A-1B195DACE1A1> /usr/lib/system/libsystem_blocks.dylib
0x7fff8e61a000 - 0x7fff8e622fff libsystem_platform.dylib (63) <64E34079-D712-3D66-9CE2-418624A5C040> /usr/lib/system/libsystem_platform.dylib
0x7fff8ea00000 - 0x7fff8ea28fff libsystem_info.dylib (459) <B85A85D5-8530-3A93-B0C3-4DEC41F79478> /usr/lib/system/libsystem_info.dylib
0x7fff8eb04000 - 0x7fff8eb06ff7 libquarantine.dylib (76) <DC041627-2D92-361C-BABF-A869A5C72293> /usr/lib/system/libquarantine.dylib
0x7fff8f05a000 - 0x7fff8f0aefff libc++.1.dylib (120) <1B9530FD-989B-3174-BB1C-BDC159501710> /usr/lib/libc++.1.dylib
0x7fff8f119000 - 0x7fff8f11afff libSystem.B.dylib (1213) <90B107BC-FF74-32CC-B1CF-4E02F544D957> /usr/lib/libSystem.B.dylib
0x7fff8f3fa000 - 0x7fff8f3fbfff com.apple.TrustEvaluationAgent (2.0 - 25) <2D61A2C3-C83E-3A3F-8EC1-736DBEC250AB> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
0x7fff8f5b7000 - 0x7fff8f5c2fff libcommonCrypto.dylib (60061) <D381EBC6-69D8-31D3-8084-5A80A32CB748> /usr/lib/system/libcommonCrypto.dylib
0x7fff900d8000 - 0x7fff900ddff7 libsystem_stats.dylib (163.10.18) <9B8CCF24-DDDB-399A-9237-4BEC225D2E8C> /usr/lib/system/libsystem_stats.dylib
0x7fff900de000 - 0x7fff900efff7 libsystem_coretls.dylib (35.1.2) <BC691CD1-17B6-39A5-BD02-AF973695FD1D> /usr/lib/system/libsystem_coretls.dylib
0x7fff900f0000 - 0x7fff90166fe7 libcorecrypto.dylib (233.1.2) <E1789801-3985-3949-B736-6B3378873301> /usr/lib/system/libcorecrypto.dylib
0x7fff90177000 - 0x7fff9017cff7 libunwind.dylib (35.3) <BE7E51A0-B6EA-3A54-9CCA-9D88F683A6D6> /usr/lib/system/libunwind.dylib
0x7fff902a9000 - 0x7fff902b0ff7 libcompiler_rt.dylib (35) <BF8FC133-EE10-3DA6-9B90-92039E28678F> /usr/lib/system/libcompiler_rt.dylib
0x7fff91a77000 - 0x7fff91a80fff libsystem_pthread.dylib (105.10.1) <3103AA7F-3BAE-3673-9649-47FFD7E15C97> /usr/lib/system/libsystem_pthread.dylib
0x7fff91a81000 - 0x7fff91ac7ff7 libauto.dylib (186) <A260789B-D4D8-316A-9490-254767B8A5F1> /usr/lib/libauto.dylib
0x7fff9204d000 - 0x7fff9224746f libobjc.A.dylib (647) <759E155D-BC42-3D4E-869B-6F57D477177C> /usr/lib/libobjc.A.dylib
0x7fff92248000 - 0x7fff92248ff7 libkeymgr.dylib (28) <77845842-DE70-3CC5-BD01-C3D14227CED5> /usr/lib/system/libkeymgr.dylib
0x7fff9242a000 - 0x7fff92462ffb libsystem_network.dylib (411.1) <2EC3A005-473F-3C36-A665-F88B5BACC7F0> /usr/lib/system/libsystem_network.dylib
0x7fff9251f000 - 0x7fff925abff7 libsystem_c.dylib (1044.10.1) <199ED5EB-77A1-3D43-AA51-81779CE0A742> /usr/lib/system/libsystem_c.dylib
0x7fff929cd000 - 0x7fff929d3ff7 libsystem_networkextension.dylib (167.1.10) <29AB225B-D7FB-30ED-9600-65D44B9A9442> /usr/lib/system/libsystem_networkextension.dylib
0x7fff929d6000 - 0x7fff929d7ffb libremovefile.dylib (35) <3485B5F4-6CE8-3C62-8DFD-8736ED6E8531> /usr/lib/system/libremovefile.dylib
0x7fff92b0e000 - 0x7fff92b0eff7 liblaunch.dylib (559.10.3) <DFCDEBDF-8247-3DC7-9879-E7E497DDA4B4> /usr/lib/system/liblaunch.dylib
0x7fff92de7000 - 0x7fff92fccff3 libicucore.A.dylib (531.31) <B08E00D5-13C6-3391-AB3A-8DE693D3B42E> /usr/lib/libicucore.A.dylib
0x7fff92fcd000 - 0x7fff93363fff com.apple.CoreFoundation (6.9 - 1152) <CBD1591C-405E-376E-87E9-B264610EBF49> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff9355d000 - 0x7fff9355efff libsystem_secinit.dylib (18) <581DAD0F-6B63-3A48-B63B-917AF799ABAA> /usr/lib/system/libsystem_secinit.dylib
0x7fff9404e000 - 0x7fff94054fff libsystem_trace.dylib (72.1.3) <A9E6B7D8-C327-3742-AC54-86C94218B1DF> /usr/lib/system/libsystem_trace.dylib
0x7fff94055000 - 0x7fff94057ff7 libsystem_sandbox.dylib (358.1.1) <95312E09-DA28-324A-A084-F3E574D0210E> /usr/lib/system/libsystem_sandbox.dylib
0x7fff95556000 - 0x7fff95556ff7 libunc.dylib (29) <5676F7EA-C1DF-329F-B006-D2C3022B7D70> /usr/lib/system/libunc.dylib
0x7fff96115000 - 0x7fff96117ff7 libsystem_coreservices.dylib (9) <41B7C578-5A53-31C8-A96F-C73E030B0938> /usr/lib/system/libsystem_coreservices.dylib
0x7fff96404000 - 0x7fff96407ff7 libdyld.dylib (353.2.1) <4E33E416-F1D8-3598-B8CC-6863E2ECD0E6> /usr/lib/system/libdyld.dylib
0x7fff96e6f000 - 0x7fff96e77ffb libcopyfile.dylib (118.1.2) <0C68D3A6-ACDD-3EF3-991A-CC82C32AB836> /usr/lib/system/libcopyfile.dylib
0x7fff96e78000 - 0x7fff96e80fff libsystem_dnssd.dylib (561.1.1) <62B70ECA-E40D-3C63-896E-7F00EC386DDB> /usr/lib/system/libsystem_dnssd.dylib
0x7fff980c0000 - 0x7fff980c5ff7 libmacho.dylib (862) <126CA2ED-DE91-308F-8881-B9DAEC3C63B6> /usr/lib/system/libmacho.dylib
0x7fff991c8000 - 0x7fff991ccfff libcache.dylib (69) <45E9A2E7-99C4-36B2-BEE3-0C4E11614AD1> /usr/lib/system/libcache.dylib
0x7fff991f0000 - 0x7fff9920cff7 libsystem_malloc.dylib (53.1.1) <19BCC257-5717-3502-A71F-95D65AFA861B> /usr/lib/system/libsystem_malloc.dylib
0x7fff998ac000 - 0x7fff998d4fff libxpc.dylib (559.10.3) <876216DC-D5D3-381E-8AF9-49AE464E5107> /usr/lib/system/libxpc.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 21
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 89098
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=85.5M resident=30.2M(35%) swapped_out_or_unallocated=55.3M(65%)
Writable regions: Total=55.2M written=5552K(10%) resident=6248K(11%) swapped_out=0K(0%) unallocated=49.1M(89%)
REGION TYPE VIRTUAL
=========== =======
Kernel Alloc Once 4K
MALLOC 38.4M
MALLOC (admin) 16K
MALLOC_LARGE (reserved) 512K reserved VM address space (unallocated)
VM_ALLOCATE 8K
__DATA 1764K
__LINKEDIT 71.1M
__TEXT 14.5M
__UNICODE 544K
__UNIXSTACK 16.0M
shared memory 4K
=========== =======
TOTAL 142.7M
TOTAL, minus reserved VM space 142.2M
Model: MacBookAir6,2, BootROM MBA61.0099.B18, 2 processors, Intel Core i7, 1.7 GHz, 8 GB, SMC 2.13f15
Graphics: Intel HD Graphics 5000, Intel HD Graphics 5000, Built-In
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80CE, 0x4B3445364533303445452D45474345000000
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80CE, 0x4B3445364533303445452D45474345000000
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.15.159.13.12)
Bluetooth: Version 4.3.2f6 15235, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0512F, 500.28 GB
USB Device: Internal Memory Card Reader
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Air, Apple Inc., 23.6

Pyinstaller-created app crashes on a different computer

I'm making a wxpython-based App for MacOS, and packaging it with pyinstaller.
It seems to work on my machine, and on another machine, but crashes when I send it to my user.
I initially posted here: https://stackoverflow.com/questions/24129747/macos-app-bundle-built-with-pyinstaller-crashes-on-another-mac, but then just tried to package a simple app and see if it would work, but the results are the same. I have Mac OS X 10.9.2, python 2.7.5, wxpython 2.9.5 and the latest development pyinstaller. The app did work on another machine, Mac OS X 10.9.3. However, when I sent it to my user who has Mac OS 10.8.5, the app crashes with Segmentation fault 11:
idm2277:~ mdutra$ /Users/mdutra/Desktop/Test.app/Contents/MacOS/test ; exit;
Segmentation fault: 11
logout
[Process completed]
Here is a simple script test.py that creates a hello window:
import wx
app = wx.App(False)
frame = wx.Frame(None,wx.ID_ANY,"Hello!")
frame.Show(True)
control = wx.StaticText(frame,label = "Test successful!")
app.MainLoop()
And here is the specification my.spec, which I run as follows:
python {path_to_pyinstaller_folder}/pyinstaller.py --windowed my.spec
import os
src ='/Users/ojy/test'
dist = '/Users/ojy/test/bin'
icn = '/Users/ojy/icon.icns'
a = Analysis([os.path.join(src,'test.py')],
pathex=[dist],
hiddenimports=[],
hookspath=None,
runtime_hooks=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='test',
debug=False,
strip=None,
upx=True,
console=False )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=None,
upx=True,
name='Test')
app = BUNDLE(coll,
name='Test.app',
icon=icn)
Any ideas why it happens and how to fix it?
Crash log (the complete file didn't meet the size limitation, so I replaced the middle chunk with ....), but I can add the whole thing if necessary.
Process: test [9701]
Path: /Users/USER/Desktop/Test.app/Contents/MacOS/test
Identifier: test
Version: 0.0.0 (???)
Code Type: X86-64 (Native)
Parent Process: bash [9698]
User ID: 502
Date/Time: 2014-06-09 17:13:40.558 -0700
OS Version: Mac OS X 10.8.5 (12F45)
Report Version: 10
Crashes Since Last Report: 1
Per-App Crashes Since Last Report: 1
Anonymous UUID: D034FFD8-9A64-DFC6-DC85-9FD7B4DD8F61
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8a40cd46 __kill + 10
1 test 0x000000010f924c18 0x10f922000 + 11288
2 test 0x000000010f937bed 0x10f922000 + 89069
3 test 0x000000010f923454 0x10f922000 + 5204
Thread 1:
0 libsystem_kernel.dylib 0x00007fff8a40d6d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff91036f1c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff91036ce3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff91021191 start_wqthread + 13
Thread 2:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff8a40dd16 kevent + 10
1 libdispatch.dylib 0x00007fff92b67dea _dispatch_mgr_invoke + 883
2 libdispatch.dylib 0x00007fff92b679ee _dispatch_mgr_thread + 54
Thread 3:
0 libsystem_kernel.dylib 0x00007fff8a40d6d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff91036f1c _pthread_workq_return + 25
2 libsystem_c.dylib 0x00007fff91036ce3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x00007fff91021191 start_wqthread + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000001 rcx: 0x00007fff502dcf28 rdx: 0x0000000000000000
rdi: 0x00000000000025e5 rsi: 0x000000000000000b rbp: 0x00007fff502dcf80 rsp: 0x00007fff502dcf28
r8: 0x0000000000000003 r9: 0x0000000035447f8c r10: 0x00000000000fc080 r11: 0x0000000000000206
r12: 0x00007fff502ddd00 r13: 0x00007fa5d2c0e920 r14: 0x0000000000000000 r15: 0x0000000000000001
rip: 0x00007fff8a40cd46 rfl: 0x0000000000000206 cr2: 0x00007fa5d2c0f9a0
Logical CPU: 0
Binary Images:
0x10f922000 - 0x10f93eff7 +test (0.0.0 - ???) <C371E49E-CC99-3791-8965-4D3EE55AD3BF> /Users/USER/Desktop/Test.app/Contents/MacOS/test
0x7fff6f522000 - 0x7fff6f55693f dyld (210.2.3) <6900F2BA-DB48-3B78-B668-58FC0CF6BCB8> /usr/lib/dyld
0x7fff89c71000 - 0x7fff89dc3fff com.apple.audio.toolbox.AudioToolbox (1.9.2 - 1.9.2) <DC5F3D1B-036A-37DE-BC24-7636DC95EA1C> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x7fff89dc4000 - 0x7fff89e89ff7 com.apple.coreui (2.0 - 181.1) <83D2C92D-6842-3C9D-9289-39D5B4554C3A> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x7fff89e8a000 - 0x7fff8a15bfff com.apple.security (7.0 - 55179.16.1) <49A6A8FD-124D-30E0-94C3-C73F8C9469E6> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff8a335000 - 0x7fff8a35dfff libJPEG.dylib (852) <4E159C31-1B41-3EFF-89EC-3F7BC9053F2C> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x7fff8a3be000 - 0x7fff8a3c4fff libmacho.dylib (829) <BF332AD9-E89F-387E-92A4-6E1AB74BD4D9> /usr/lib/system/libmacho.dylib
0x7fff8a3c5000 - 0x7fff8a3e5fff libPng.dylib (852) <CCBFA9A9-33C0-3189-AFE0-A77E831EEBA8> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x7fff8a3fb000 - 0x7fff8a416ff7 libsystem_kernel.dylib (2050.48.12) <4B7993C3-F62D-3AC1-AF92-414A0D6EED5E> /usr/lib/system/libsystem_kernel.dylib
0x7fff8a417000 - 0x7fff8a43efff com.apple.framework.familycontrols (4.1 - 410) <50F5A52C-8FB6-300A-977D-5CFDE4D5796B> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls
0x7fff8a43f000 - 0x7fff8a519fff com.apple.backup.framework (1.4.3 - 1.4.3) <6B65C44C-7777-3331-AD9D-438D10AAC777> /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup
0x7fff8a51a000 - 0x7fff8a633fff com.apple.ImageIO.framework (3.2.2 - 852) <1D023BCE-1FA2-3743-B449-7489BC0C5C43> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x7fff8a634000 - 0x7fff8a655fff com.apple.Ubiquity (1.2 - 243.15) <C9A7EE77-B637-3676-B667-C0843BBB0409> /System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity
0x7fff8a6e0000 - 0x7fff8a6e4ff7 com.apple.CommonPanels (1.2.5 - 94) <AAC003DE-2D6E-38B7-B66B-1F3DA91E7245> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x7fff8a6e5000 - 0x7fff8a73aff7 libTIFF.dylib (852) <0CA1662F-EB05-34DE-B9BA-0A03EC59B846> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
.....
.....
0x7fff93654000 - 0x7fff936d5fff com.apple.Metadata (10.7.0 - 707.12) <69E3EEF7-8B7B-3652-8320-B8E885370E56> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x7fff936d6000 - 0x7fff93735fff com.apple.AE (645.6 - 645.6) <44F403C1-660A-3543-AB9C-3902E02F936F> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x7fff93754000 - 0x7fff93759fff libcompiler_rt.dylib (30) <08F8731D-5961-39F1-AD00-4590321D24A9> /usr/lib/system/libcompiler_rt.dylib
0x7fff937ef000 - 0x7fff93a24ff7 com.apple.CoreData (106.1 - 407.7) <A676E1A4-2144-376B-92B8-B450DD1D78E5> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x7fff93a60000 - 0x7fff93abcff7 com.apple.Symbolication (1.3 - 93) <D5044687-E424-31CF-B120-667143E6B9C1> /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication
0x7fff93af0000 - 0x7fff93af4fff libCoreVMClient.dylib (32.5) <DB009CD4-BB0E-3331-BBB4-A118781D193F> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
0x7fff93af5000 - 0x7fff93af6fff liblangid.dylib (116) <864C409D-D56B-383E-9B44-A435A47F2346> /usr/lib/liblangid.dylib
0x7fff93af7000 - 0x7fff93b95ff7 com.apple.ink.framework (10.8.2 - 150) <3D8D16A2-7E01-3EA1-B637-83A36D353308> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x7fff93fc9000 - 0x7fff94086ff7 com.apple.ColorSync (4.8.0 - 4.8.0) <6CE333AE-EDDB-3768-9598-9DB38041DC55> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x7fff94087000 - 0x7fff94087fff com.apple.vecLib (3.8 - vecLib 3.8) <6CBBFDC4-415C-3910-9558-B67176447789> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff94088000 - 0x7fff940a7ff7 com.apple.ChunkingLibrary (2.0 - 133.3) <8BEC9AFB-DCAA-37E8-A5AB-24422B234ECF> /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary
0x7fff940a8000 - 0x7fff944c5fff FaceCoreLight (2.4.1) <DDAFFD7A-D312-3407-A010-5AEF3E17831B> /System/Library/PrivateFrameworks/FaceCoreLight.framework/Versions/A/FaceCoreLight
0x7fff9453b000 - 0x7fff94541fff com.apple.DiskArbitration (2.5.2 - 2.5.2) <C713A35A-360E-36CE-AC0A-25C86A3F50CA> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x7fff9455e000 - 0x7fff94562fff libpam.2.dylib (20) <C8F45864-5B58-3237-87E1-2C258A1D73B8> /usr/lib/libpam.2.dylib
0x7fff94563000 - 0x7fff94566fff libRadiance.dylib (852) <139962CD-21E2-3D31-9F47-D5F2D6C2C2BC> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x7fff94567000 - 0x7fff94589ff7 libxpc.dylib (140.43) <70BC645B-6952-3264-930C-C835010CCEF9> /usr/lib/system/libxpc.dylib
0x7fff9465e000 - 0x7fff946a8ff7 libGLU.dylib (8.10.1) <6699DEA6-9EEB-3B84-A57F-B25AE44EC584> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x7fff94eff000 - 0x7fff94efffff libkeymgr.dylib (25) <CC9E3394-BE16-397F-926B-E579B60EE429> /usr/lib/system/libkeymgr.dylib
0x7fff94f00000 - 0x7fff94f0fff7 libxar.1.dylib (105) <370ED355-E516-311E-BAFD-D80633A84BE1> /usr/lib/libxar.1.dylib
0x7fff94f4c000 - 0x7fff94f98ff7 libauto.dylib (185.4) <AD5A4CE7-CB53-313C-9FAE-673303CC2D35> /usr/lib/libauto.dylib
0x7fff94fc1000 - 0x7fff94fc4ff7 libdyld.dylib (210.2.3) <F59367C9-C110-382B-A695-9035A6DD387E> /usr/lib/system/libdyld.dylib
0x7fff96120000 - 0x7fff9623892f libobjc.A.dylib (532.2) <90D31928-F48D-3E37-874F-220A51FD9E37> /usr/lib/libobjc.A.dylib
0x7fff96239000 - 0x7fff96240fff libGFXShared.dylib (8.10.1) <B4AB9480-2CDB-34F8-8D6F-F5A2CFC221B0> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
0x7fff96241000 - 0x7fff96284ff7 com.apple.bom (12.0 - 192) <0BF1F2D2-3648-36B7-BE4B-551A0173209B> /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
0x7fff962e1000 - 0x7fff962e2ff7 libdnsinfo.dylib (453.19) <14202FFB-C3CA-3FCC-94B0-14611BF8692D> /usr/lib/system/libdnsinfo.dylib
0x7fff962e3000 - 0x7fff964cdff7 com.apple.CoreFoundation (6.8 - 744.19) <0F7403CA-2CB8-3D0A-992B-679701DF27CA> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff964ce000 - 0x7fff96580ff7 com.apple.LaunchServices (539.11 - 539.11) <A86F44E5-F285-3029-A5D1-00CD3C231A08> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x7fff96581000 - 0x7fff96978fff libLAPACK.dylib (1073.4) <D632EC8B-2BA0-3853-800A-20DA00A1091C> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fff96979000 - 0x7fff9697bfff com.apple.securityhi (4.0 - 55002) <9B6CBA92-123F-3307-A2D7-D77A8D3BF87E> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 2
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 4537
thread_create: 1
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=142.6M resident=62.2M(44%) swapped_out_or_unallocated=80.4M(56%)
Writable regions: Total=67.3M written=236K(0%) resident=920K(1%) swapped_out=2728K(4%) unallocated=66.4M(99%)
REGION TYPE VIRTUAL
=========== =======
CG shared images 128K
CoreServices 1360K
MALLOC 41.5M
MALLOC guard page 48K
Memory tag=242 12K
STACK GUARD 56.0M
Stack 9752K
VM_ALLOCATE 16.0M
__DATA 10.2M
__IMAGE 528K
__LINKEDIT 52.1M
__TEXT 90.5M
__UNICODE 544K
mapped file 19.0M
shared memory 308K
=========== =======
TOTAL 297.6M
System Profile:
Model: iMac13,3, BootROM IM131.010A.B07, 2 processors, Intel Core i3, 3.3 GHz, 4 GB, SMC 2.10f5
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In, 512 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54333235533643465238432D50422020
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54333235533643465238432D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xF4), Broadcom BCM43xx 1.0 (5.106.98.100.17)
Bluetooth: Version 4.1.7f4 12974, 3 service, 21 devices, 3 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: APPLE HDD ST500LM012, 500.11 GB
USB Device: hub_device, 0x8087 (Intel Corporation), 0x0024, 0x1d100000 / 2
USB Device: Keyboard Hub, apple_vendor_id, 0x1006, 0x1d130000 / 5
USB Device: Apple Keyboard, apple_vendor_id, 0x024f, 0x1d132000 / 9
USB Device: hub_device, 0x0424 (SMSC), 0x2412, 0x1d180000 / 3
USB Device: BRCM20702 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x1d181000 / 4
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x828b, 0x1d181300 / 7
USB Device: Apple Optical USB Mouse, apple_vendor_id, 0x0304, 0x14400000 / 1
USB Device: hub_device, 0x8087 (Intel Corporation), 0x0024, 0x1a100000 / 2
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8511, 0x1a110000 / 3

Categories

Resources