Sublime Forum

[BUG] [quit] terminate called after... x86/linux/3038

#1

Sometimes I’m able to reliably kill Sublime Text 3 by simply opening empty a file from SideBar
I’ve got a plugin that fills empty python files with predefined content and use GitGutter in ASYNC mode (which seems to be related).

The error shown in the console:

$ subl -w terminate called after throwing an instance of 'std::bad_function_call' what(): std::exception Aborted

[code]import sublime_plugin

class NewPythonFile(sublime_plugin.EventListener):
def _init(self, view):
if view.settings().get(“repl”, False):
return
if view.size() == 0 and not (view.file_name() or “”).endswith(“init.py”) and view.match_selector(0, “source.python”):
view.run_command(“insert_snippet”, {“name”: “Packages/User/new_file.sublime-snippet”})

def on_load(self, view):
    self._init(view)

def on_activated(self, view):
    self._init(view)[/code]
0 Likes