扩展Python以调用C ++函数时出现malloc错误

时间:2014-06-08 23:35:10

标签: python c++ ctypes

我正在尝试将C ++函数包装起来以便从Python调用。 我的C ++代码编译并成功运行,但是当我从python中调用它时,我收到以下错误:

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

这是我的C ++函数,它抓取我的文件系统:

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;
}

我认为问题不在'GetFilesInDirectory()'中,但我会在必要时发布。

这是extern块,它帮助我包装函数:

extern "C" {
    Crawler* Crawler_new(){ return new Crawler(); }
    const char * Crawler_crawlDirectory(Crawler* crawler, const string directory){ return(crawler->crawlDirectory(directory)); }
} 

这是定义Crawler类的python文件:

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)

我很肯定我的C ++代码正在被正确编译(使用g ++作为dylib),因为我已经使用其他函数测试了包装器,这些函数返回了char * s和整数等简单的东西,并且它们正常工作。

以下是我从python调用函数的方法:

>>> from wrapper import *
>>> c = Crawler()
>>> files = c.crawlDirectory('/Users/whatever/desktop')

任何人都可以提供有关解决此问题的见解吗?

编辑:这是问题报告:

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: 

编辑:来自gdb的堆栈跟踪: http://pastebin.com/ncx5fTRg (达到SO问题大小限制)。

感谢。

0 个答案:

没有答案