2014-04-30 94 views
0

我有一個與我的MacBook(小牛)完美配合的應用程序。OSX10.9應用程序崩潰:找不到符號:___strlcat_chk

與虛擬機(OSX獅子)努力後,它會崩潰與此回溯:


Mac-OS-X-Lion AppleFileServer[219]: _Assert: /SourceCache/afpserver/afpserver-585.2/afpserver/AFPRequest.cpp, 1502 (-5000) 
--- last message repeated 2 times --- 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: Traceback (most recent call last): 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: File "main.py", line 13, in <module> 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]:  import SafeDriveController 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: File "/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/SafeDriveController.py", line 17, in <module> 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]:  from safedrive.sftp import sftp_server 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: File "/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/safedrive/sftp/sftp_server.py", line 14, in <module> 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]:  from safedrive.sftp.gpg_crypter import GpgCrypter 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: File "/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/safedrive/sftp/gpg_crypter.py", line 3, in <module> 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]:  import gnupg 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: File "/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/gnupg/__init__.py", line 23, in <module> 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]:  from . import gnupg 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: File "/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/gnupg/gnupg.py", line 46, in <module> 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]:  from .   import _parsers 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: File "/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/gnupg/_parsers.py", line 34, in <module> 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]:  from .  import _util 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: File "/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/gnupg/_util.py", line 32, in <module> 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]:  import psutil 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: File "/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/psutil/__init__.py", line 148, in <module> 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]:  import psutil._psosx as _psplatform 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: File "/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/psutil/_psosx.py", line 17, in <module> 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]:  import _psutil_osx as cext 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: ImportError: dlopen(/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/_psutil_osx.so, 2): Symbol not found: ___strlcat_chk 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: Referenced from: /Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/_psutil_osx.so 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: Expected in: /usr/lib/libSystem.B.dylib 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: in /Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/_psutil_osx.so 
Mac-OS-X-Lion SafeDrive[304]: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '/Users/FrancoisB/EFounders/efounders.safedrive/SafeDrive/main.m:79 main() PyRun_SimpleFile failed with file '/Users/user/Public/Drop Box/SafeDrive.app/Contents/Resources/main.py'. See console for errors.' 
    *** First throw call stack: 
    ( 
     0 CoreFoundation      0x00007fff8ea72fc6 __exceptionPreprocess + 198 
     1 libobjc.A.dylib      0x00007fff91d28d5e objc_exception_throw + 43 
     2 CoreFoundation      0x00007fff8ea72dfa +[NSException raise:format:arguments:] + 106 
     3 CoreFoundation      0x00007fff8ea72d84 +[NSException raise:format:] + 116 
     4 SafeDrive       0x000000010000164e main + 1486 
     5 SafeDrive       0x0000000100001074 start + 52 
    ) 
Mac-OS-X-Lion [0x0-0x22022].Affinitic.SafeDrive[304]: terminate called throwing an exception 
Mac-OS-X-Lion ReportCrash[306]: Attempting to read data: Called memoryAtAddress: 0x1042b650d, which is in an unmappable portion of [0x0 -> 0xffffffffffffffff] in PID# 304. 

你有一個想法,以解決這個bug?

+0

以兩個下劃線開頭的名稱保留給編譯器。這個'strlcat'的特定變種可能已經在小牛引入,可能從未打算直接使用。 – zneak

+0

我和其他小牛隊有同樣的問題。 只有我的Mac(用於開發此應用程序)不會崩潰... – FBruynbroeck

回答

3

你的答案是正確的,在轉儲: _psutil_osx.so(從/用戶/用戶/公共/下拉框/ SafeDrive.app /內容/資源/)

缺少符號strlcat_chk它是試圖在運行時使用dlopen()從libSystem.B導入。 _Chk變體是strlcat(一個字符串連接函數)的更安全版本,它檢查其參數是否存在緩衝區溢出。使用特定版本的XCode構建的應用程序將默認使用此功能,而不是strlcat。它是小牛的LibC的一部分,我相信它是版本997.

如果您有該共享對象的來源,請將_chk更改爲非檢查符號版本(即strlcat),並且應該修復它。否則,您可以嘗試修補二進制文件的字符串表(假設它沒有違反代碼簽名,如果有的話)。您可以使用-mmin-osx-version 10.7(甚至10.6)重新編譯,這可能會解決問題。

相關問題