DisposaBoy / GoSublime

A Golang plugin collection for SublimeText 3, providing code completion and other IDE-like features.
MIT License
3.42k stars 302 forks source link

SublimeText lock up when selecting text on OS X #26

Closed zeebo closed 12 years ago

zeebo commented 12 years ago

When selecting Go source code and dragging the mouse into the file list, SublimeText begins using 100% cpu and goes unresponsive, requiring a force quit as demonstrated here:

http://cl.ly/071F3m3c170n303d2L1f

I have narrowed it down to this package. When removing this package the problem goes away. I am using the latest developer build of SublimeText (2169) and the latest checkout of GoSublime.

Thoughts? I'll be happy to give you any more information I can.

zeebo commented 12 years ago

Specifically, I have narrowed it down to the GsLint on_selection_modified function.

zeebo commented 12 years ago

Upon further investigation, this could be a problem with ST.

Changing the on_selection_modified function to be:

def on_selection_modified(self, view):
    if gs.is_go_source_view(view):
        #set_timeout(describe_errors, 0)
        set_timeout(lambda: None, 0)

still causes the lock up for me.

I know next to nothing about developing plugins for ST, so is this is a bug with ST or GS?

tobi commented 12 years ago

confirmed, that happens to me as well. Also ST can't find a cross.png on load.

DisposaBoy commented 12 years ago

I don't have OS X and can't reproduce that one Linux. However I pushed a pending change before seeing the other comments here and I can't say if it's a ST issue but it's possible that GS could be triggering it if it was as on_selection_modified is triggered when the cursor moves.

the new change doesn't use on_selection_modified at all so hopefully that's why it hung.

zeebo commented 12 years ago

It appears to be fixed with the latest commit.

Thanks for fast response.

DisposaBoy commented 12 years ago

Great, thanks for the detailed report