pysys-test icon indicating copy to clipboard operation
pysys-test copied to clipboard

Manual Tk/Tcl UI tester does not work on macOS

Open ben-spiller opened this issue 5 years ago • 0 comments

Describe the bug The manual tester seems to hang the Python process with a warning: 2019-03-29 11:12:32.438 Python[2909:33227] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future.

then a hang in manualTester.stop.

To Reproduce Fibonacci_test_005 demonstrates this. In 1.4 we will skip this test until fixed.

Affected version(s)

  • Python version(s): 3.7 (probably all versions)
  • PySys version(s): 1.2, 1.3, 1.4 (probably earlier versions, possibly forever)
  • Operating System(s): macOS 12.3

Not sure if manual tester has ever worked on macOS?

Full output

2019-03-29 11:12:32.438 Python[2909:33227] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from ( 0 AppKit 0x00007fff5063ce63 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 378 1 AppKit 0x00007fff5063a253 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1479 2 AppKit 0x00007fff50639c86 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45 3 libtk8.6.dylib 0x0000000101a25a55 TkMacOSXMakeRealWindowExist + 729 4 libtk8.6.dylib 0x0000000101a2568a TkWmMapWindow + 56 5 libtk8.6.dylib 0x0000000101988788 Tk_MapWindow + 69 6 libtk8.6.dylib 0x0000000101991a15 MapFrame + 59 7 libtcl8.6.dylib 0x00000001018d5570 TclServiceIdle + 87 8 libtcl8.6.dylib 0x00000001018b8d27 Tcl_DoOneEvent + 349 9 _tkinter.cpython-37m-darwin.so 0x0000000100c1601d _tkinter_tkapp_mainloop + 269 10 Python 0x000000010081175e _PyMethodDef_RawFastCallKeywords + 430 11 Python 0x00000001008173c2 _PyMethodDescr_FastCallKeywords + 82 12 Python 0x00000001008cf83c call_function + 780 13 Python 0x00000001008cc7bc _PyEval_EvalFrameDefault + 25164 14 Python 0x00000001008d0336 _PyEval_EvalCodeWithName + 2422 15 Python 0x0000000100810c91 _PyFunction_FastCallKeywords + 257 16 Python 0x00000001008cf812 call_function + 738 17 Python 0x00000001008cc7d6 _PyEval_EvalFrameDefault + 25190 18 Python 0x0000000100811100 function_code_fastcall + 128 19 Python 0x00000001008106f4 _PyFunction_FastCallDict + 148 20 Python 0x0000000100811b3f _PyObject_Call_Prepend + 143 21 Python 0x0000000100810df7 PyObject_Call + 135 22 Python 0x0000000100957bd7 t_bootstrap + 71 23 Python 0x000000010090e819 pythread_wrapper + 25 24 libsystem_pthread.dylib 0x00007fff7f5982eb _pthread_body + 126 25 libsystem_pthread.dylib 0x00007fff7f59b249 _pthread_start + 66 26 libsystem_pthread.dylib 0x00007fff7f59740d thread_start + 13 ) Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/bin/pysys.py", line 84, in <module> runTest(sys.argv[2:]) File "/Library/Frameworks/Python.framework/Versions/3.7/bin/pysys.py", line 60, in runTest runner.start() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pysys/baserunner.py", line 261, in start self.containerCallback(_thread.get_ident(), container()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pysys/baserunner.py", line 538, in __call__ self.testObj.cleanup() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pysys/basetest.py", line 179, in cleanup self.stopManualTester() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pysys/basetest.py", line 282, in stopManualTester self.manualTester.stop() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pysys/manual/ui.py", line 184, in stop self.parentContainer.destroy() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 2061, in destroy for c in list(self.children.values()): c.destroy() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 2304, in destroy for c in list(self.children.values()): c.destroy() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 2304, in destroy for c in list(self.children.values()): c.destroy() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 2305, in destroy self.tk.call('destroy', self._w) RuntimeError: main thread is not in main loop

ben-spiller avatar Mar 29 '19 12:03 ben-spiller