keyszer icon indicating copy to clipboard operation
keyszer copied to clipboard

How to assist users to locate weird key bugs?

Open joshgoebel opened this issue 1 year ago • 5 comments

Most issues so far have been very reproducible - ie, non-random.... so if one pays attention carefully you can find the pattern... and then write down a sequence of 3-4 steps to "make it break"... at that point it's usually pretty easy to track down the bug and fix it...

I'm also be open to suggestions to improve logging to make these things easier for users to track down... perhaps we always keep the past 2 minutes of logs and when something bad happens one can "dump" them with a keystroke? @RedBearAK Any ideas here?

Originally posted by @joshgoebel in https://github.com/joshgoebel/keyszer/issues/81#issuecomment-1230175570

joshgoebel avatar Aug 29 '22 11:08 joshgoebel

@rbreaves Could also use your thoughts here perhaps...

joshgoebel avatar Aug 29 '22 11:08 joshgoebel

Pasting reply from issue #81 thread:

That's not a bad idea, although when weird things are happening that could include quite a lot of events. Might make more sense to buffer the most recent NNN number of lines of log output or something like that.

I really think this user's issue has something to do with the repeating key problem they were having originally. Or as they described it, xkeysnail/keyszer being "too slow" on their relatively high-end PC, which is of course patently ridiculous, since these apps work perfectly on a 2GB Raspberry Pi. It seemed much more like they had keys repeating because something was happening much too fast, like the keyboard delay somehow being set to 0ms.

This user has also mentioned Wayland, and Wayland still has all sorts of weird bugs. I have to wonder if that has something to do with what they keep experiencing.

I can still trigger a terminal repeating loop myself with Ctrl+C that forces me to close the terminal tab, so it's not like it's impossible for something to be getting stuck. But I don't have a good technique for troubleshooting it at the moment.

RedBearAK avatar Aug 29 '22 12:08 RedBearAK

Might make more sense t

Well the amount could even be configurable... it's about having "enough" and what "enough" consistitues... I'm not even 100% sure if the log output now is enough to diagnose SOME problems without also knowing what the user was doing - since it doesn't print context (or state) on every single key (for example)...

I'm just trying to think of an easier way than our current "find a way to reproduce it" strategy... just asking users for a bug report (description of problems) with the "last 2 min" attached would be much nicer experience for end users. :)

joshgoebel avatar Aug 29 '22 12:08 joshgoebel

Some type of JSON output and a debug utility that allowed you to step thru time viewing the system state at every step would be pretty nice. :-)

joshgoebel avatar Aug 29 '22 12:08 joshgoebel

Yea, I do like the idea of having an option to log like the last 1-2 minutes in a buffer, and track the name of the application they are in. I would want to make sure we avoid single character strings though - I do not want any confidential info - only hotkey presses I think.

rbreaves avatar Sep 03 '22 06:09 rbreaves