Sublime Forum

BUG Cursor hangs / freezes

#1

Get this error with 2.0.1 on both Ubuntu 12.04 x86_64 and Arch Linux x86_64.

The cursor won’t update its position when typing or pressing arrow-keys. Clicking somewhere in the text with the mouse moves the cursor though, but that’s it.
This is something that occur pretty much at random times in my experience, I bypass it by restarting ST, but that’s pretty annoying after a while. I’m afraid I don’t know how to provide any valuable debug regarding this though.

Is there something I can try to do to track down the error, perhaps even fix it?

1 Like

#2

I think this might be related to a bug I keep seeing, where self.view.window() is None, this happens inconsistently (usually on tabs in the background or if im away from the machine, but I haven’t been able to isolate it) but causes several plugins to stop working and input to stop responding.

e: nvm mine is ST3 specific

0 Likes

#3

It happens with the latest 3.x version too

0 Likes

#4

I’ve lost the threat but this seems to be related to the selected font … this apparent bug is noticeable on Debian Wheezy as well.

0 Likes

#5

I see this too, with build 3059 on Ubuntu 14.04. It’s really annoying.

In addition to the cursor getting stuck, when it happens Ctrl-D stops working properly too.

0 Likes

#6

I’m also having this issue.

Cursor gets stuck, though characters typed still appear, key combos seem to be misbehaving (e.g. ctrl+shift+up/down, left/right, ctrl+shift+d)

Another key characteristic of this random bug is that selecting File > Exit in the menu has no effect whatsoever once this corrupted state is encountered.

I’ve noticed on Ubuntu 14.04 based Linux and Windows 10.
Sublime Text build 2221 and 3114 respectively.

Anyone have thought of a way to fix it? Or at least track down what causes it? It seems to happen so randomly, without anything in particular provoking it. And after it happened there is no other way than to pkill sublime_text.

0 Likes

#7

I’m running into this stuck cursor hassle too.

Sometimes you can’t do nothing but close down ST and hope all that was done is going to be saved.
Pressing INSERT on the keyboard makes the cursor look its normal width but this never fixes the problem. Either a significant ~ 1 min + delay or else close ST down.
Kinda reminds me of VSC when you do a lot of stuff in a short space of time . . .

0 Likes

#8

@tamj Which OS/version are you using? Which version of Sublime Text? How frequent is this issue? Have you tried reverting to a freshly installed state? Does pressing somewhere with the mouse (as stated in the OP) change the cursor position?

0 Likes

#9

Which OS/version are you using? Win 10 Home Ed on a Dell i5-7xxx laptop.
Which version of Sublime Text? v. 3.2.2. build 3211.
How frequent is this issue? Up to 1-2 times a week with daily editing of web app files on ST.
Have you tried reverting to a freshly installed state? Well, I recently (~ 4 weeks ago) made a fresh install to resolve another issue. Crazy to reinstall each and every time it happens.
Does pressing somewhere with the mouse (as stated in the OP) change the cursor position? Can’t recall. But whether it does or not there is no undoing the freeze other than a close-down of ST.
.
This problem often seems to occur when I’m deleting bits of code during an edit. Like doing a mouse select of part of a paragraph of code, then a delete (using <-- delete button on keyboard), the a new line with RETURN and then maybe a copy and paste from another file. It might often fail to do the paste. And then fail to do anything else till the whole ST program is closed and reopened.

0 Likes

#10

There’s no need to reinstall (in fact, a simple reinstall does not revert to a freshly installed state). You can simply rename your data directory to revert to a freshly installed state: https://www.sublimetext.com/docs/3/revert.html

Could you check next time it happens? It would also be useful to know whether the console still works and what inputs are seen. (Can be done using sublime.log_input(True) & sublime.log_commands(True)). Is it still possible to type while this is happening?

0 Likes

#11

This info is too terse and confusing.
I’m on Windows and my AppData folder has two sets of Sublime Text files.
One at AppData\Local\Sublime Text 3 which has 2 sub-folders:
\cache
\index.
A second folder lies at AppData\Roaming\Sublime Text 3 and has sub-folders:
\Installed Packages
\Lib
\Local
\Packages

I need clearer instructions on what to copy out from these AppData folders.

I didn’t try this.
Trying it now after opening the console didn’t produce any meaningful response - the command is just echoed on the console, with or without a semi-colon after it . . .

0 Likes

#12

This video covers how to revert Sublime in this manner, which may help. It also covers the two folders that appear on Windows as well.

0 Likes

#13

Did it a la your YT video, @OdatNurd.
But I doubt if this procedure is going to identify the cause of the bug since we have to quit ST before reversion - and quitting and reopening ST is always going to “fix” the problem.
Until the next time, that is.

0 Likes

#14

Today, I realized Sublime Text freezing for some seconds as well on my notebook @ work.

Sublime Text was freezing while my secondary harddisk was spinning up even though there were no files open in ST which are located on that drive.

It runs with Windows 7 x64 and ST 3211.

0 Likes

#15

Happened again yesterday.
What I “did” to cure it was just wait for about 1 minute or so.
Then it unfroze itself.
Maybe some process interrupting ST - could be a ST process or an OS process. Either way my mouse and keyboard were dead.

0 Likes

#16

Did the entire application freeze up (ie. not responding dialog on windows) or did it just stop responding to input? When you say the mouse and keyboard were dead, does that mean they didn’t work for the rest of the OS as well?

0 Likes

#17

I didn’t check these things, I’m afraid :flushed: . . .
I was only concerned with cursing the mouse and keyboard.
Then I stopped to try and think a while.
Then I saw some action on the screen that suggested things were coming back to normal again.
Then it was normal again.

I’ll observe better next time. :nerd_face:

0 Likes