Author Topic: SE21 + 22 bug: Keyboard buttons remap themselves  (Read 740 times)

gstroz

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
SE21 + 22 bug: Keyboard buttons remap themselves
« on: October 19, 2017, 08:52:34 pm »
I'm encounter an odd bug in SE21 and it's occurring more frequently in 22. This is in Ubuntu 14.04, SE 64 bit version. After editing code for several minutes, the keyboard buttons will suddenly stop working with their normal mappings after every 8-10 presses and start becoming the up arrow.

In the below image, I started on line 20. I continually pressed 1234567890 in order on my keyboard and no other keys. The result is that after a few presses, two 'UP arrow' commands are executed INSTEAD of the pressed number.

I would expect the image to have 12345678901234567890123... all on one line. But that's not happening and I have no idea why.

They keyboard works perfectly fine in every other open program. I'm typing this post with slickedit open and exhibiting the bug. No issues typing here or anywhere else.

I tried using the 'what is key?' menu option when this behavior is happening. The result says "Up runs the command cursor-up" So somehow the key input is being completely remapped into the Up key.

Closing and reopening slick edit resolves the problem for a bit before it reoccurs again.

Any ideas? I think the only keybinding change I made was to change ctrl-backspace to delete previous word.

mwb1100

  • Senior Community Member
  • Posts: 145
  • Hero Points: 13
Re: SE21 + 22 bug: Keyboard buttons remap themselves
« Reply #1 on: October 19, 2017, 09:38:14 pm »
Weird problem.  There's a pattern that comes across in your example:

  - 2 & 3 appear to act as up-arrows twice, then
  - 3 & 4 act as up arrows twice, then
  - 4 & 5 act as up-arrows twice

Then the example stops - I wonder if next 5 & 6 would have been up-arrows after that point.  And if that pattern continued, what would have happened when 8 & 9 finished their turn?  Would it have gone to 9 & 0? Would it have gone to 9 & ':' (next in the ASCII table after '9')?  Would it have stopped happening? Something else?


gstroz

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: SE21 + 22 bug: Keyboard buttons remap themselves
« Reply #2 on: October 19, 2017, 10:38:25 pm »
There is a rough pattern to the number of keys pressed before UPs are encountered. But it doesn't seem to matter what the keys are. I just used the numbers as an easy counting sample.

Pattern doesn't seem to change over time.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 915
  • Hero Points: 61
Re: SE21 + 22 bug: Keyboard buttons remap themselves
« Reply #3 on: October 20, 2017, 01:20:44 pm »
I don't think we've encountered anything like this before. The key rebindings wouldn't change the key name reported by what-is, so I don't think it's anything to do with your key bindings.  'what-is' should report the event we're getting from Qt.  Just to be on the safe side, could you post your user.cfg.xml file from your configuration directory?  (By default, it would be under $HOME/.slickedit/22.0.0/user.cfg.xml, unless you're passing the "-sc" argument into the command line to change the configuration directory). 

So how do you start SlickEdit normally?  I want to verify you're starting it with the 'vs' command and not running 'vs_exe' directly.  If you're running it from a 'shortcut' or pinned item in Unity, perhaps the easiest thing would be to start SlickEdit up, and then from a terminal run 'ps -ef | grep vs' and then verify you have one line for the 'vs' script and one line for the 'vs_exe' executable.  So something like this:
Code: [Select]
patrick  32576 19264  0 Oct19 pts/1    00:00:00 sh /home/patrick/src/b22-trunk/slickedit/linux64/vs +new
patrick  32584 32576 99 Oct19 pts/1    17:50:26 /home/patrick/src/b22-trunk/slickedit/linux64/vs_exe +new

Finally, if it's fairly quick to reproduce, you could also rule out it being something in your SlickEdit configuration by running SlickEdit with a clean configuration like this and seeing if you can still make the problem happen: 
Code: [Select]
SE_INSTALL_DIR/vs +new -sc /tmp/no_such_dir

gstroz

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: SE21 + 22 bug: Keyboard buttons remap themselves
« Reply #4 on: October 20, 2017, 03:38:37 pm »
Agreed that this is an incredibly strange bug... that's why I wanted to post about it after seeing it still in v22 :)

Config is here:
https://www.dropbox.com/s/ufaqd3au0r9yfb5/user.cfg.xml?dl=1

I do start it from a shortcut in Gnome, but I definitely use the vs binary.

Code: [Select]
gstroz@7510-gstroz:~$ ps  -ef | grep vs
gstroz   17482  2305  0 Oct19 ?        00:00:00 sh /home/gstroz/slickedit-pro2017/bin/vs
gstroz   17489 17482  1 Oct19 ?        00:15:54 /home/gstroz/slickedit-pro2017/bin/vs_exe
gstroz   19403  7088  0 11:36 pts/21   00:00:00 grep --color=auto vs

I'll let you know if I see an issue with a fresh config.

gstroz

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: SE21 + 22 bug: Keyboard buttons remap themselves
« Reply #5 on: November 01, 2017, 10:34:44 pm »
It's been a little bit since I've encountered the issue again, but I'm pretty sure it has to relate to the Context Tagging auto completion feature. I had remade my workspace with significantly fewer files to tag and hadn't seen it reproduce in a while. Today, however, I noticed it twice. On the second time I had used the auto keyword for a variable in a C++ file. I was typing and wanted to auto complete a member name. I hit ctrl-space to trigger the auto completion and it began to take several seconds to try to find a match. I decided not to wait and hit escape to cancel the search. Immediately I had the issue again.

This makes sense, because my workspace had significantly more files to tag when I first encountered the issue a few weeks ago. I streamlined it to improve performance, and it reduced the occurrence of this issue until today when I finally encountered it again.

If there are suggestions on how to debug further I'd be happy to assist.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 915
  • Hero Points: 61
Re: SE21 + 22 bug: Keyboard buttons remap themselves
« Reply #6 on: November 02, 2017, 01:19:40 pm »
Interesting, let me see if I can get it to reproduce with big completion delays.  That would be ideal.  I don't think there's any logging or configuration tweaks we can make that will help narrow this down, so I may need to produce a debugging version for you to run to keep up with the key events at the different layers of the application. 

gstroz

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: SE21 + 22 bug: Keyboard buttons remap themselves
« Reply #7 on: May 16, 2018, 07:20:37 pm »
I wanted to resurrect this as I stumbled across something that might be related. Apparently there's an issue with the default version of IBus on Ubuntu 14.04 which could cause input problems.

https://stackoverflow.com/questions/33651898/resolving-ibus-issue-ibus-prior-to-1-5-11-may-cause-input-problems

I don't know if this is the underlying cause of the problems I'm seeing, but I've upgraded the ibus on my machine today and hopefully the issue goes away. Figured I would post in case someone else is unlucky enough to see this issue.