plover
plover copied to clipboard
Plover hangs on MacOS
Describe the bug
I have started using Plover to try out Steno. Using Uni keyboard after some hours, randomly, the keyboard stops working.
To Reproduce
Use Plover, until keyboard stops working. Then try to go to Setting and QT hangs completely. Force quite and there is a "zombie" process (Python3.8)
it can't be killed.
Try rerunning the App and it also hangs.
Tried calling:
/Applications/Plover.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python -m plover.scripts.main
2021-07-25 18:57:57,578 [MainThread] ERROR: connection to existing instance failed, force cleaning before restart
The window did appear but again not responding to reconnect.
After Force Quit the Terminal hangs too and I have another (Python3.8)
process. I need to restart the machine to get it back to work.
I did try sudo kill -9 <PID>
and nothing happens.
ioreg -p IOUSB -w0 -l
does show the keyboard.
I tried to find some other process that I could kill to unblock this, but nothing seemed obvious. Seems to me that there is some OS level resource that his holding the processes.
Log does show:
2021-07-25 17:56:46,540 [Dummy-1] INFO: loaded 3 dictionaries in 0.000s
2021-07-25 17:56:49,789 [Dummy-1] INFO: setting machine: Gemini PR
2021-07-25 17:56:49,790 [Dummy-1] WARNING: Can't open serial port
Traceback (most recent call last):
File "/Users/runner/work/plover/plover/build/osxapp/Plover.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.8/site-packages/serial/serialposix.py", line 322, in open
FileNotFoundError: [Errno 2] No such file or directory: '/dev/cu.usbmodem14103'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/runner/work/plover/plover/build/osxapp/Plover.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.8/site-packages/plover/machine/base.py", line 215, in start_capture
File "/Users/runner/work/plover/plover/build/osxapp/Plover.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.8/site-packages/serial/serialutil.py", line 244, in __init__
File "/Users/runner/work/plover/plover/build/osxapp/Plover.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.8/site-packages/serial/serialposix.py", line 325, in open
serial.serialutil.SerialException: [Errno 2] could not open port /dev/cu.usbmodem14103: [Errno 2] No such file or directory: '/dev/cu.usbmodem14103'
2021-07-25 17:56:49,791 [Dummy-1] INFO: loaded 3 dictionaries in 0.000s
2021-07-25 17:57:00,545 [Dummy-1] INFO: setting machine: Gemini PR
2021-07-25 17:57:00,548 [Dummy-1] INFO: loaded 3 dictionaries in 0.000s
2021-07-25 17:57:03,246 [Dummy-1] INFO: loaded 3 dictionaries in 0.000s
2021-07-25 17:57:07,104 [Dummy-1] INFO: loaded 3 dictionaries in 0.000s
But I'm not sure this was the last time it worked.
Expected behavior
Quitting or Force Quitting app allows me to restart Plover.
Screenshots
If applicable, add screenshots to help explain your problem.
Operating system
- OS: Catalina 10.15.7
- Plover Version v4.0.0.dev10
Hardware
The Uni keyboard.
I did a small test and tried to log-out then login again, and my Mac login got stuck. Had to force restart the machine. So definitely something went haywire.
So what's the "machine" being used?
Never mind, Gemini PR? Does the keyboard still work in standard mode? If you can reproduce the issue reliably, you may try to start from a terminal with debug traces: /Applications/Plover.app/Contents/MacOS/Plover -l debug
.
Also, list of plugins?
Sorry for the Machine, did not really get the question :) Not using any plugins.
After it hanged I tried with debug but did not get very far since the App did not start. I could try running Plover next time in Debug from the get go. Is there a way to change the log level on the App?
I notice this hangup several times. It just seems to happen, never quickly at least a couple of hours with plover on and the keyboard connected. Without much to go on, I feel it some error that happens inside a OS level handler that becomes non responsive. The funny thing is that when I rebooted after the failed logoff/logon, I allowed apps to start. Plover was not started automatically. So I assume whatever happened before the reboot block progress on the re-logon.
Sorry for the Machine, did not really get the question :)
What protocol is being used, the machine type in Plover.
After it hanged I tried with debug but did not get very far since the App did not start. I could try running Plover next time in Debug from the get go.
Yes, that's what I mean, start from a terminal, and see if we get more info when you reproduce the problem.
Is there a way to change the log level on the App?
Start it from a terminal.
I've been running in debug mode, but not for as long. I will keep trying an see if something shows up. Unfortunately I am still just learning and work does not allow me to put as much time on testing.
After a really long time working fine, it finally happened again. The Console launch app is no longer working. Not I disconnecting and moving the device to a new port and I noticed that IOREG is showing 2 devices even if no device is connected:
$ ioreg -p IOUSB
...
+-o AppleUSBXHCI Root Hub Simulation@14000000 <class AppleUSBRootHubDevice, id 0x10000122a, registered, matched, active, busy 0 (0 ms), retain 10>
+-o The Uni@14100000 <class AppleUSBDevice, id 0x10001719f, registered, matched, active, busy 0 (70 ms), retain 18>
+-o The Uni@14200000 <class AppleUSBDevice, id 0x100017556, registered, matched, active, busy 0 (72 ms), retain 22>
I now think that the USB hub got stuck with the device virtually present but not responding. The app is blocked. Not sure this is a plover issue anymore. Could be a bug on my USB Hub, or on the Uni.
Any suggestions on things to investigate?