swook / GazeML

Gaze Estimation using Deep Learning, a Tensorflow-based framework.
MIT License
516 stars 141 forks source link

MacOSx error while running elg_demo.py #43

Open BhuvaneshwariBhaskaran opened 5 years ago

BhuvaneshwariBhaskaran commented 5 years ago

Followed the steps

Terminating app due to uncaught exception 'NSInternalInconsistencyException'

stack trace:

Parsing Inputs... 22/08 19:53 INFO ------------------------------ 22/08 19:53 INFO Approximate Model Statistics 22/08 19:53 INFO ------------------------------ 22/08 19:53 INFO FLOPS per input: 205,323,382.0 22/08 19:53 INFO Trainable Parameters: 150,813 22/08 19:53 INFO ------------------------------ 2019-08-22 19:53:18.974 Python[734:11771] Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!' First throw call stack: ( 0 CoreFoundation 0x00007fff318442fd exceptionPreprocess + 256 1 libobjc.A.dylib 0x00007fff5bf15a17 objc_exception_throw + 48 2 CoreFoundation 0x00007fff3185de59 -[NSException raise] + 9 3 AppKit 0x00007fff2ee045ca -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 317 4 AppKit 0x00007fff2ee019f7 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1479 5 AppKit 0x00007fff2eec0d95 -[NSPanel _initContent:styleMask:backing:defer:contentView:] + 50 6 AppKit 0x00007fff2ee0142a -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45 7 AppKit 0x00007fff2eec0d4a -[NSPanel initWithContentRect:styleMask:backing:defer:] + 64 8 QtGui 0x0000000108524028 -[QCocoaPanel initWithContentRect:styleMask:backing:defer:] + 74 9 QtGui 0x000000010852abbf -[NSWindow(QWidgetIntegration) qt_initWithQWidget:contentRect:styleMask:] + 81 10 QtGui 0x000000010851be1c _ZL20qt_mac_create_windowP7QWidgetjmRK5QRect + 427 11 QtGui 0x000000010851baa1 _ZN14QWidgetPrivate18qt_create_root_winEv + 65 12 QtGui 0x000000010851d8d3 _ZN14QWidgetPrivate10create_sysElbb + 1079 13 QtGui 0x00000001085b3d25 _ZN7QWidget6createElbb + 587 14 QtGui 0x00000001085b29f6 _ZN14QWidgetPrivate4initEP7QWidget6QFlagsIN2Qt10WindowTypeEE + 362 15 QtGui 0x00000001085b27e0 _ZN7QWidgetC2EPS_6QFlagsIN2Qt10WindowTypeEE + 122 16 QtGui 0x0000000108535cca _ZN14QDesktopWidgetC2Ev + 32 17 QtGui 0x0000000108579183 _ZN12QApplication7desktopEv + 53 18 QtGui 0x0000000108531a05 _Z9flipPointRK7CGPoint + 32 19 QtGui 0x0000000108511961 _ZN7QCursor3posEv + 47 20 QtGui 0x00000001085890c5 _ZN11QMouseEventC2EN6QEvent4TypeERK6QPointN2Qt11MouseButtonE6QFlagsIS6_ES7_INS5_16KeyboardModifierEE + 79 21 QtGui 0x0000000108a9e426 _ZN20QGraphicsViewPrivateC2Ev + 340 22 QtGui 0x0000000108aa19d5 _ZN13QGraphicsViewC2EP7QWidget + 37 23 cv2.cpython-37m-darwin.so 0x000000010343178f _ZN15DefaultViewPortC2EP8CvWindowi + 31 24 cv2.cpython-37m-darwin.so 0x000000010342c99d _ZN8CvWindowC2E7QStringi + 397 25 cv2.cpython-37m-darwin.so 0x00000001034242c3 _ZN11GuiReceiver12createWindowE7QStringi + 227 26 cv2.cpython-37m-darwin.so 0x0000000103424109 cvNamedWindow + 553 27 cv2.cpython-37m-darwin.so 0x00000001034268cf _ZN11GuiReceiver9showImageE7QStringPv + 159 28 cv2.cpython-37m-darwin.so 0x0000000103426769 cvShowImage + 585 29 cv2.cpython-37m-darwin.so 0x000000010341ecca _ZN2cv6imshowERKNSt3112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_11_InputArrayE + 474 30 cv2.cpython-37m-darwin.so 0x0000000102824822 _ZL18pyopencv_cv_imshowP7_objectS0S0 + 434 31 Python 0x0000000101969560 _PyMethodDef_RawFastCallKeywords + 544 32 Python 0x0000000101968ab2 _PyCFunction_FastCallKeywords + 44 33 Python 0x00000001019fde82 call_function + 636 34 Python 0x00000001019f6c70 _PyEval_EvalFrameDefault + 6421 35 Python 0x00000001019fe7a6 _PyEval_EvalCodeWithName + 1870 36 Python 0x00000001019686e5 _PyFunction_FastCallDict + 441 37 Python 0x00000001019f6f43 _PyEval_EvalFrameDefault + 7144 38 Python 0x0000000101968e8c function_code_fastcall + 112 39 Python 0x00000001019fdef7 call_function + 753 40 Python 0x00000001019f6c57 _PyEval_EvalFrameDefault + 6396 41 Python 0x0000000101968e8c function_code_fastcall + 112 42 Python 0x00000001019fdef7 call_function + 753 43 Python 0x00000001019f6c57 _PyEval_EvalFrameDefault + 6396 44 Python 0x0000000101968e8c function_code_fastcall + 112 45 Python 0x0000000101969829 _PyObject_Call_Prepend + 150 46 Python 0x0000000101968bbf PyObject_Call + 136 47 Python 0x0000000101a65261 t_bootstrap + 71 48 Python 0x0000000101a2be95 pythread_wrapper + 25 49 libsystem_pthread.dylib 0x00007fff5d8d72eb _pthread_body + 126 50 libsystem_pthread.dylib 0x00007fff5d8da249 _pthread_start + 66 51 libsystem_pthread.dylib 0x00007fff5d8d640d thread_start + 13 )

zhutq commented 5 years ago

This is because in elg_demo.py, cv.imshow is called on a background thread. I don't know how to fix it, but my work-around is commenting out cv.imshow and use the record_video option to output a video and check the result.

rychoo2 commented 4 years ago

related issue with a working version of elg_demo: #17

Hyrtsi commented 2 years ago

@BhuvaneshwariBhaskaran which python version are you using? What is your output for pip freeze?