Sublime Forum

3099 hangs when unicode meets syntax coloring

#1

Unfortunately for me, 3099 becomes unresponsive when a string ending with “ı” introduced in a buffer. Interestingly, it only happens with some of the characters. I’ve double checked each and it definitely hangs with mı, lı, kı, ğı, rı but not with fı, gı, şı, dı etc…

It happens when syntax coloring is enabled. If disabled, st does not hang. If enabled, regardless of the chosen syntax scheme(lisp, js, python, etc), it hangs.

It only happens with python files. It happens when the file is longer than ~50-60 lines.

0 Likes

#2

Same for me. My ST crash when typing specific Unicode character, which trigger Auto-Completion pop-up.

0 Likes

#3

Can not reproduce (Win 7). Your OSes?

0 Likes

#4

Mint Rafaela here. As @Binocular222 stated, auto completion seems to suck up the cpu and sublime gets unresponsive.

This is a part of strace output.

recvmsg(3, 0x7fff26fc3380, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=11, events=POLLIN}, {fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=15, events=POLLIN}, {fd=86, events=POLLIN}, {fd=5, events=POLLIN}], 9, 25) = 0 (Timeout)
futex(0x7f95a8901000, FUTEX_WAKE, 1) = 1
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0

Sublime freezes at this point when a unicode string triggers the autocomplete and nothing is output any more.

0 Likes

#5

Can you please post a file that demonstrates the behavior, along with what to type and where to type it.

0 Likes

#6

Well, I managed to get a small demonstration of the problem.
This works everytime.

  • Open new python file
  • Put “”“dıgı”"" into file, in fact ?ı?ı pattern is important, any character instead of d and g also works
  • Proceed to next line
  • Start typing gı. This should match the end of the string above. For example, if the string above is “”“rımı”"", this should be mı
  • ST freezes

Found out that it’s not related to ı. It’s possible to get the same result with many other unicode characters. For example “”“bşmş”"" and mş also froze the sublime text.

In short: such unicode pattern in multiline strings causes the freeze while similar pattern is being typed, most probably when autocomplete + syntax highlighting enabled.

Edit: Turns out, multiline strings are also not required. The ?X?X pattern, where X is a special character works everytime.

Steps to reproduce:

  • open python file
  • put a string that matches the pattern above in the file. i.e: bşmş
  • put a space and type mş . The line looks like this: bşmş mş
  • ST freezes
0 Likes

#7

Thanks for the repro, this issue will be fixed in the next build

0 Likes

#8

I can’t reproduce this in 3100, so it looks like it’s fixed.

0 Likes

#9

Fixed, yeah. Thanks.

0 Likes