jarhart / SublimeSBT

SBT build tool integration for Sublime Text 2 and Sublime Text 3.
MIT License
98 stars 10 forks source link

Crash from SublimeSBT when used with Scala Worksheet #14

Closed inkytonik closed 11 years ago

inkytonik commented 11 years ago

I am the author of the Scala Worksheet plugin for Sublime Text 3 (https://bitbucket.org/inkytonik/scalaworksheet).

I've noticed that when I run a worksheet while SublimeSBT is installed, I get a crash from SublimeSBT (see below for full trace).

I presume it's being triggered in some way by the way in which I create the worksheet view, but I'm not having much luck tracking it down. Is there something that I can do in my plugin to avoid this happening? Or is a fix at the SublimeSBT end more appropriate?

Tony

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 "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/sublimesbt.py", line 261, in on_modified
    for reporter in maybe(self._reporter(view)):
  File "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/sublimesbt.py", line 284, in _reporter
    return Project(window).error_reporter
  File "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/util.py", line 54, in __call__
    return cls.instance_cache(window.id(), lambda: type.__call__(cls, window))
  File "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/util.py", line 43, in __call__
    self.__items[key] = f()
  File "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/util.py", line 54, in <lambda>
    return cls.instance_cache(window.id(), lambda: type.__call__(cls, window))
  File "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/project.py", line 27, in __init__
    self.settings)
  File "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/errorreporter.py", line 12, in __init__
    self._marker = ErrorMarker(window, error_report, settings)
  File "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/errormarker.py", line 13, in __init__
    self._highlighter = CodeHighlighter(settings, self._current_error_in_view)
  File "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/highlighter.py", line 18, in __init__
    self._update_highlight_args()
  File "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/highlighter.py", line 95, in _update_highlight_args
    'error': self._create_highlight_args('error'),
  File "/Users/asloane/Library/Application Support/Sublime Text 3/Installed Packages/SublimeSBT.sublime-package/highlighter.py", line 101, in _create_highlight_args
    style = self._mark_settings(error_type)['style']
TypeError: 'NoneType' object is not subscriptable
inkytonik commented 11 years ago

Does anyone have any advice on this problem?

jarhart commented 11 years ago

Hey, sorry I took so long to get to this.

I seem to have fixed it, though I don't understand why it was happening, and I especially don't understand why it was only happening with your worksheet view.

At any rate, I'm no longer getting the error, so I'm closing this issue. If it's not fixed for you with the latest version, just reopen it.

Thanks for reporting the issue, and sorry again for taking so long to get to it.

inkytonik commented 11 years ago

Thanks. It seems to be fixed for me too.