computer-vision icon indicating copy to clipboard operation
computer-vision copied to clipboard

threadBoth issue

Open incubo4u opened this issue 4 years ago • 1 comments

when trying to use the "threadBoth" program crash and get the following message :

2020-09-02 13:48:52.000 Python[82219:9661369] *** 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 0x00007fff2f7f3d07 __exceptionPreprocess + 250 1 libobjc.A.dylib 0x00007fff685175bf objc_exception_throw + 48 2 CoreFoundation 0x00007fff2f81c50c -[NSException raise] + 9 3 AppKit 0x00007fff2ca2324c -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 310 4 AppKit 0x00007fff2ca0acb2 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416 5 AppKit 0x00007fff2ca0a723 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42 6 AppKit 0x00007fff2cd435d8 -[NSWindow initWithContentRect:styleMask:backing:defer:screen:] + 52 7 libqcocoa.dylib 0x0000000111ff7195 qt_plugin_instance + 161509 8 libqcocoa.dylib 0x0000000111fe4aac qt_plugin_instance + 86012 9 libqcocoa.dylib 0x0000000111fde722 qt_plugin_instance + 60530 10 libqcocoa.dylib 0x0000000111fde1ab qt_plugin_instance + 59131 11 QtGui 0x000000010c1d922c _ZN14QWindowPrivate6createEby + 140 12 QtWidgets 0x000000010bc2e6d1 _ZN14QWidgetPrivate6createEv + 1201 13 QtWidgets 0x000000010bc2d3c2 _ZN7QWidget6createEybb + 322 14 QtWidgets 0x000000010bc40a7d _ZN14QWidgetPrivate10setVisibleEb + 189 15 cv2.cpython-38-darwin.so 0x0000000107186390 _ZN8CvWindowC2E7QStringi + 752 16 cv2.cpython-38-darwin.so 0x000000010717bc18 _ZN11GuiReceiver12createWindowE7QStringi + 296 17 cv2.cpython-38-darwin.so 0x000000010717ba1a cvNamedWindow + 570 18 cv2.cpython-38-darwin.so 0x000000010717e8d7 _ZN11GuiReceiver9showImageE7QStringPv + 471 19 cv2.cpython-38-darwin.so 0x000000010717e63c cvShowImage + 604 20 cv2.cpython-38-darwin.so 0x0000000107176266 _ZN2cv6imshowERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_11_InputArrayE + 358 21 cv2.cpython-38-darwin.so 0x0000000106053846 ZL18pyopencv_cv_imshowP7_objectS0_S0 + 470 22 Python 0x00000001058555e6 cfunction_call_varargs + 171 23 Python 0x00000001058550d5 _PyObject_MakeTpCall + 274 24 Python 0x00000001058f48b7 call_function + 804 25 Python 0x00000001058ee40d _PyEval_EvalFrameDefault + 13137 26 Python 0x000000010585591a function_code_fastcall + 106 27 Python 0x0000000105857a32 method_vectorcall + 256 28 Python 0x0000000105855361 PyVectorcall_Call + 108 29 Python 0x00000001058ee701 _PyEval_EvalFrameDefault + 13893 30 Python 0x000000010585591a function_code_fastcall + 106 31 Python 0x00000001058f46ed call_function + 346 32 Python 0x00000001058ee3ed _PyEval_EvalFrameDefault + 13105 33 Python 0x000000010585591a function_code_fastcall + 106 34 Python 0x00000001058f46ed call_function + 346 35 Python 0x00000001058ee3ed _PyEval_EvalFrameDefault + 13105 36 Python 0x000000010585591a function_code_fastcall + 106 37 Python 0x0000000105857a32 method_vectorcall + 256 38 Python 0x0000000105855361 PyVectorcall_Call + 108 39 Python 0x000000010596a8be t_bootstrap + 74 40 Python 0x000000010592c040 pythread_wrapper + 25 41 libsystem_pthread.dylib 0x00007fff698c3109 _pthread_start + 148 42 libsystem_pthread.dylib 0x00007fff698beb8b thread_start + 15 ) libc++abi.dylib: terminating with uncaught exception of type NSException zsh: abort python3 thread_demo.py --thread both

incubo4u avatar Sep 02 '20 11:09 incubo4u

I'm not familiar with this error. Based on a search and the stack trace, it seems like it's related to macOS and Qt, which I don't have experience with. Maybe one of these links is useful?

https://github.com/skvark/opencv-python/issues/115 https://stackoverflow.com/questions/40443825/opencv-crashes-when-reopening-camera-on-mac-osx-sierra-and-displaying

nrsyed avatar Sep 04 '20 16:09 nrsyed