SublimeText / ElasticTabstops

Tab characters automatically adjust to keep adjacent lines aligned.
https://github.com/SublimeText/ElasticTabstops
67 stars 6 forks source link

Plugin stops working after a while on ST3 #8

Closed galli-a closed 11 years ago

galli-a commented 11 years ago

After a while the plugin stops working. Sometimes quitting and restarting ST would restore functionality, but not always. I have not been able to reproduce the issue reliably. The last time it happened, I got this errors in the console:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 271, in on_modified
    callback.on_modified(v)
  File "elastic_tabstops in /Users/andrea/Library/Application Support/Sublime Text 3/Installed Packages/ElasticTabstops.sublime-package", line 186, in on_modified
  File "elastic_tabstops in /Users/andrea/Library/Application Support/Sublime Text 3/Installed Packages/ElasticTabstops.sublime-package", line 174, in fix_view
AttributeError: 'NoneType' object has no attribute 'id'
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 287, in on_selection_modified
    callback.on_selection_modified(v)
  File "elastic_tabstops in /Users/andrea/Library/Application Support/Sublime Text 3/Installed Packages/ElasticTabstops.sublime-package", line 213, in on_selection_modified
  File "elastic_tabstops in /Users/andrea/Library/Application Support/Sublime Text 3/Installed Packages/ElasticTabstops.sublime-package", line 174, in fix_view
AttributeError: 'NoneType' object has no attribute 'id'
adzenith commented 11 years ago

That message shouldn't break the plugin permanently... It should theoretically just not work the once. Have you still been seeing this problem?

galli-a commented 11 years ago

That message is repeated for every character I insert or delete in the document. The only sure way to make the plugin work again is to uninstall and then reinstall it.

adzenith commented 11 years ago

Well, that's exciting. Let me take another look.

adzenith commented 11 years ago

This can only happen in two cases:

  1. There is no active view.
  2. There is no view at all.

So, uh... I'm thinking it's a bug in Sublime. I'm going to try to work around it, I guess.

adzenith commented 11 years ago

I guess reopen if it's not fixed? Thanks!

galli-a commented 11 years ago

Maybe this trace will help?

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 543, in run_
    return self.run(edit, **args)
TypeError: run() got an unexpected keyword argument 'name'

Sorry if my previous messages were misleading. This is the error I see for each key press, not the other one.

adzenith commented 11 years ago

Huh... I'm not actually sure if that's from ElasticTabstops. Do your other plugins still work?

galli-a commented 11 years ago

I'm not really sure anymore, now that you say that. I'll try to uninstall all plugins and reinstall one at a time to see which one is the culprit then. I'll get back to you as soon as I find out

adzenith commented 11 years ago

Cool, thanks!

galli-a commented 11 years ago

I think I figured it out. The error I saw, and that prevented ElasticTabstops from working, only happens when there also is the SidebarEnhancements plugin installed. No other combination of plugins I tested gave rise to the same error. I'm not really sure what's happening, and if there any other test I can do to help.

adzenith commented 11 years ago

It appears we have conflicting copies of Edit.py.

adzenith commented 11 years ago

Should be fixed in ab114b978fcc236e0089af77cf1873c9ef177545.

adzenith commented 11 years ago

Thanks for hunting down that conflicting plugin, by the way!