Author Topic: typed characters are appearing out of order  (Read 1004 times)

Chris Nisbet

  • Community Member
  • Posts: 26
  • Hero Points: 2
typed characters are appearing out of order
« on: September 22, 2023, 10:04:08 PM »
I've started seeing a problem where characters I enter using the keyboard are getting entered out of order. I wouldn't swear to it, but I think it started happening after I upgraded to 27.0.2.0. What happens is that some characters show on the screen as expected, but then the screen will freeze for a short period of time and then the last few characters entered will turn up in the incorrect order.
e.g. this is the what turned up on the screen after entering the characters "turnkey".

turekny

The problem doesn't happen all the time - I can enter quite a few characters and not see the problem, but then I'll notice that some characters turn up in the incorrect order. For a while I thought it might be operator error, but it isn't. The out-of-order issue seems to coincide with this 'stickyness' I experience with the update of the edit buffer - the display will stop updating for a short time (< 1 second) and then the last few characters entered will/might show up in the incorrect order. If I type slowly, the problem doesn't occur, but what I will see is that even a single character will take some time to turn up in the buffer window.

In terms of buffers open, it doesn't seem to matter too much - I can reproduce the problem with just a single 500 line .c file open.


Anyway, I'm wondering if there are some settings I can adjust to reduce the likelihood of this happening? I'm guessing that maybe something like autocomplete or syntax highlighting might be involved somehow, but I don't know what the recommended/default settings might be.

Any assistance would be greatly appreciated.


Program Information:
SlickEdit Pro 2022 (v27.0.2.0 64-bit Qt4)

Serial number: VLX930448
Licensed number of users: Single user
License file: /home/chris/slickedit-pro2022/bin/slickedit.lic

Build Date: April 25, 2023   (State file: August 7, 2023)
Emulation: CUA

OS: Linux
OS Version: Ubuntu 23.04
Kernel Level: 6.2.0-33-generic
Build Version: #33-Ubuntu SMP PREEMPT_DYNAMIC Tue Sep 5 14:49:19 UTC 2023
Processor Architecture: x86_64

X Server Vendor: The X.Org Foundation
Window Manager: GNOME Shell
Display manager: /usr/sbin/gdm3

SlickEdit Pro 2022 (v27.0.2.0 64-bit Qt4)

Serial number: VLX930448
Licensed number of users: Single user
License file: /home/chris/slickedit-pro2022/bin/slickedit.lic

Build Date: April 25, 2023   (State file: August 7, 2023)
Emulation: CUA

OS: Linux
OS Version: Ubuntu 23.04
Kernel Level: 6.2.0-33-generic
Build Version: #33-Ubuntu SMP PREEMPT_DYNAMIC Tue Sep 5 14:49:19 UTC 2023
Processor Architecture: x86_64

X Server Vendor: The X.Org Foundation
Window Manager: GNOME Shell
Display manager: /usr/sbin/gdm3

Memory: 74% Load, 8502MB/11351MB Virtual
Shell Information: "/home/chris/slickedit-pro2022/bin/secsh" -i
Screen Size: 3840 x 2160

Project Type: Gnuc
Language: .c (C/C++)
Encoding: UTF-8, no signature

Installation Directory: /home/chris/slickedit-pro2022/
Configuration Directory: /home/chris/.slickedit/27.0.2/
Migrated from: /home/chris/.slickedit/26.0.3/
Spill File: /tmp/$slk.chris.1667411

Hotfixes:
/home/chris/.slickedit/27.0.2/hotfixes/hotfix_se2702_11_cumulative.zip Revision: 11   (currently loaded)
/home/chris/.slickedit/27.0.2/hotfixes/hotfix_se2702_5_cumulative.zip Revision: 5   (superseded)



Graeme

  • Senior Community Member
  • Posts: 2800
  • Hero Points: 347
Re: typed characters are appearing out of order
« Reply #1 on: September 23, 2023, 02:04:50 AM »
You could try a key logger e.g. logkeys, just in case it's the O.S.

There's a little bit of information here on performance issues
https://community.slickedit.com/index.php/topic,19160.msg76331.html#msg76331

Chris Nisbet

  • Community Member
  • Posts: 26
  • Hero Points: 2
Re: typed characters are appearing out of order
« Reply #2 on: September 23, 2023, 03:11:18 AM »
Thanks. I'll check out those SE options mentioned in that other thread.
SE is the only app affected, which makes me doubtful the the OS is the culprit. I'll investigate that as well though.

Chris Nisbet

  • Community Member
  • Posts: 26
  • Hero Points: 2
Re: typed characters are appearing out of order
« Reply #3 on: September 23, 2023, 03:35:52 AM »
Hmm, logkeys does at least confirm for me that the keys are being entered in the order I think they are, suggesting that it's SE that's getting something wrong.

Graeme

  • Senior Community Member
  • Posts: 2800
  • Hero Points: 347
Re: typed characters are appearing out of order
« Reply #4 on: September 23, 2023, 03:48:44 AM »
If it's not hard to repro, and it's associated with a screen freeze, you could try the slick C profiler and see what is happening when it freezes.

Chris Nisbet

  • Community Member
  • Posts: 26
  • Hero Points: 2
Re: typed characters are appearing out of order
« Reply #5 on: September 23, 2023, 04:27:11 AM »
It's very easy to repro - a few seconds typing two different characters is usually enough. Oddly, it often happens after the first few characters in a sequence.
The profile output doesn't mean much to me, but here is what I got (attached) after typing this...
apapapapapaappap

(I actually typed apapapap..., but note how things went wrong towards the end).

Note that this problem doesn't seem to happen if I close my usual workspace down and just enter characters into a single (empty) file.
The workspace itself if pretty simple - it contains three C projects.
I just went through the largest of them and pruned out as many files as I could get away with from it, and then re-tagged it. No difference - the problem still occurs.

Graeme

  • Senior Community Member
  • Posts: 2800
  • Hero Points: 347
Re: typed characters are appearing out of order
« Reply #6 on: September 23, 2023, 05:29:35 AM »
You could try turning off auto completion completely - search the options dialog for auto-complete and untick "enable auto-complete".  If the problem goes away, in options -> editing -> context tagging, you could try adjusting the auto complete settings.  If no success you could try turning off background tagging, don't think that will help though.  You could try turning off symbol coloring  -> language -> appearance - untick "symbol coloring" also probably won't help though.  Another thing to try - run slick with a new empty configuration folder (vs.exe -sc some-new-folder) and open your workspace and try.

Someone else reported typing lag here - but not keys out of order
https://community.slickedit.com/index.php/topic,18615.msg73631.html#msg73631


Chris Nisbet

  • Community Member
  • Posts: 26
  • Hero Points: 2
Re: typed characters are appearing out of order
« Reply #7 on: September 23, 2023, 06:19:40 AM »
Hmm, the problem seems to go away (both stickiness and out of order chars) when I turn autocomplete off. I haven't had any success with my initial settings adjustments though (lots of options, and lots of guesswork involved).
Interestingly, using a new configuration using the -sc option made no difference - problem still there.
« Last Edit: September 23, 2023, 06:26:34 AM by Chris Nisbet »

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: typed characters are appearing out of order
« Reply #8 on: September 25, 2023, 12:30:40 PM »
I haven't reproduced it yet, but it sounds like it could be tricky to reproduce.

One thing that might help is to see is if the problem can be reproduced with the Qt5 verion of 27.0.2.  If you want to try this, you can just install the Qt5 versions in a different directory and leave your current 27.0.2 untouched.

The installer is at: https://support.slickedit.com/outbound/2702/se_27000200_linux64qt5.tar.gz

If you hit the same problem with the Qt5 version, let us know - it will help narrow down the problem at least.

Chris Nisbet

  • Community Member
  • Posts: 26
  • Hero Points: 2
Re: typed characters are appearing out of order
« Reply #9 on: September 26, 2023, 05:57:39 PM »
Thanks, I'll give it a try when I get a chance. For now, what seems to have helped is to use a completely fresh config (with minimal customisation), and completely recreate my workspace. I haven't had much time to look at this in the last few days, but those changes seem to have made things a lot better. I still see a little bit of the 'stickyness', and I think I might have seen the out of order chars once or twice, but that really might have been due to operator error, so wouldn't swear to it.

Chris Nisbet

  • Community Member
  • Posts: 26
  • Hero Points: 2
Re: typed characters are appearing out of order
« Reply #10 on: September 28, 2023, 04:04:11 AM »
On the off chance that it's somehow relevant to the issue of characters appearing out of order in the edit buffer, I can also get characters appears out of order when I enter characters into the mini-search pop-up window (CTRL-F) when I have a large (~60MB) text file (not part of the project) loaded up. This occurs even with my new configuration and freshly created workspace. I find that I have to type _really_ slowly for the characters to appear as I type them into the search input box.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: typed characters are appearing out of order
« Reply #11 on: September 28, 2023, 11:44:04 AM »
That's good information, it rules out a lot of the completion and editing code.

I've got a file that's big enough with enough repeated terms I can search for where the typing delays are obvious, and I have not reproduced it so far.  But this is on Ubuntu 20 with a different window manager - I'll check with Ubuntu 23 image later this morning.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: typed characters are appearing out of order
« Reply #12 on: September 29, 2023, 12:18:01 PM »
Just updating to say I tried with Ubuntu 23.04 with the default GNOME setup, and could not reproduce it.   I experimented with changing the few GNOME settings having to do with keyboards and input.

I don't have anything for you to try when it happens right now.  I'm looking at some of the code, and an older case that seems like it could be related.   


Graeme

  • Senior Community Member
  • Posts: 2800
  • Hero Points: 347
Re: typed characters are appearing out of order
« Reply #13 on: September 29, 2023, 12:21:43 PM »
It might depend on the specs of the PC or the load on the PC.  Characters getting out of order seems pretty weird though.

Chris Nisbet

  • Community Member
  • Posts: 26
  • Hero Points: 2
Re: typed characters are appearing out of order
« Reply #14 on: September 30, 2023, 12:23:11 AM »
FYI: CPU is Intel i7 @3.4GHz. 16GB RAM
Not much going on on the machine CPU-wise. CPU load is pretty low until I start typing in the search box, then one core goes to 100% for a while, dropping back when I stop typing. I can enter something like 4 characters (in quick succession) that either match something in the open file or not, and ~50% of the time they'll turn up out of order in the search box (the first char is correct).