Completely hangs in ST2 on linux
ivan-krukov opened this issue · 7 comments
I am trying to open this file, which spikes CPU usage. I am not sure how to debug this issue or what to look for. Please advise. ST Build 2221, linux kernel 3.16.3-1.
input file, gist
Hi, Ivan!
Thanks for reporting this, I confirm that the issue reproduces on ST2 (however, ST3 is not affected). I'll try to investigate it this weekend.
Regards,
Eldar
I have been meaning to move to ST3 for a while, but inaccessible package sources hold me back a little. Thank you for looking into this.
It happens to me too, I've managed to narrow it down to the snippet C++/struct.sublime-snippet
It happens both when inserting the snippet in C Improved syntax and inserting it using another syntax and switching to C Improved
Thanks guys!
The problem was occurring in cases when both begin and end patterns of a rule match at once. In the example above it was hanging between ...)
and malloc(...
: function call was defined using zero-length lookarounds, causing (supposedly) ST2 to loop forever entering and immediately exiting the rule.
Please update to v1.3.2.
It does not fix it for me.
To reproduce
- open a new file
- set syntax to C Improved
- type
struct $
Damn! The root cause seems to be the same, though I don't know how to fix it yet...
I've fixed it to work with your particular example, but I'm still not sure if there are more cases like that. Please report if you encounter some, and thanks again.