osx - Packaged python .app file crashing, but packaged python .sh file working fine -
i've produced app using python 3.4.3, pyqt4 , other extras (poppler being among them) on os x yosemite.
i'm using cx_freeze produce working .app file , eventually, working msi file. i've been testing app works after building using build command in "python3 setup.py build". works fine, no unexpected crashes. moved on packaging using "python3 setup.py bdist_dmg". opened dmg file/app file, crash instantly giving error:
process: main [1098] path: /users/user/*/fyp-0.1.app/contents/macos/main identifier: main version: 0 code type: x86-64 (native) parent process: ??? [1] responsible: main [1098] user id: 501 date/time: 2015-05-12 02:18:16.867 +0100 os version: mac os x 10.10.3 (14d131) report version: 11 anonymous uuid: 8a613a61-d35f-9a4c-8e97-57069a95bf20 time awake since boot: 1300 seconds crashed thread: 0 dispatch queue: com.apple.main-thread exception type: exc_bad_access (sigsegv) exception codes: kern_invalid_address @ 0x0000000000000000 vm regions near 0: --> __text 0000000103135000-0000000103138000 [ 12k] r- x/rwx sm=cow /users/user/*/fyp-0.1.app/contents/macos/main thread 0 crashed:: dispatch queue: com.apple.main-thread 0 qtgui 0x000000010ecf126b qapplication::setactivewindow(qwidget*) + 315 1 qtgui 0x000000010ec90b7d onapplicationwindowchangedactivation(qwidget*, bool) + 100 2 com.apple.corefoundation 0x00007fff8e99045c __cfnotificationcenter_is_calling_out_to_an_observer__ + 12 3 com.apple.corefoundation 0x00007fff8e880634 _cfxnotificationpost + 3140 4 com.apple.foundation 0x00007fff94cd29d1 -[nsnotificationcenter postnotificationname:object:userinfo:] + 66 5 com.apple.appkit 0x00007fff9048dbd9 -[nswindow becomekeywindow] + 1406 6 com.apple.appkit 0x00007fff9048cf3e -[nswindow _changekeyandmainlimitedok:] + 795 7 com.apple.appkit 0x00007fff9048cb36 -[nswindow _makekeyregardlessofvisibility] + 98 8 com.apple.appkit 0x00007fff9048ca9e -[nswindow makekeyandorderfront:] + 27 9 qtgui 0x00000001045cfea7 qwidgetprivate::show_sys() + 629 10 qtgui 0x000000010466c39c qwidgetprivate::show_helper() + 432 11 qtgui 0x000000010466ccce qwidget::setvisible(bool) + 800 12 pyqt4.qtgui.so 0x0000000103f40634 sipqmainwindow::setvisible(bool) + 100 13 pyqt4.qtgui.so 0x00000001040f7ed9 meth_qwidget_show(_object*, _object*) + 105 14 python 0x0000000103315ad5 pyeval_evalframeex + 22129 15 python 0x0000000103318f12 fast_function + 203 16 python 0x0000000103315964 pyeval_evalframeex + 21760 17 python 0x00000001033102ad pyeval_evalcodeex + 1622 18 python 0x000000010329e7ab function_call + 372 19 python 0x000000010327e576 pyobject_call + 103 20 python 0x000000010328fca8 method_call + 136 21 python 0x000000010327e576 pyobject_call + 103 22 python 0x00000001032c45b2 slot_tp_init + 57 23 python 0x00000001032c1b48 type_call + 172 24 python 0x000000010327e576 pyobject_call + 103 25 python 0x000000010331582a pyeval_evalframeex + 21446 26 python 0x00000001033102ad pyeval_evalcodeex + 1622 27 python 0x000000010330fc51 pyeval_evalcode + 63 28 python 0x000000010330d6e3 builtin_exec + 536 29 python 0x0000000103315ad5 pyeval_evalframeex + 22129 30 python 0x00000001033102ad pyeval_evalcodeex + 1622 31 python 0x000000010330fc51 pyeval_evalcode + 63 32 main 0x0000000103136cc5 main + 1957 33 libdyld.dylib 0x00007fff986995c9 start + 1 thread 1:: dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff91651232 kevent64 + 10 1 libdispatch.dylib 0x00007fff96fd0a6a _dispatch_mgr_thread + 52 thread 2: 0 libsystem_kernel.dylib 0x00007fff9165094a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff92c4e40d start_wqthread + 13 thread 3: 0 libsystem_kernel.dylib 0x00007fff9165094a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff92c4e40d start_wqthread + 13 thread 4: 0 libsystem_kernel.dylib 0x00007fff9165094a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff92c4e40d start_wqthread + 13 thread 5: 0 libsystem_kernel.dylib 0x00007fff9165094a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff92c4e40d start_wqthread + 13 thread 6: 0 libsystem_kernel.dylib 0x00007fff9165094a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff92c4e40d start_wqthread + 13 thread 0 crashed x86 thread state (64-bit): rax: 0x0000000000000000 rbx: 0x00007fbe8322a670 rcx: 0x00007fbe8326d0a0 rdx: 0x0000000000000002 rdi: 0x00007fbe8322a670 rsi: 0x0000000000000001 rbp: 0x00007fff5cac8ea0 rsp: 0x00007fff5cac8df0 r8: 0x0000000000000000 r9: 0x00007fbe830f90a0 r10: 0x0000000000000011 r11: 0x00007fff7bbdc190 r12: 0x00007fbe8322a670 r13: 0x00000000000f42cd r14: 0x00007fbe83296370 r15: 0x000000010f578228 rip: 0x000000010ecf126b rfl: 0x0000000000010202 cr2: 0x0000000000000000 logical cpu: 0 error code: 0x00000004 trap number: 14
there's load more i'm not sure how relevant. here setup.py file:
from cx_freeze import setup, executable import sys import os base = none if sys.platform == "win32": base = "win32gui" zips = ["implementation/primaries/gui/designer_files", "implementation/primaries/gui/themes", "implementation/primaries/gui/images", "implementation/primaries/scripts"] build_exe_options = {"packages": ["os"], "excludes": ["tkinter"], "include_files":zips} setup( name='fyp', version='0.1', packages=['implementation', 'implementation.primaries', 'implementation.primaries.gui', 'implementation.primaries.scripts', 'implementation.primaries.gui.pyqt_plugins', 'implementation.primaries.drawing', 'implementation.primaries.drawing.classes', 'implementation.primaries.drawing.classes.tree_cls', 'implementation.primaries.extractmetadata', 'implementation.primaries.extractmetadata.classes', 'implementation.primaries.importonlinedbs','implementation.primaries.importonlinedbs.classes'], description='muselib', options = {"build_exe": build_exe_options}, executables = [executable("implementation/main.py", base=base)] )
not sure problem is, saw few other people having similar problems seem on either older versions of python or older versions of os x, , fixes didn't solve problem. suggestions how proceed appreciated.
found better way debug this: right click on app file, "view package contents", macos > select executable same name file given in setup.py (for me main). error got: qwidget: must construct qapplication before qpaintdevice
i fixed initialising application object, initialising main window object, showing main window, , calling load method set window. doing part inside constructor reason giving problems. i'm having issues opening/closing windows , opening others on close, that's best question or session of googling.
Comments
Post a Comment