我使用py2app
创建了一个.app
我的应用程序包,其中包含使用tkinter创建的GUI。一切都很好。
但是,在我使用这样的权利签署应用程序后
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>
每次打开它时,应用程序都会崩溃,并带有以下报告:
Application Specific Information:
dyld: in dlopen()
/Users/jerry/Desktop/Programming/py2app_test/Latin_Helper/Latin_Helper.app/Contents/Resources/lib/python2.7/lib-dynload/zlib.so
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 dyld 0x0000000104d665d0 memcmp + 208
1 dyld 0x0000000104d53fd1 ImageLoaderMachO::validateFirstPages(linkedit_data_command const*, int, unsigned char const*, unsigned long, long long, ImageLoader::LinkContext const&) + 115
2 dyld 0x0000000104d59ae0 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) + 272
3 dyld 0x0000000104d53062 ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 164
4 dyld 0x0000000104d43db5 dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 549
5 dyld 0x0000000104d4973e dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 817
6 dyld 0x0000000104d493f3 dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 170
7 dyld 0x0000000104d49163 dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 1493
8 dyld 0x0000000104d48954 dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 135
9 dyld 0x0000000104d438c1 dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 197
10 dyld 0x0000000104d4355f dyld::load(char const*, dyld::LoadContext const&, unsigned int&) + 186
11 dyld 0x0000000104d4d0a5 dlopen + 385
12 libdyld.dylib 0x00007fffd0a64a3e dlopen + 59
13 org.python.python 0x00000001041cd7e1 _PyImport_GetDynLoadFunc + 307
14 org.python.python 0x00000001041b894f _PyImport_LoadDynamicModule + 96
15 org.python.python 0x00000001041b8663 0x10411c000 + 640611
16 org.python.python 0x00000001041b822d 0x10411c000 + 639533
17 org.python.python 0x00000001041b6436 PyImport_ImportModuleLevel + 1135
18 org.python.python 0x000000010419b9b3 0x10411c000 + 522675
19 org.python.python 0x000000010412650a PyObject_Call + 99
20 org.python.python 0x000000010412669b 0x10411c000 + 42651
21 org.python.python 0x0000000104126630 PyObject_CallFunction + 187
22 org.python.python 0x00000001041b5ed6 PyImport_Import + 423
23 org.python.python 0x00000001041b44a3 PyImport_ImportModule + 31
24 org.python.python 0x00000001041e5410 0x10411c000 + 824336
25 org.python.python 0x00000001041e4e8d 0x10411c000 + 822925
26 org.python.python 0x00000001041e4544 0x10411c000 + 820548
27 org.python.python 0x000000010412650a PyObject_Call + 99
28 org.python.python 0x000000010412669b 0x10411c000 + 42651
29 org.python.python 0x0000000104126897 PyObject_CallMethod + 231
30 org.python.python 0x00000001041b8663 0x10411c000 + 640611
31 org.python.python 0x00000001041b822d 0x10411c000 + 639533
32 org.python.python 0x00000001041b6436 PyImport_ImportModuleLevel + 1135
33 org.python.python 0x000000010419b9b3 0x10411c000 + 522675
34 org.python.python 0x000000010412650a PyObject_Call + 99
35 org.python.python 0x00000001041a63df PyEval_CallObjectWithKeywords + 93
36 org.python.python 0x00000001041a2641 PyEval_EvalFrameEx + 8379
37 org.python.python 0x00000001041a0352 PyEval_EvalCodeEx + 1409
38 org.python.python 0x000000010419fdcb PyEval_EvalCode + 54
39 org.python.python 0x00000001041b4ee3 PyImport_ExecCodeModuleEx + 241
40 org.python.python 0x00000001041b7f77 0x10411c000 + 638839
41 org.python.python 0x00000001041b8663 0x10411c000 + 640611
42 org.python.python 0x00000001041b822d 0x10411c000 + 639533
43 org.python.python 0x00000001041b6436 PyImport_ImportModuleLevel + 1135
44 org.python.python 0x000000010419b9b3 0x10411c000 + 522675
45 org.python.python 0x000000010412650a PyObject_Call + 99
46 org.python.python 0x000000010412669b 0x10411c000 + 42651
47 org.python.python 0x0000000104126630 PyObject_CallFunction + 187
48 org.python.python 0x00000001041b5ed6 PyImport_Import + 423
49 org.python.python 0x00000001041b44a3 PyImport_ImportModule + 31
50 org.python.python 0x00000001041bf34a 0x10411c000 + 668490
51 org.python.python 0x00000001041bedf3 Py_InitializeEx + 785
52 space.pkqxdd.Latin_Helper 0x00000001027ce80f 0x1027cc000 + 10255
53 space.pkqxdd.Latin_Helper 0x00000001027cd3f8 main + 1486
54 libdyld.dylib 0x00007fffd0a67255 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fffd0b964e2 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fffd0c7e791 _pthread_wqthread + 1426
2 libsystem_pthread.dylib 0x00007fffd0c7e1ed start_wqthread + 13
Thread 2:
0 libsystem_kernel.dylib 0x00007fffd0b964e2 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fffd0c7e5fe _pthread_wqthread + 1023
2 libsystem_pthread.dylib 0x00007fffd0c7e1ed start_wqthread + 13
Thread 3:
0 libsystem_kernel.dylib 0x00007fffd0b964e2 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fffd0c7e791 _pthread_wqthread + 1426
2 libsystem_pthread.dylib 0x00007fffd0c7e1ed start_wqthread + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fffd0b964e2 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fffd0c7e791 _pthread_wqthread + 1426
2 libsystem_pthread.dylib 0x00007fffd0c7e1ed start_wqthread + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000104338000 rcx: 0x0000000000000000 rdx: 0x00000000000005e0
rdi: 0x0000000104338000 rsi: 0x00007fff5d427900 rbp: 0x00007fff5d427350 rsp: 0x00007fff5d427350
r8: 0x0000000000000005 r9: 0x0000000000001000 r10: 0x0000000000000001 r11: 0x0000000000000202
r12: 0x0000000000001000 r13: 0x0000000000000005 r14: 0x00000000000005e0 r15: 0x000061800013f400
rip: 0x0000000104d665d0 rfl: 0x0000000000010246 cr2: 0x0000000104338000
Logical CPU: 7
Error Code: 0x00000004
Trap Number: 14
Binary Images:
0x1027cc000 - 0x1027d1fff +space.pkqxdd.Latin_Helper (0.0.2 - 0.0.2) <56AB3C6B-901F-3E47-B820-E34D931F19AE> /Users/USER/Desktop/*/Latin_Helper.app/Contents/MacOS/start
0x10411c000 - 0x10420efff +org.python.python (2.7.10 - 2.7.10) <E4356925-959C-36B1-9991-1D925E7B6C94> /Users/USER/Desktop/*/Latin_Helper.app/Contents/Frameworks/Python.framework/Versions/2.7/Python
0x104d40000 - 0x104d7d267 dyld (421.2) <947FC440-80F9-32F7-A773-6FC418FE1AB7> /usr/lib/dyld
0x7fffbb488000 - 0x7fffbb922fff com.apple.CoreFoundation (6.9 - 1348.28) <A40AA224-7A50-3989-95D0-5A228A0E2FAF> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fffcf285000 - 0x7fffcf286ff3 libDiagnosticMessagesClient.dylib (102) <422911A4-E273-3E88-BFC4-DF6470E48242> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fffcf4c4000 - 0x7fffcf4c5ff3 libSystem.B.dylib (1238) <9CB018AF-54E9-300F-82BE-81FE553C9154> /usr/lib/libSystem.B.dylib
0x7fffcf5dd000 - 0x7fffcf5ddff3 libauto.dylib (187) <5BBF6A00-CC76-389D-84E7-CA88EDADE683> /usr/lib/libauto.dylib
0x7fffcf5fe000 - 0x7fffcf654ff7 libc++.1.dylib (307.4) <BEE86868-F831-384C-919E-2B286ACFE87C> /usr/lib/libc++.1.dylib
0x7fffcf655000 - 0x7fffcf67ffff libc++abi.dylib (307.2) <1CEF8ABB-7E6D-3C2F-8E0A-E7884478DD23> /usr/lib/libc++abi.dylib
0x7fffcfbbd000 - 0x7fffcfde2ffb libicucore.A.dylib (57149.0.1) <6B5FDA93-AA88-318F-9608-C2A33D602EC7> /usr/lib/libicucore.A.dylib
0x7fffd016f000 - 0x7fffd053fd97 libobjc.A.dylib (706) <F9AFE665-A3A2-3285-9495-19803A565861> /usr/lib/libobjc.A.dylib
0x7fffd0969000 - 0x7fffd097aff3 libz.1.dylib (67) <46E3FFA2-4328-327A-8D34-A03E20BFFB8E> /usr/lib/libz.1.dylib
0x7fffd0989000 - 0x7fffd098dff7 libcache.dylib (79) <0C8092D3-600F-3ADD-A036-F225B6CDCA43> /usr/lib/system/libcache.dylib
0x7fffd098e000 - 0x7fffd0999ff7 libcommonCrypto.dylib (60092.30.2) <B16E29B6-EC8D-3A8F-9A89-DD9CF35F7C4B> /usr/lib/system/libcommonCrypto.dylib
0x7fffd099a000 - 0x7fffd09a1fff libcompiler_rt.dylib (62) <E992E8D9-037C-3454-A366-A25E4D31D6BB> /usr/lib/system/libcompiler_rt.dylib
0x7fffd09a2000 - 0x7fffd09aafff libcopyfile.dylib (138) <64E285D9-5485-333B-AEE7-8B0C8FB9275F> /usr/lib/system/libcopyfile.dylib
0x7fffd09ab000 - 0x7fffd0a2efdf libcorecrypto.dylib (442.30.20) <2074B932-FD79-30A9-8E90-AF25C49F2AF1> /usr/lib/system/libcorecrypto.dylib
0x7fffd0a2f000 - 0x7fffd0a61fff libdispatch.dylib (703.30.5) <EA0CC14E-D559-3802-B4B2-0E8C7579AAC4> /usr/lib/system/libdispatch.dylib
0x7fffd0a62000 - 0x7fffd0a67ff3 libdyld.dylib (421.2) <6F506653-FFF6-3DB8-84F1-109AE3C52F32> /usr/lib/system/libdyld.dylib
0x7fffd0a68000 - 0x7fffd0a68ffb libkeymgr.dylib (28) <1A318923-1200-3B06-B432-5007D82F195D> /usr/lib/system/libkeymgr.dylib
0x7fffd0a76000 - 0x7fffd0a76fff liblaunch.dylib (972.30.7) <15FACC21-079A-3BDF-9AFB-4253EFDEB587> /usr/lib/system/liblaunch.dylib
0x7fffd0a77000 - 0x7fffd0a7cfff libmacho.dylib (894) <A2F38EC1-C37C-3B93-B0E4-36B07C177F8C> /usr/lib/system/libmacho.dylib
0x7fffd0a7d000 - 0x7fffd0a7fff3 libquarantine.dylib (85) <C1D7749F-5F5F-3BB9-BEFC-1F0B9DA941FD> /usr/lib/system/libquarantine.dylib
0x7fffd0a80000 - 0x7fffd0a81ffb libremovefile.dylib (45) <CD42974E-BE0B-39FC-9BFC-8A7540A04DC6> /usr/lib/system/libremovefile.dylib
0x7fffd0a82000 - 0x7fffd0a9aff7 libsystem_asl.dylib (349.30.2) <EFAC72D7-CB13-3DF7-ADF3-EC6635C6F1EA> /usr/lib/system/libsystem_asl.dylib
0x7fffd0a9b000 - 0x7fffd0a9bff7 libsystem_blocks.dylib (67) <B8C3701D-5A91-3D35-999D-2DC8D5393525> /usr/lib/system/libsystem_blocks.dylib
0x7fffd0a9c000 - 0x7fffd0b29fef libsystem_c.dylib (1158.30.7) <2F881962-03CB-3B9D-A782-D98C1BBA4E3D> /usr/lib/system/libsystem_c.dylib
0x7fffd0b2a000 - 0x7fffd0b2dffb libsystem_configuration.dylib (888.30.2) <4FE3983C-E4ED-3939-A578-03AD29C99788> /usr/lib/system/libsystem_configuration.dylib
0x7fffd0b2e000 - 0x7fffd0b31fff libsystem_coreservices.dylib (41.4) <1A572B9E-0C47-320F-8C64-7990D0A5FB5A> /usr/lib/system/libsystem_coreservices.dylib
0x7fffd0b32000 - 0x7fffd0b4aff3 libsystem_coretls.dylib (121.31.1) <4676F06D-274D-31BE-B61C-4D7A4AEF4858> /usr/lib/system/libsystem_coretls.dylib
0x7fffd0b4b000 - 0x7fffd0b51fff libsystem_dnssd.dylib (765.30.11) <DC708D84-ED7D-3936-B996-A67C66B8DDAA> /usr/lib/system/libsystem_dnssd.dylib
0x7fffd0b52000 - 0x7fffd0b7bff7 libsystem_info.dylib (503.30.1) <9ED9121C-F111-3FAD-BC2F-C95DEE1C9362> /usr/lib/system/libsystem_info.dylib
0x7fffd0b7c000 - 0x7fffd0b9eff7 libsystem_kernel.dylib (3789.41.3) <B75B128C-7D7A-3318-91CD-82B5A69C5329> /usr/lib/system/libsystem_kernel.dylib
0x7fffd0b9f000 - 0x7fffd0be6fe7 libsystem_m.dylib (3121.4) <266DB92B-A86F-3691-80FB-1B26AD73CFF3> /usr/lib/system/libsystem_m.dylib
0x7fffd0be7000 - 0x7fffd0c05ff7 libsystem_malloc.dylib (116.30.3) <F40DEE3B-386A-3529-A3F7-98117ED55BF4> /usr/lib/system/libsystem_malloc.dylib
0x7fffd0c06000 - 0x7fffd0c5dffb libsystem_network.dylib (856.30.16) <4AE368E9-605D-379D-B04C-2AC7455B8250> /usr/lib/system/libsystem_network.dylib
0x7fffd0c5e000 - 0x7fffd0c67ff3 libsystem_networkextension.dylib (563.30.15) <EB020B0C-7DF0-3EEF-8E3C-15DA3C01D687> /usr/lib/system/libsystem_networkextension.dylib
0x7fffd0c68000 - 0x7fffd0c71ff3 libsystem_notify.dylib (165.20.1) <E7FD3A7C-DD07-36E2-9FA4-7561F9F114DA> /usr/lib/system/libsystem_notify.dylib
0x7fffd0c72000 - 0x7fffd0c7afe7 libsystem_platform.dylib (126.1.2) <3CA06D4E-C00A-36DE-AA65-3A390097D1F6> /usr/lib/system/libsystem_platform.dylib
0x7fffd0c7b000 - 0x7fffd0c85ff7 libsystem_pthread.dylib (218.30.1) <C869ED7C-BE29-3532-8E69-3A8DA1447EDC> /usr/lib/system/libsystem_pthread.dylib
0x7fffd0c86000 - 0x7fffd0c89ff7 libsystem_sandbox.dylib (592.31.1) <7BBFDF96-293F-3DD9-B3A4-7C168280B441> /usr/lib/system/libsystem_sandbox.dylib
0x7fffd0c8a000 - 0x7fffd0c8bfff libsystem_secinit.dylib (24) <5C1F1E47-0F7D-3E25-8DEB-D9DB1F902281> /usr/lib/system/libsystem_secinit.dylib
0x7fffd0c8c000 - 0x7fffd0c93fff libsystem_symptoms.dylib (532.30.6) <5D990CF5-B58F-39F7-B375-99B4EC62CFBD> /usr/lib/system/libsystem_symptoms.dylib
0x7fffd0c94000 - 0x7fffd0cb4ff7 libsystem_trace.dylib (518.30.7) <6D34D1EA-2A3C-3D2D-803E-A666E6AEEE52> /usr/lib/system/libsystem_trace.dylib
0x7fffd0cb5000 - 0x7fffd0cbaffb libunwind.dylib (35.3) <9F7C2AD8-A9A7-3DE4-828D-B0F0F166AAA0> /usr/lib/system/libunwind.dylib
0x7fffd0cbb000 - 0x7fffd0ce4ff7 libxpc.dylib (972.30.7) <65E41BB6-EBD5-3D93-B0BE-B190CEE4DD93> /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: 18280
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=127.3M resident=0K(0%) swapped_out_or_unallocated=127.3M(100%)
Writable regions: Total=75.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=75.5M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 2
Kernel Alloc Once 8K 2
MALLOC 65.0M 17
MALLOC guard page 16K 4
STACK GUARD 56.0M 6
Stack 10.0M 6
VM_ALLOCATE 4K 2
__DATA 3200K 49
__LINKEDIT 111.6M 5
__TEXT 15.7M 47
__UNICODE 556K 2
mapped file 24.7M 3
shared memory 44K 5
=========== ======= =======
TOTAL 287.1M 137
我替换了代码签名而没有权利,然后应用程序可以正常工作。我尝试用pyinstaller
构建应用程序并遇到同样的问题。我还在github上发布了我的源代码,以防它有用。
我猜苹果沙箱存在一些问题。任何人都可以帮我吗?