{"action":"opened","issue":{"url":"https://api.github.com/repos/hlamer/enki/issues/314","labels_url":"https://api.github.com/repos/hlamer/enki/issues/314/labels{/name}","comments_url":"https://api.github.com/repos/hlamer/enki/issues/314/comments","events_url":"https://api.github.com/repos/hlamer/enki/issues/314/events","html_url":"https://github.com/hlamer/enki/issues/314","id":106883722,"number":314,"title":"Enki freezes after using Locator sporadically","user":{"login":"vi","id":173219,"avatar_url":"https://avatars.githubusercontent.com/u/173219?v=3","gravatar_id":"","url":"https://api.github.com/users/vi","html_url":"https://github.com/vi","followers_url":"https://api.github.com/users/vi/followers","following_url":"https://api.github.com/users/vi/following{/other_user}","gists_url":"https://api.github.com/users/vi/gists{/gist_id}","starred_url":"https://api.github.com/users/vi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vi/subscriptions","organizations_url":"https://api.github.com/users/vi/orgs","repos_url":"https://api.github.com/users/vi/repos","events_url":"https://api.github.com/users/vi/events{/privacy}","received_events_url":"https://api.github.com/users/vi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-16T23:20:30Z","updated_at":"2015-09-16T23:20:30Z","closed_at":null,"body":"commit 8344c451aa9fa07885d70f949455d98a5c8252e1\r\n\r\nSteps to reproduce:\r\n\r\n1. Open Enki in a project directory, starting a new session;\r\n2. unsaved \"untitled\" gets opened;\r\n3. Press Ctrl+L;\r\n4. Open a file somehow (with FuzzyOpen or not);\r\n5. \"untitled\" gets replaced by the newly opened file;\r\n\r\nEnki is frozen, does not refresh window and can be terminated only from outside.\r\n\r\nWhen running under `strace` I see less freezes. When it although freezes, it waits on the `futex` syscall (i.e. on some thread synchronisation).\r\n\r\nEnding of the result of tracing (may be truncated):\r\n\r\n```\r\n --- modulename: workspace_commands, funcname: completer\r\nworkspace_commands.py(80):         if self._path is not None:\r\nworkspace_commands.py(81):             return makeSuitableCompleter(self._path)\r\n --- modulename: pathcompleter, funcname: makeSuitableCompleter\r\npathcompleter.py(21):     if '*' in text or '?' in text or '[' in text:\r\npathcompleter.py(24):         return PathCompleter(text)\r\n --- modulename: pathcompleter, funcname: __init__\r\npathcompleter.py(170):         AbstractPathCompleter.__init__(self, text)\r\n --- modulename: pathcompleter, funcname: __init__\r\npathcompleter.py(43):         self._originalText = text\r\npathcompleter.py(44):         self._dirs = []\r\npathcompleter.py(45):         self._files = []\r\npathcompleter.py(46):         self._error = None\r\npathcompleter.py(47):         self._status = None\r\npathcompleter.py(53):         self._model = None  # can't construct in the construtor, must be constructed in GUI thread\r\nlocator.py(641):             if completer.mustBeLoaded:\r\nlocator.py(642):                 self._loadingTimer.start()\r\nlocator.py(643):                 self._completerLoaderThread.loadCompleter(self._command, completer)\r\n --- modulename: locator, funcname: loadCompleter\r\nlocator.py(447):         self._stopEvent.set()\r\n --- modulename: threading, funcname: set\r\nthreading.py(582):         self.__cond.acquire()\r\nthreading.py(583):         try:\r\nthreading.py(584):             self.__flag = True\r\nthreading.py(585):             self.__cond.notify_all()\r\n --- modulename: threading, funcname: notifyAll\r\nthreading.py(406):         self.notify(len(self.__waiters))\r\n --- modulename: threading, funcname: notify\r\nthreading.py(382):         if not self._is_owned():\r\n --- modulename: threading, funcname: _is_owned\r\nthreading.py(302):         if self.__lock.acquire(0):\r\nthreading.py(306):             return True\r\nthreading.py(384):         __waiters = self.__waiters\r\nthreading.py(385):         waiters = __waiters[:n]\r\nthreading.py(386):  \r\n```\r\n\r\ngdb backtrace of main thread:\r\n\r\n```\r\n(gdb) py-bt \r\n#4 Frame 0xee9a502c, for file /usr/lib/python2.7/threading.py, line 339, in wait (self=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1290>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1290>, _Condition__waiters=[<thread.lock at remote 0xf7fd1310>], release=<built-in method release of thread.lock object at remote 0xf7fd1290>) at remote 0xf290cd2c>, timeout=None, waiter=<thread.lock at remote 0xf7fd1310>, saved_state=None)\r\n    waiter.acquire()\r\n#8 Frame 0xee9a786c, for file /usr/lib/python2.7/Queue.py, line 82, in join (self=<Queue(unfinished_tasks=1, queue=<collections.deque at remote 0xf0f4f6f4>, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1290>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1290>, _Condition__waiters=[<thread.lock at remote 0xf7fd1310>], release=<built-in method release of thread.lock object at remote 0xf7fd1290>) at remote 0xf290cd2c>, mutex=<thread.lock at remote 0xf7fd1290>, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1290>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1290>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0xf7fd1290>) at remote 0xf290c70c>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1290>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd12...(truncated)\r\n    self.all_tasks_done.wait()\r\n#11 Frame 0xee9a770c, for file /mnt/src/git/enki/bin/../enki/core/locator.py, line 448, in loadCompleter (self=<_CompleterLoaderThread(_Thread__ident=-281130176, _Thread__block=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1320>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1320>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0xf7fd1320>) at remote 0xf290cfcc>, _Thread__name='Thread-1', _Thread__daemonic=False, _stopEvent=<_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd12e0>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd12e0>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0xf7fd12e0>) at remote 0xef6c266c>) at remote 0xef6c258c>, _Thread__started=<_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=<_Condition(_Verbose__verbose=Fal...(truncated)\r\n    self._taskQueue.join()\r\n#14 Frame 0xee9a702c, for file /mnt/src/git/enki/bin/../enki/core/locator.py, line 643, in _updateCompletion (self=<_LocatorDialog(_model=<_CompleterModel(completer=<PathCompleter(_model=<QFileSystemModel at remote 0xee73814c>, _error=None, _dirs=[u'/mnt/itr3/e/[censored]'], _files=[u'/mnt/itr3/e/[censored]/AndroidManifest.xml'], _originalText=u'./A', _status=None, _path=u'/mnt/itr3/e/[censored]/') at remote 0xf3bb6eec>) at remote 0xef681f14>, _commandClasses=[<classobj at remote 0xf336e05c>, <classobj at remote 0xf29452cc>, <classobj at remote 0xf29452fc>, <classobj at remote 0xf294532c>], _command=<CommandOpen(_line=None, _path=u'./A') at remote 0xedb0280c>, _completerLoaderThread=<_CompleterLoaderThread(_Thread__ident=-281130176, _Thread__block=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1320>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1320>, _Condition__waiters=[], release=<built-in method release of thread...(truncated)\r\n    self._completerLoaderThread.loadCompleter(self._command, completer)\r\n#55 Frame 0xf7c3802c, for file /mnt/src/git/enki/bin/../enki/main.py, line 298, in main (cmdLine={'files': [], 'session_name': 'mysession2', 'profiling': None, 'no-session': None}, profiler=<_StartProfiler(enabled=None) at remote 0xf7c3560c>, PyQt4=<module at remote 0xf7c9c314>, qutepart=<module at remote 0xf7c268cc>, app=<QApplication at remote 0xf7d49d64>, core=<Core(_config=<Config(_enableWriting=True, _data={u'Associations': {u'Java': {u'FirstLine': [u''], u'FileName': [u'*.java']}, u'VHDL': {u'FirstLine': [u''], u'FileName': [u'*.vhdl']}, u'JavaScript': {u'FirstLine': [u''], u'FileName': [u'*.js', u'*.json']}, u'Makefile': {u'FirstLine': [u''], u'FileName': [u'*.mak', u'*makefile', u'Makefile*', u'*.mk']}, u'Perl': {u'FirstLine': [u'*perl*'], u'FileName': [u'*.ph', u'*.pl', u'*.pm']}, u'Lua': {u'FirstLine': [u''], u'FileName': [u'*.lua']}, u'IDL': {u'FirstLine': [u''], u'FileName': [u'*.idl']}, u'Verilog': {u'FirstLine': [u''], u'FileName': [u'*.v']}, u'Scheme': {u'FirstLine': [u''], u'FileName': [u'*.scm',...(truncated)\r\n    result = app.exec_()\r\n#58 Frame 0xf7d4518c, for file /home/vi/src/git/enki/bin/enki, line 38, in <module> ()\r\n    sys.exit(enki.main.main())\r\n(gdb) \r\n```\r\n\r\n```\r\n(gdb) thread apply all py-bt\r\n\r\nThread 10 (Thread 0xf3b92b40 (LWP 29473)):\r\n\r\nThread 9 (Thread 0xee6b6b40 (LWP 29466)):\r\n\r\nThread 5 (Thread 0xf1dffb40 (LWP 29457)):\r\n\r\n(that's from my patch):\r\nThread 4 (Thread 0xf27ffb40 (LWP 29456)):\r\n#3 Frame 0xf29969cc, for file /usr/lib/python2.7/socket.py, line 202, in accept (self=<_socketobject at remote 0xf29aeb8c>)\r\n    sock, addr = self._sock.accept()\r\n#6 Frame 0xf31f8aac, for file /mnt/src/git/enki/bin/../enki/plugins/session.py, line 63, in sessionSocketListener (QObject=<PyQt4.QtCore.pyqtWrapperType at remote 0xf7d5d3fc>, socket=<module at remote 0xf7c9af5c>, Foo=<PyQt4.QtCore.pyqtWrapperType at remote 0xf29887cc>, f=<Foo at remote 0xf29acd64>, sock=<_socketobject at remote 0xf29aeb8c>)\r\n    connection, client_address = sock.accept()\r\n\r\nThread 3 (Thread 0xf31bfb40 (LWP 29455)):\r\n#4 Frame 0xf332faac, for file /usr/lib/python2.7/threading.py, line 339, in wait (self=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1280>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1280>, _Condition__waiters=[<thread.lock at remote 0xf7fd12f0>], release=<built-in method release of thread.lock object at remote 0xf7fd1280>) at remote 0xf338e4cc>, timeout=None, waiter=<thread.lock at remote 0xf7fd12f0>, saved_state=None)\r\n    waiter.acquire()\r\n#8 Frame 0xf33815ec, for file /usr/lib/python2.7/Queue.py, line 168, in get (self=<Queue(unfinished_tasks=0, queue=<collections.deque at remote 0xf31e4f44>, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1280>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1280>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0xf7fd1280>) at remote 0xf31e650c>, mutex=<thread.lock at remote 0xf7fd1280>, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1280>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1280>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0xf7fd1280>) at remote 0xf338e8ac>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1280>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1280>, _Condition__waiters=[<thread....(truncated)\r\n    self.not_empty.wait()\r\n#12 Frame 0xf338119c, for file /mnt/src/git/enki/bin/../enki/plugins/navigator/__init__.py, line 103, in run (self=<ProcessorThread(_queue=<Queue(unfinished_tasks=0, queue=<collections.deque at remote 0xf31e4f44>, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1280>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1280>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0xf7fd1280>) at remote 0xf31e650c>, mutex=<thread.lock at remote 0xf7fd1280>, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1280>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1280>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0xf7fd1280>) at remote 0xf338e8ac>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1280>, acquire=<built-in method acquire of thread.lock obj...(truncated)\r\n    task = self._queue.get()\r\n\r\nThread 1 (Thread 0xf7d8c700 (LWP 29448)):\r\n#4 Frame 0xee9a502c, for file /usr/lib/python2.7/threading.py, line 339, in wait (self=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1290>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1290>, _Condition__waiters=[<thread.lock at remote 0xf7fd1310>], release=<built-in method release of thread.lock object at remote 0xf7fd1290>) at remote 0xf290cd2c>, timeout=None, waiter=<thread.lock at remote 0xf7fd1310>, saved_state=None)\r\n    waiter.acquire()\r\n#8 Frame 0xee9a786c, for file /usr/lib/python2.7/Queue.py, line 82, in join (self=<Queue(unfinished_tasks=1, queue=<collections.deque at remote 0xf0f4f6f4>, maxsize=0, all_tasks_done=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1290>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1290>, _Condition__waiters=[<thread.lock at remote 0xf7fd1310>], release=<built-in method release of thread.lock object at remote 0xf7fd1290>) at remote 0xf290cd2c>, mutex=<thread.lock at remote 0xf7fd1290>, not_full=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1290>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1290>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0xf7fd1290>) at remote 0xf290c70c>, not_empty=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1290>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd12...(truncated)\r\n    self.all_tasks_done.wait()\r\n#11 Frame 0xee9a770c, for file /mnt/src/git/enki/bin/../enki/core/locator.py, line 448, in loadCompleter (self=<_CompleterLoaderThread(_Thread__ident=-281130176, _Thread__block=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1320>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1320>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0xf7fd1320>) at remote 0xf290cfcc>, _Thread__name='Thread-1', _Thread__daemonic=False, _stopEvent=<_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd12e0>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd12e0>, _Condition__waiters=[], release=<built-in method release of thread.lock object at remote 0xf7fd12e0>) at remote 0xef6c266c>) at remote 0xef6c258c>, _Thread__started=<_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=<_Condition(_Verbose__verbose=Fal...(truncated)\r\n    self._taskQueue.join()\r\n#14 Frame 0xee9a702c, for file /mnt/src/git/enki/bin/../enki/core/locator.py, line 643, in _updateCompletion (self=<_LocatorDialog(_model=<_CompleterModel(completer=<PathCompleter(_model=<QFileSystemModel at remote 0xee73814c>, _error=None, _dirs=[u'/mnt/itr3/e/[censored]'], _files=[u'/mnt/itr3/e/[censored]/AndroidManifest.xml'], _originalText=u'./A', _status=None, _path=u'/mnt/itr3/e/[censored]/') at remote 0xf3bb6eec>) at remote 0xef681f14>, _commandClasses=[<classobj at remote 0xf336e05c>, <classobj at remote 0xf29452cc>, <classobj at remote 0xf29452fc>, <classobj at remote 0xf294532c>], _command=<CommandOpen(_line=None, _path=u'./A') at remote 0xedb0280c>, _completerLoaderThread=<_CompleterLoaderThread(_Thread__ident=-281130176, _Thread__block=<_Condition(_Verbose__verbose=False, _Condition__lock=<thread.lock at remote 0xf7fd1320>, acquire=<built-in method acquire of thread.lock object at remote 0xf7fd1320>, _Condition__waiters=[], release=<built-in method release of thread...(truncated)\r\n    self._completerLoaderThread.loadCompleter(self._command, completer)\r\n#55 Frame 0xf7c3802c, for file /mnt/src/git/enki/bin/../enki/main.py, line 298, in main (cmdLine={'files': [], 'session_name': 'mysession2', 'profiling': None, 'no-session': None}, profiler=<_StartProfiler(enabled=None) at remote 0xf7c3560c>, PyQt4=<module at remote 0xf7c9c314>, qutepart=<module at remote 0xf7c268cc>, app=<QApplication at remote 0xf7d49d64>, core=<Core(_config=<Config(_enableWriting=True, _data={u'Associations': {u'Java': {u'FirstLine': [u''], u'FileName': [u'*.java']}, u'VHDL': {u'FirstLine': [u''], u'FileName': [u'*.vhdl']}, u'JavaScript': {u'FirstLine': [u''], u'FileName': [u'*.js', u'*.json']}, u'Makefile': {u'FirstLine': [u''], u'FileName': [u'*.mak', u'*makefile', u'Makefile*', u'*.mk']}, u'Perl': {u'FirstLine': [u'*perl*'], u'FileName': [u'*.ph', u'*.pl', u'*.pm']}, u'Lua': {u'FirstLine': [u''], u'FileName': [u'*.lua']}, u'IDL': {u'FirstLine': [u''], u'FileName': [u'*.idl']}, u'Verilog': {u'FirstLine': [u''], u'FileName': [u'*.v']}, u'Scheme': {u'FirstLine': [u''], u'FileName': [u'*.scm',...(truncated)\r\n    result = app.exec_()\r\n#58 Frame 0xf7d4518c, for file /home/vi/src/git/enki/bin/enki, line 38, in <module> ()\r\nPython Exception <type 'exceptions.IndexError'> list index out of range: \r\nError occurred in Python command: list index out of range\r\n```"}}