andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 38 forks source link

Unittest discovery #153

Closed bjones1 closed 10 years ago

bjones1 commented 10 years ago

This causes intermittent "underlying C/C++ object has been deleted" errors on Ubuntu 12.05, otherwise seg faulting. It runs without problem on Windows.

andreikop commented 10 years ago

I see, that many tests are disabled. During the first attempt to run the tests, it crashed for me. REPL test freezes.

We should solve this problems before merging the changes to master. Sorry, can't try to debug the tests now.

bjones1 commented 10 years ago

Andrei,

Thanks for taking a look. I did some experimenting, and found that running this minimal test case causes a crash on Linux and Windows:

bjones@bjones-VirtualBox:~/enki_all/enki/tests$ ./test_crash.py .Segmentation fault (core dumped)

Bryan

On Thu, Jan 16, 2014 at 1:26 AM, Andrei Kopats notifications@github.comwrote:

I see, that many tests are disabled. During the first attempt to run the tests, it crashed for me. REPL test freezes.

We should solve this problems before merging the changes to master. Sorry, can't try to debug the tests now.

— Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-32447297 .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

import unittest import os.path import sys

sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(file)), "..")) import base from enki.widgets.termwidget import TermWidget

class Lang(base.TestCase): def setUp(self): self.term = TermWidget(self.app.font())

 def tearDown(self):
      del self.term

 def test_1(self):
      self.term.setLanguage('Python')
      self.term.setLanguage('C++')

class Test(base.TestCase): CREATE_NOT_SAVED_DOCUMENT = False

def setUp(self):
    base.TestCase.setUp(self)
    self._doc1 = self.createFile('file1.txt', 'asdf')

@base.inMainLoop
def test_1(self):
    # Modify file, than restore, than modify again
    with open(self._doc1.filePath(), 'w') as file_:
        file_.write('asdf')

if name == 'main': unittest.main()

andreikop commented 10 years ago

I've done a few fixes and now all tests pass on my Ubuntu 13.10 box. Merged! Thanks!

bjones1 commented 10 years ago

Andrei,

Did you push all your fixes? All I saw was an os.chdir(self.TEST_FILE_DIR) added to base.py. On Windows, I get some crashes plus a lot of noise. I still get crashes on Ubuntu 12.05. I'll test on 13.10.

Also, on Windows, commenting out line 25 of tests/test_core/test_core.py suppresses a lot of "noise"; otherwise, the tests look like the output below. Is there some better way to suppress this?

Bryan

C:\Users\bjones\Documents\enki_all\enki\tests>run_all.py test_1 (test_core.test_core.RestoreOldConfigs) ... ok test_2 (test_core.test_core.RestoreOldConfigs) ... [Errno 2] No such file or dir ectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_core.test_detect_language.Test) ... [Errno 2] No such file or direc tory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_2 (test_core.test_detect_language.Test) ... [Errno 2] No such file or direc tory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_3 (test_core.test_detect_language.Test) ... [Errno 2] No such file or direc tory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_4 (test_core.test_detect_language.Test) ... [Errno 2] No such file or direc tory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_5 (test_core.test_detect_language.Test) ... [Errno 2] No such file or direc tory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_core.test_filewatcher.Test) ... Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\enki\tests\base.py", line 213, in <la mbda> QTimer.singleShot(20, lambda: timerCallback(attempt + 1)) File "C:\Users\bjones\Documents\enki_all\enki\tests\base.py", line 215, in tim erCallback self.fail("Dialog not found") File "C:\Python27\lib\unittest\case.py", line 412, in fail raise self.failureException(msg) AssertionError: Dialog not found [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_2 (test_core.test_filewatcher.Test) ... [Errno 2] No such file or directory : 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_3 (test_core.test_filewatcher.Test) ... [Errno 2] No such file or directory : 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_4 (test_core.test_filewatcher.Test) ... [Errno 2] No such file or directory : 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_core.test_hideall.Test) ... [Errno 2] No such file or directory: 'c :\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_dev_null (test_core.test_opened_files_dock.Rename) ... [Errno 2] No such fi le or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastp os.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_dev_null_os_fail (test_core.test_opened_files_dock.Rename) ... skipped 'req uires Linux' test_flags (test_core.test_opened_files_dock.Rename) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos. json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_os_fail (test_core.test_opened_files_dock.Rename) ... [Errno 2] No such fil e or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpo s.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_same_path (test_core.test_opened_files_dock.Rename) ... [Errno 2] No such f ile or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\last pos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_success (test_core.test_opened_files_dock.Rename) ... [Errno 2] No such fil e or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpo s.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_navigator.Settings) ... [Errno 2] No such file or dire ctory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_navigator.Test) ... [Errno 2] No such file or director y: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_2 (test_plugins.test_navigator.Test) ... [Errno 2] No such file or director y: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_3 (test_plugins.test_navigator.Test) ... [Errno 2] No such file or director y: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_4 (test_plugins.test_navigator.Test) ... [Errno 2] No such file or director y: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_5 (test_plugins.test_navigator.Test) ... [Errno 2] No such file or director y: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_6 (test_plugins.test_navigator.Test) ... [Errno 2] No such file or director y: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_7 (test_plugins.test_navigator.Test) ... [Errno 2] No such file or director y: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_html (test_plugins.test_preview.Test) ... [Errno 2] No such file or directo ry: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_markdown (test_plugins.test_preview.Test) ... [Errno 2] No such file or dir ectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_markdown_templates (test_plugins.test_preview.Test) ... [Errno 2] No such f ile or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\last pos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_markdown_templates_help (test_plugins.test_preview.Test) ... [Errno 2] No s uch file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\ \lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_rst (test_plugins.test_preview.Test) ... [Errno 2] No such file or director y: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_qpart_settings.AutoCompletion) ... [Errno 2] No such f ile or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\last pos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_2 (test_plugins.test_qpart_settings.AutoCompletion) ... [Errno 2] No such f ile or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\last pos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_qpart_settings.Edge) ... [Errno 2] No such file or dir ectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_2 (test_plugins.test_qpart_settings.Edge) ... [Errno 2] No such file or dir ectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_3 (test_plugins.test_qpart_settings.Edge) ... [Errno 2] No such file or dir ectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_4 (test_plugins.test_qpart_settings.Edge) ... [Errno 2] No such file or dir ectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_qpart_settings.Eol) ... [Errno 2] No such file or dire ctory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_2 (test_plugins.test_qpart_settings.Eol) ... [Errno 2] No such file or dire ctory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_3 (test_plugins.test_qpart_settings.Eol) ... [Errno 2] No such file or dire ctory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_4 (test_plugins.test_qpart_settings.Eol) ... [Errno 2] No such file or dire ctory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_qpart_settings.Font) ... [Errno 2] No such file or dir ectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_qpart_settings.Indent) ... [Errno 2] No such file or d irectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json ' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_2 (test_plugins.test_qpart_settings.Indent) ... [Errno 2] No such file or d irectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json ' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_qpart_settings.WhiteSpaceVisibility) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new \lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_qpart_settings.WhitespaceStrip) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\las tpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_qpart_settings.Wrap) ... [Errno 2] No such file or dir ectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_2 (test_plugins.test_qpart_settings.Wrap) ... [Errno 2] No such file or dir ectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_3 (test_plugins.test_qpart_settings.Wrap) ... [Errno 2] No such file or dir ectory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_repl.Test) ... FAIL [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' test_2 (test_plugins.test_repl.Test) ... FAIL [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' test_3 (test_plugins.test_repl.Test) ... [Errno 2] No such file or directory: 'c :\users\bjones\appdata\local\temp\enki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_esc_on_editor_closes (test_plugins.test_search.Gui) ... [Errno 2] No such f ile or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\last pos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_esc_on_widget_closes (test_plugins.test_search.Gui) ... [Errno 2] No such f ile or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\last pos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_highlight_found_items (test_plugins.test_search.InFile) ... [Errno 2] No su ch file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\ lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_search_next (test_plugins.test_search.InFile) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.js on' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_search_previous (test_plugins.test_search.InFile) ... [Errno 2] No such fil e or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpo s.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_select_and_search (test_plugins.test_search.InFile) ... [Errno 2] No such f ile or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\last pos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_select_and_search_multiline (test_plugins.test_search.InFile) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests /new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_type_and_search (test_plugins.test_search.InFile) ... [Errno 2] No such fil e or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpo s.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_whole_word (test_plugins.test_search.InFile) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.jso n' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_1 (test_plugins.test_search.ReplaceInDirectory) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos. json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_action_enabled (test_plugins.test_workspace_actions.Rename) ... [Errno 2] N o such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/n ew\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_dev_null (test_plugins.test_workspace_actions.Rename) ... skipped 'requires Linux' test_dev_null_os_fail (test_plugins.test_workspace_actions.Rename) ... skipped ' requires Linux' test_os_fail (test_plugins.test_workspace_actions.Rename) ... skipped 'requires Linux' test_same_path (test_plugins.test_workspace_actions.Rename) ... skipped 'require s Linux' test_success (test_plugins.test_workspace_actions.Rename) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\las tpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_action_enabled (test_plugins.test_workspace_actions.ToggleExecutable) ... [ Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\en ki-tests/new\lastpos.json' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_action_text (test_plugins.test_workspace_actions.ToggleExecutable) ... skip ped 'requires Linux' test_modify_flags (test_plugins.test_workspace_actions.ToggleExecutable) ... ski pped 'requires Linux' test_os_fail (test_plugins.test_workspace_actions.ToggleExecutable) ... skipped 'requires Linux' test_1 (test_plugins.test_workspace_commands.Test) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.js on' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_2 (test_plugins.test_workspace_commands.Test) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.js on' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_3 (test_plugins.test_workspace_commands.Test) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.js on' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_4 (test_plugins.test_workspace_commands.Test) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.js on' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_5 (test_plugins.test_workspace_commands.Test) ... [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\enki-tests/new\lastpos.js on' [Errno 2] No such file or directory: 'c:\users\bjones\appdata\local\temp\e nki-tests/new\recent_files.json' ok test_dark_cmd (test_widgets.test_termwidget.Formatting) ... ok test_dark_error (test_widgets.test_termwidget.Formatting) ... ok test_dark_hint (test_widgets.test_termwidget.Formatting) ... ok test_dark_out (test_widgets.test_termwidget.Formatting) ... ok test_light_cmd (test_widgets.test_termwidget.Formatting) ... ok test_light_error (test_widgets.test_termwidget.Formatting) ... ok test_light_hint (test_widgets.test_termwidget.Formatting) ... ok test_light_out (test_widgets.test_termwidget.Formatting) ... ok test_1 (test_widgets.test_termwidget.History) ... ok test_1 (test_widgets.test_termwidget.Lang) ... ok

FAIL: test_1 (test_plugins.test_repl.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\enki\tests\base.py", line 96, in wrap per self.fail('{} command not found. Can not run the test without it'.format(cmd lineArgs[0])) AssertionError: scheme command not found. Can not run the test without it

FAIL: test_2 (test_plugins.test_repl.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\enki\tests\base.py", line 96, in wrap per self.fail('{} command not found. Can not run the test without it'.format(cmd lineArgs[0])) AssertionError: sml command not found. Can not run the test without it


Ran 87 tests in 28.000s

FAILED (failures=2, skipped=8)

On Wed, Jan 22, 2014 at 12:19 AM, Andrei Kopats notifications@github.comwrote:

I've done a few fixes and now all tests pass on my Ubuntu 13.10 box. Merged! Thanks!

— Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-32996383 .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

andreikop commented 10 years ago

Yes, all is pushed and tests pass for me on 13.10 I made 2 fixes, now Windows tests also are passed (Except sml and scheme, which is not installed) Will check 12.4 when have time

bjones1 commented 10 years ago

Andrei,

Thanks -- the output is much cleaner on master. However, on my Windows PC the tests hung the first time I ran them at test_3 (test_plugins.test_workspace_commands.Test). After that, repeated runs were fine. ??? Timing bugs are soooo hard to find.

Bryan

On Thu, Jan 23, 2014 at 1:27 AM, Andrei Kopats notifications@github.comwrote:

Yes, all is pushed and tests pass for me on 13.10 I made 2 fixes, now Windows tests also are passed (Except sml and scheme, which is not installed) Will check 12.4 when have time

— Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33102539 .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

bjones1 commented 10 years ago

Andrei,

A clue I found toward a bug: when running on my Windows PC...

test_2 (test_plugins.test_workspace_commands.Test) ... Traceback (most recent ca ll last): File "C:\Python27\lib\site-packages\qutepart\completer.py", line 39, in _onTim er method() File "C:\Python27\lib\site-packages\qutepart\completer.py", line 343, in _upda teWordSet for line in self._qpart.lines: File "C:\Python27\lib\site-packages\qutepart\lines.py", line 150, in iter return self._Iterator(self._doc.firstBlock()) RuntimeError: wrapped C/C++ object of type QTextDocument has been deleted

Bryan

On Thu, Jan 23, 2014 at 2:21 PM, Bryan A. Jones bjones@ece.msstate.eduwrote:

Andrei,

Thanks -- the output is much cleaner on master. However, on my Windows PC the tests hung the first time I ran them at test_3 (test_plugins.test_workspace_commands.Test). After that, repeated runs were fine. ??? Timing bugs are soooo hard to find.

Bryan

On Thu, Jan 23, 2014 at 1:27 AM, Andrei Kopats notifications@github.comwrote:

Yes, all is pushed and tests pass for me on 13.10 I made 2 fixes, now Windows tests also are passed (Except sml and scheme, which is not installed) Will check 12.4 when have time

— Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33102539 .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

andreikop commented 10 years ago

Hi

It's cool, that you saved this backtrace. It is quite difficult to reproduce such bugs, caused by timings and not predictable garbage collection.

I made a changes, which should fix this bug. But the bug doesn't reproduce for me. Could you please test the latest qutepart master?

bjones1 commented 10 years ago

Andrei,

Will do. A side note: on qutepart master, I get this, but only on Windows:

FAIL: test_1 (test_bracket_hlighter.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\qutepart\tests\test_bracket_hlighter. py", line 55, in test_1 [(4, 5, True), (31, 32, True)]) File "C:\Users\bjones\Documents\enki_all\qutepart\tests\test_bracket_hlighter. py", line 38, in _verify self.assertEqual(converted, expected) AssertionError: Lists differ: [(4, 5, True), (32, 33, True)] != [(4, 5, True), ( 31, 32, True)]

First differing element 1: (32, 33, True) (31, 32, True)

Bryan

On Fri, Jan 24, 2014 at 12:21 AM, Andrei Kopats notifications@github.comwrote:

Hi

It's cool, that you saved this backtrace. It is quite difficult to reproduce such bugs, caused by timings and not predictable garbage collection.

I made a changes, which should fix this bug. But the bug doesn't reproduce for me. Could you please test the latest qutepart master?

— Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33200278 .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

bjones1 commented 10 years ago

Andrei,

Also, on Ubuntu 12.05, I now get consistent seg faults when running tests on qutepart master.

On Fri, Jan 24, 2014 at 9:30 AM, Bryan A. Jones bjones@ece.msstate.eduwrote:

Andrei,

Will do. A side note: on qutepart master, I get this, but only on Windows:

FAIL: test_1 (test_bracket_hlighter.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\qutepart\tests\test_bracket_hlighter. py", line 55, in test_1 [(4, 5, True), (31, 32, True)]) File "C:\Users\bjones\Documents\enki_all\qutepart\tests\test_bracket_hlighter. py", line 38, in _verify self.assertEqual(converted, expected) AssertionError: Lists differ: [(4, 5, True), (32, 33, True)] != [(4, 5, True), ( 31, 32, True)]

First differing element 1: (32, 33, True) (31, 32, True)

  • [(4, 5, True), (32, 33, True)] ? ----
  • [(4, 5, True), (31, 32, True)] ? ++++

Bryan

On Fri, Jan 24, 2014 at 12:21 AM, Andrei Kopats notifications@github.comwrote:

Hi

It's cool, that you saved this backtrace. It is quite difficult to reproduce such bugs, caused by timings and not predictable garbage collection.

I made a changes, which should fix this bug. But the bug doesn't reproduce for me. Could you please test the latest qutepart master?

— Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33200278 .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

bjones1 commented 10 years ago

Andrei,

I had an idea on how to track down events that occur after core.term() and pushed it. The results on Windows look helpful. I'm not sure how to print out what routine the timer would call, but it should be easy to set a breakpoint in the debugger then trace it or inspect it (I hope).

Bryan

C:\Users\bjones\Documents\enki_all\enki\tests>run_all.py test_1 (test_base.TestInMainLoop) ... ok test_1 (test_base.TestWaitForSignal) ... ok test_2 (test_base.TestWaitForSignal) ... ok test_3 (test_base.TestWaitForSignal) ... ok test_4 (test_base.TestWaitForSignal) ... ok test_5 (test_base.TestWaitForSignal) ... ok test_6 (test_base.TestWaitForSignal) ... ok test_1 (test_core.test_core.RestoreOldConfigs) ... ok test_2 (test_core.test_core.RestoreOldConfigs) ... ok test_1 (test_core.test_detect_language.Test) ... ok test_2 (test_core.test_detect_language.Test) ... ok test_3 (test_core.test_detect_language.Test) ... ok test_4 (test_core.test_detect_language.Test) ... ok test_5 (test_core.test_detect_language.Test) ... ok test_1 (test_core.test_filewatcher.Test) ... ok test_2 (test_core.test_filewatcher.Test) ... ok test_3 (test_core.test_filewatcher.Test) ... ok test_4 (test_core.test_filewatcher.Test) ... ok test_1 (test_core.test_hideall.Test) ... Post-termination event: receiver = <Py t4.QtCore.QTimer object at 0x03033780>, event = <PyQt4.QtCore.QTimerEvent objec at 0x0302FA50> ok test_dev_null (test_core.test_opened_files_dock.Rename) ... ok test_dev_null_os_fail (test_core.test_opened_files_dock.Rename) ... skipped 're uires Linux' test_flags (test_core.test_opened_files_dock.Rename) ... ok test_os_fail (test_core.test_opened_files_dock.Rename) ... Post-termination eve t: receiver = <PyQt4.QtCore.QTimer object at 0x03335F18>, event = <PyQt4.QtCore QTimerEvent object at 0x0862B8E8> ok test_same_path (test_core.test_opened_files_dock.Rename) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x0331FCD8>, event = <PyQt4.QtCo e.QTimerEvent object at 0x08620588> ok test_success (test_core.test_opened_files_dock.Rename) ... ok test_1 (test_plugins.test_navigator.Settings) ... ok test_1 (test_plugins.test_navigator.Test) ... ok test_2 (test_plugins.test_navigator.Test) ... ok test_3 (test_plugins.test_navigator.Test) ... ok test_4 (test_plugins.test_navigator.Test) ... ok test_5 (test_plugins.test_navigator.Test) ... ok test_6 (test_plugins.test_navigator.Test) ... ok test_7 (test_plugins.test_navigator.Test) ... ok test_html (test_plugins.test_preview.Test) ... ok test_markdown (test_plugins.test_preview.Test) ... Post-termination event: rece ver = <PyQt4.QtCore.QTimer object at 0x07981D20>, event = <PyQt4.QtCore.QTimerE ent object at 0x085F7B70> ok test_markdown_templates (test_plugins.test_preview.Test) ... ok test_markdown_templates_help (test_plugins.test_preview.Test) ... ok test_rst (test_plugins.test_preview.Test) ... ok test_1 (test_plugins.test_qpart_settings.AutoCompletion) ... ok test_2 (test_plugins.test_qpart_settings.AutoCompletion) ... ok test_1 (test_plugins.test_qpart_settings.Edge) ... ok test_2 (test_plugins.test_qpart_settings.Edge) ... ok test_3 (test_plugins.test_qpart_settings.Edge) ... ok test_4 (test_plugins.test_qpart_settings.Edge) ... ok test_1 (test_plugins.test_qpart_settings.Eol) ... ok test_2 (test_plugins.test_qpart_settings.Eol) ... ok test_3 (test_plugins.test_qpart_settings.Eol) ... ok test_4 (test_plugins.test_qpart_settings.Eol) ... ok test_1 (test_plugins.test_qpart_settings.Font) ... ok test_1 (test_plugins.test_qpart_settings.Indent) ... ok test_2 (test_plugins.test_qpart_settings.Indent) ... ok test_1 (test_plugins.test_qpart_settings.WhiteSpaceVisibility) ... ok test_1 (test_plugins.test_qpart_settings.WhitespaceStrip) ... ok test_1 (test_plugins.test_qpart_settings.Wrap) ... ok test_2 (test_plugins.test_qpart_settings.Wrap) ... ok test_3 (test_plugins.test_qpart_settings.Wrap) ... ok test_1 (test_plugins.test_repl.Test) ... FAIL test_2 (test_plugins.test_repl.Test) ... FAIL test_3 (test_plugins.test_repl.Test) ... ok test_esc_on_editor_closes (test_plugins.test_search.Gui) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x06CCBE40>, event = <PyQt4.QtCo e.QTimerEvent object at 0x034B7390> Post-termination event: receiver = <PyQt4.QtCore.QTimer object at 0x034B7390>, vent = <PyQt4.QtCore.QTimerEvent object at 0x0686E030> Post-termination event: receiver = <PyQt4.QtCore.QObject object at 0x034B7390>, event = <PyQt4.QtCore.QEvent object at 0x0686E030> Post-termination event: receiver = <PyQt4.QtCore.QObject object at 0x034B7390>, event = <PyQt4.QtCore.QEvent object at 0x0686E030> ok test_esc_on_widget_closes (test_plugins.test_search.Gui) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x0686E030>, event = <PyQt4.QtCo e.QTimerEvent object at 0x07173CD8> ok test_highlight_found_items (test_plugins.test_search.InFile) ... Post-terminati n event: receiver = <PyQt4.QtCore.QTimer object at 0x07974F18>, event = <PyQt4. tCore.QTimerEvent object at 0x07629FA8> ok test_search_next (test_plugins.test_search.InFile) ... Post-termination event: eceiver = <PyQt4.QtCore.QTimer object at 0x07629FA8>, event = <PyQt4.QtCore.QTi erEvent object at 0x07CE6E40> ok test_search_previous (test_plugins.test_search.InFile) ... Post-termination eve t: receiver = <PyQt4.QtCore.QTimer object at 0x0796E4B0>, event = <PyQt4.QtCore QTimerEvent object at 0x0796EBB8> ok test_select_and_search (test_plugins.test_search.InFile) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x0796EBB8>, event = <PyQt4.QtCo e.QTimerEvent object at 0x034BD198> ok test_select_and_search_multiline (test_plugins.test_search.InFile) ... Post-ter ination event: receiver = <PyQt4.QtCore.QTimer object at 0x034BD198>, event = < yQt4.QtCore.QTimerEvent object at 0x0775B3D8> ok test_type_and_search (test_plugins.test_search.InFile) ... Post-termination eve t: receiver = <PyQt4.QtCore.QTimer object at 0x0775B3D8>, event = <PyQt4.QtCore QTimerEvent object at 0x07064E88> ok test_whole_word (test_plugins.test_search.InFile) ... Post-termination event: r ceiver = <PyQt4.QtCore.QTimer object at 0x07064E88>, event = <PyQt4.QtCore.QTim rEvent object at 0x0760C540> ok test_1 (test_plugins.test_search.ReplaceInDirectory) ... Post-termination event receiver = <PyQt4.QtCore.QTimer object at 0x070625D0>, event = <PyQt4.QtCore.Q imerEvent object at 0x0775B3D8> ok test_action_enabled (test_plugins.test_workspace_actions.Rename) ... ok test_dev_null (test_plugins.test_workspace_actions.Rename) ... skipped 'require Linux' test_dev_null_os_fail (test_plugins.test_workspace_actions.Rename) ... skipped requires Linux' test_os_fail (test_plugins.test_workspace_actions.Rename) ... skipped 'requires Linux' test_same_path (test_plugins.test_workspace_actions.Rename) ... skipped 'requir s Linux' test_success (test_plugins.test_workspace_actions.Rename) ... ok test_action_enabled (test_plugins.test_workspace_actions.ToggleExecutable) ... k test_action_text (test_plugins.test_workspace_actions.ToggleExecutable) ... ski ped 'requires Linux' test_modify_flags (test_plugins.test_workspace_actions.ToggleExecutable) ... sk pped 'requires Linux' test_os_fail (test_plugins.test_workspace_actions.ToggleExecutable) ... skipped 'requires Linux' test_1 (test_plugins.test_workspace_commands.Test) ... ok test_2 (test_plugins.test_workspace_commands.Test) ... Post-termination event: eceiver = <PyQt4.QtCore.QTimer object at 0x06982DF8>, event = <PyQt4.QtCore.QTi erEvent object at 0x07611540> ok test_3 (test_plugins.test_workspace_commands.Test) ... ok test_4 (test_plugins.test_workspace_commands.Test) ... ok test_5 (test_plugins.test_workspace_commands.Test) ... ok test_dark_cmd (test_widgets.test_termwidget.Formatting) ... ok test_dark_error (test_widgets.test_termwidget.Formatting) ... ok test_dark_hint (test_widgets.test_termwidget.Formatting) ... ok test_dark_out (test_widgets.test_termwidget.Formatting) ... ok test_light_cmd (test_widgets.test_termwidget.Formatting) ... ok test_light_error (test_widgets.test_termwidget.Formatting) ... ok test_light_hint (test_widgets.test_termwidget.Formatting) ... ok test_light_out (test_widgets.test_termwidget.Formatting) ... ok test_1 (test_widgets.test_termwidget.History) ... ok test_1 (test_widgets.test_termwidget.Lang) ... ok

FAIL: test_1 (test_plugins.test_repl.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\enki\tests\base.py", line 117, in wr pper self.fail('{} command not found. Can not run the test without it'.format(cm lineArgs[0])) AssertionError: scheme command not found. Can not run the test without it

FAIL: test_2 (test_plugins.test_repl.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\enki\tests\base.py", line 117, in wr pper self.fail('{} command not found. Can not run the test without it'.format(cm lineArgs[0])) AssertionError: sml command not found. Can not run the test without it


Ran 94 tests in 43.607s

FAILED (failures=2, skipped=8)

On Fri, Jan 24, 2014 at 10:34 AM, Bryan A. Jones bjones@ece.msstate.eduwrote:

Andrei,

Also, on Ubuntu 12.05, I now get consistent seg faults when running tests on qutepart master.

On Fri, Jan 24, 2014 at 9:30 AM, Bryan A. Jones bjones@ece.msstate.eduwrote:

Andrei,

Will do. A side note: on qutepart master, I get this, but only on Windows:

FAIL: test_1 (test_bracket_hlighter.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\qutepart\tests\test_bracket_hlighter. py", line 55, in test_1 [(4, 5, True), (31, 32, True)]) File "C:\Users\bjones\Documents\enki_all\qutepart\tests\test_bracket_hlighter. py", line 38, in _verify self.assertEqual(converted, expected) AssertionError: Lists differ: [(4, 5, True), (32, 33, True)] != [(4, 5, True), ( 31, 32, True)]

First differing element 1: (32, 33, True) (31, 32, True)

  • [(4, 5, True), (32, 33, True)] ? ----
  • [(4, 5, True), (31, 32, True)] ? ++++

Bryan

On Fri, Jan 24, 2014 at 12:21 AM, Andrei Kopats <notifications@github.com

wrote:

Hi

It's cool, that you saved this backtrace. It is quite difficult to reproduce such bugs, caused by timings and not predictable garbage collection.

I made a changes, which should fix this bug. But the bug doesn't reproduce for me. Could you please test the latest qutepart master?

— Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33200278 .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

andreikop commented 10 years ago

Hi

Thank you, cool idea. I'm going to check all timers one by one and make sure all are terminated, because a few similar crashes have been found recently. It is quite difficult to catch this crashes, because they are related to timings and hardly predictable memory management on the edge between C++ and Python.

Andrei

On Fri, Jan 24, 2014 at 7:39 PM, bjones1 notifications@github.com wrote:

Andrei,

I had an idea on how to track down events that occur after core.term() and pushed it. The results on Windows look helpful. I'm not sure how to print out what routine the timer would call, but it should be easy to set a breakpoint in the debugger then trace it or inspect it (I hope).

Bryan

C:\Users\bjones\Documents\enki_all\enki\tests>run_all.py test_1 (test_base.TestInMainLoop) ... ok test_1 (test_base.TestWaitForSignal) ... ok test_2 (test_base.TestWaitForSignal) ... ok test_3 (test_base.TestWaitForSignal) ... ok test_4 (test_base.TestWaitForSignal) ... ok test_5 (test_base.TestWaitForSignal) ... ok test_6 (test_base.TestWaitForSignal) ... ok test_1 (test_core.test_core.RestoreOldConfigs) ... ok test_2 (test_core.test_core.RestoreOldConfigs) ... ok test_1 (test_core.test_detect_language.Test) ... ok test_2 (test_core.test_detect_language.Test) ... ok test_3 (test_core.test_detect_language.Test) ... ok test_4 (test_core.test_detect_language.Test) ... ok test_5 (test_core.test_detect_language.Test) ... ok test_1 (test_core.test_filewatcher.Test) ... ok test_2 (test_core.test_filewatcher.Test) ... ok test_3 (test_core.test_filewatcher.Test) ... ok test_4 (test_core.test_filewatcher.Test) ... ok

test_1 (test_core.test_hideall.Test) ... Post-termination event: receiver

<Py t4.QtCore.QTimer object at 0x03033780>, event = <PyQt4.QtCore.QTimerEvent objec at 0x0302FA50> ok test_dev_null (test_core.test_opened_files_dock.Rename) ... ok test_dev_null_os_fail (test_core.test_opened_files_dock.Rename) ... skipped 're uires Linux' test_flags (test_core.test_opened_files_dock.Rename) ... ok test_os_fail (test_core.test_opened_files_dock.Rename) ... Post-termination eve t: receiver = <PyQt4.QtCore.QTimer object at 0x03335F18>, event = <PyQt4.QtCore QTimerEvent object at 0x0862B8E8> ok test_same_path (test_core.test_opened_files_dock.Rename) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x0331FCD8>, event = <PyQt4.QtCo e.QTimerEvent object at 0x08620588> ok test_success (test_core.test_opened_files_dock.Rename) ... ok test_1 (test_plugins.test_navigator.Settings) ... ok test_1 (test_plugins.test_navigator.Test) ... ok test_2 (test_plugins.test_navigator.Test) ... ok test_3 (test_plugins.test_navigator.Test) ... ok test_4 (test_plugins.test_navigator.Test) ... ok test_5 (test_plugins.test_navigator.Test) ... ok test_6 (test_plugins.test_navigator.Test) ... ok test_7 (test_plugins.test_navigator.Test) ... ok test_html (test_plugins.test_preview.Test) ... ok test_markdown (test_plugins.test_preview.Test) ... Post-termination event: rece ver = <PyQt4.QtCore.QTimer object at 0x07981D20>, event = <PyQt4.QtCore.QTimerE ent object at 0x085F7B70> ok test_markdown_templates (test_plugins.test_preview.Test) ... ok test_markdown_templates_help (test_plugins.test_preview.Test) ... ok test_rst (test_plugins.test_preview.Test) ... ok test_1 (test_plugins.test_qpart_settings.AutoCompletion) ... ok test_2 (test_plugins.test_qpart_settings.AutoCompletion) ... ok test_1 (test_plugins.test_qpart_settings.Edge) ... ok test_2 (test_plugins.test_qpart_settings.Edge) ... ok test_3 (test_plugins.test_qpart_settings.Edge) ... ok test_4 (test_plugins.test_qpart_settings.Edge) ... ok test_1 (test_plugins.test_qpart_settings.Eol) ... ok test_2 (test_plugins.test_qpart_settings.Eol) ... ok test_3 (test_plugins.test_qpart_settings.Eol) ... ok test_4 (test_plugins.test_qpart_settings.Eol) ... ok test_1 (test_plugins.test_qpart_settings.Font) ... ok test_1 (test_plugins.test_qpart_settings.Indent) ... ok test_2 (test_plugins.test_qpart_settings.Indent) ... ok test_1 (test_plugins.test_qpart_settings.WhiteSpaceVisibility) ... ok test_1 (test_plugins.test_qpart_settings.WhitespaceStrip) ... ok test_1 (test_plugins.test_qpart_settings.Wrap) ... ok test_2 (test_plugins.test_qpart_settings.Wrap) ... ok test_3 (test_plugins.test_qpart_settings.Wrap) ... ok test_1 (test_plugins.test_repl.Test) ... FAIL test_2 (test_plugins.test_repl.Test) ... FAIL test_3 (test_plugins.test_repl.Test) ... ok test_esc_on_editor_closes (test_plugins.test_search.Gui) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x06CCBE40>, event = <PyQt4.QtCo e.QTimerEvent object at 0x034B7390> Post-termination event: receiver = <PyQt4.QtCore.QTimer object at 0x034B7390>, vent = <PyQt4.QtCore.QTimerEvent object at 0x0686E030> Post-termination event: receiver = <PyQt4.QtCore.QObject object at 0x034B7390>, event = <PyQt4.QtCore.QEvent object at 0x0686E030> Post-termination event: receiver = <PyQt4.QtCore.QObject object at 0x034B7390>, event = <PyQt4.QtCore.QEvent object at 0x0686E030> ok test_esc_on_widget_closes (test_plugins.test_search.Gui) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x0686E030>, event = <PyQt4.QtCo e.QTimerEvent object at 0x07173CD8> ok test_highlight_found_items (test_plugins.test_search.InFile) ... Post-terminati n event: receiver = <PyQt4.QtCore.QTimer object at 0x07974F18>, event = <PyQt4. tCore.QTimerEvent object at 0x07629FA8> ok test_search_next (test_plugins.test_search.InFile) ... Post-termination event: eceiver = <PyQt4.QtCore.QTimer object at 0x07629FA8>, event = <PyQt4.QtCore.QTi erEvent object at 0x07CE6E40> ok test_search_previous (test_plugins.test_search.InFile) ... Post-termination eve t: receiver = <PyQt4.QtCore.QTimer object at 0x0796E4B0>, event = <PyQt4.QtCore QTimerEvent object at 0x0796EBB8> ok test_select_and_search (test_plugins.test_search.InFile) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x0796EBB8>, event = <PyQt4.QtCo e.QTimerEvent object at 0x034BD198> ok test_select_and_search_multiline (test_plugins.test_search.InFile) ... Post-ter ination event: receiver = <PyQt4.QtCore.QTimer object at 0x034BD198>, event = < yQt4.QtCore.QTimerEvent object at 0x0775B3D8> ok test_type_and_search (test_plugins.test_search.InFile) ... Post-termination eve t: receiver = <PyQt4.QtCore.QTimer object at 0x0775B3D8>, event = <PyQt4.QtCore QTimerEvent object at 0x07064E88> ok test_whole_word (test_plugins.test_search.InFile) ... Post-termination event: r ceiver = <PyQt4.QtCore.QTimer object at 0x07064E88>, event = <PyQt4.QtCore.QTim rEvent object at 0x0760C540> ok test_1 (test_plugins.test_search.ReplaceInDirectory) ... Post-termination event receiver = <PyQt4.QtCore.QTimer object at 0x070625D0>, event = <PyQt4.QtCore.Q imerEvent object at 0x0775B3D8> ok test_action_enabled (test_plugins.test_workspace_actions.Rename) ... ok test_dev_null (test_plugins.test_workspace_actions.Rename) ... skipped 'require Linux' test_dev_null_os_fail (test_plugins.test_workspace_actions.Rename) ... skipped requires Linux' test_os_fail (test_plugins.test_workspace_actions.Rename) ... skipped 'requires Linux' test_same_path (test_plugins.test_workspace_actions.Rename) ... skipped 'requir s Linux' test_success (test_plugins.test_workspace_actions.Rename) ... ok test_action_enabled (test_plugins.test_workspace_actions.ToggleExecutable) ... k test_action_text (test_plugins.test_workspace_actions.ToggleExecutable) ... ski ped 'requires Linux' test_modify_flags (test_plugins.test_workspace_actions.ToggleExecutable) ... sk pped 'requires Linux' test_os_fail (test_plugins.test_workspace_actions.ToggleExecutable) ... skipped 'requires Linux' test_1 (test_plugins.test_workspace_commands.Test) ... ok test_2 (test_plugins.test_workspace_commands.Test) ... Post-termination event: eceiver = <PyQt4.QtCore.QTimer object at 0x06982DF8>, event = <PyQt4.QtCore.QTi erEvent object at 0x07611540> ok test_3 (test_plugins.test_workspace_commands.Test) ... ok test_4 (test_plugins.test_workspace_commands.Test) ... ok test_5 (test_plugins.test_workspace_commands.Test) ... ok test_dark_cmd (test_widgets.test_termwidget.Formatting) ... ok test_dark_error (test_widgets.test_termwidget.Formatting) ... ok test_dark_hint (test_widgets.test_termwidget.Formatting) ... ok test_dark_out (test_widgets.test_termwidget.Formatting) ... ok test_light_cmd (test_widgets.test_termwidget.Formatting) ... ok test_light_error (test_widgets.test_termwidget.Formatting) ... ok test_light_hint (test_widgets.test_termwidget.Formatting) ... ok test_light_out (test_widgets.test_termwidget.Formatting) ... ok test_1 (test_widgets.test_termwidget.History) ... ok test_1 (test_widgets.test_termwidget.Lang) ... ok

FAIL: test_1 (test_plugins.test_repl.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\enki\tests\base.py", line 117, in wr pper self.fail('{} command not found. Can not run the test without it'.format(cm lineArgs[0])) AssertionError: scheme command not found. Can not run the test without it

FAIL: test_2 (test_plugins.test_repl.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\enki\tests\base.py", line 117, in wr pper self.fail('{} command not found. Can not run the test without it'.format(cm lineArgs[0])) AssertionError: sml command not found. Can not run the test without it


Ran 94 tests in 43.607s

FAILED (failures=2, skipped=8)

On Fri, Jan 24, 2014 at 10:34 AM, Bryan A. Jones bjones@ece.msstate.eduwrote:

Andrei,

Also, on Ubuntu 12.05, I now get consistent seg faults when running tests on qutepart master.

On Fri, Jan 24, 2014 at 9:30 AM, Bryan A. Jones bjones@ece.msstate.eduwrote:

Andrei,

Will do. A side note: on qutepart master, I get this, but only on Windows:

FAIL: test_1 (test_bracket_hlighter.Test)

Traceback (most recent call last): File

"C:\Users\bjones\Documents\enki_all\qutepart\tests\test_bracket_hlighter. py", line 55, in test_1 [(4, 5, True), (31, 32, True)]) File

"C:\Users\bjones\Documents\enki_all\qutepart\tests\test_bracket_hlighter. py", line 38, in _verify self.assertEqual(converted, expected) AssertionError: Lists differ: [(4, 5, True), (32, 33, True)] != [(4, 5, True), ( 31, 32, True)]

First differing element 1: (32, 33, True) (31, 32, True)

  • [(4, 5, True), (32, 33, True)] ? ----
  • [(4, 5, True), (31, 32, True)] ? ++++

Bryan

On Fri, Jan 24, 2014 at 12:21 AM, Andrei Kopats < notifications@github.com

wrote:

Hi

It's cool, that you saved this backtrace. It is quite difficult to reproduce such bugs, caused by timings and not predictable garbage collection.

I made a changes, which should fix this bug. But the bug doesn't reproduce for me. Could you please test the latest qutepart master?

— Reply to this email directly or view it on GitHub< https://github.com/hlamer/enki/pull/153#issuecomment-33200278> .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33238543 .

bjones1 commented 10 years ago

Neat! An idea: is there some way to create a self-stopping timer class: perhaps the PackageResource class at http://stackoverflow.com/questions/865115/how-do-i-correctly-clean-up-a-python-objectmight work? I didn't look carefully, just passing on an idea...

Bryan

On Sat, Jan 25, 2014 at 3:51 AM, Andrei Kopats notifications@github.comwrote:

Hi

Thank you, cool idea. I'm going to check all timers one by one and make sure all are terminated, because a few similar crashes have been found recently. It is quite difficult to catch this crashes, because they are related to timings and hardly predictable memory management on the edge between C++ and Python.

Andrei

On Fri, Jan 24, 2014 at 7:39 PM, bjones1 notifications@github.com wrote:

Andrei,

I had an idea on how to track down events that occur after core.term() and pushed it. The results on Windows look helpful. I'm not sure how to print out what routine the timer would call, but it should be easy to set a breakpoint in the debugger then trace it or inspect it (I hope).

Bryan

C:\Users\bjones\Documents\enki_all\enki\tests>run_all.py test_1 (test_base.TestInMainLoop) ... ok test_1 (test_base.TestWaitForSignal) ... ok test_2 (test_base.TestWaitForSignal) ... ok test_3 (test_base.TestWaitForSignal) ... ok test_4 (test_base.TestWaitForSignal) ... ok test_5 (test_base.TestWaitForSignal) ... ok test_6 (test_base.TestWaitForSignal) ... ok test_1 (test_core.test_core.RestoreOldConfigs) ... ok test_2 (test_core.test_core.RestoreOldConfigs) ... ok test_1 (test_core.test_detect_language.Test) ... ok test_2 (test_core.test_detect_language.Test) ... ok test_3 (test_core.test_detect_language.Test) ... ok test_4 (test_core.test_detect_language.Test) ... ok test_5 (test_core.test_detect_language.Test) ... ok test_1 (test_core.test_filewatcher.Test) ... ok test_2 (test_core.test_filewatcher.Test) ... ok test_3 (test_core.test_filewatcher.Test) ... ok test_4 (test_core.test_filewatcher.Test) ... ok test_1 (test_core.test_hideall.Test) ... Post-termination event:

receiver

<Py t4.QtCore.QTimer object at 0x03033780>, event = <PyQt4.QtCore.QTimerEvent objec at 0x0302FA50> ok test_dev_null (test_core.test_opened_files_dock.Rename) ... ok test_dev_null_os_fail (test_core.test_opened_files_dock.Rename) ... skipped 're uires Linux' test_flags (test_core.test_opened_files_dock.Rename) ... ok test_os_fail (test_core.test_opened_files_dock.Rename) ... Post-termination eve t: receiver = <PyQt4.QtCore.QTimer object at 0x03335F18>, event = <PyQt4.QtCore QTimerEvent object at 0x0862B8E8> ok test_same_path (test_core.test_opened_files_dock.Rename) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x0331FCD8>, event = <PyQt4.QtCo e.QTimerEvent object at 0x08620588> ok test_success (test_core.test_opened_files_dock.Rename) ... ok test_1 (test_plugins.test_navigator.Settings) ... ok test_1 (test_plugins.test_navigator.Test) ... ok test_2 (test_plugins.test_navigator.Test) ... ok test_3 (test_plugins.test_navigator.Test) ... ok test_4 (test_plugins.test_navigator.Test) ... ok test_5 (test_plugins.test_navigator.Test) ... ok test_6 (test_plugins.test_navigator.Test) ... ok test_7 (test_plugins.test_navigator.Test) ... ok test_html (test_plugins.test_preview.Test) ... ok test_markdown (test_plugins.test_preview.Test) ... Post-termination event: rece ver = <PyQt4.QtCore.QTimer object at 0x07981D20>, event = <PyQt4.QtCore.QTimerE ent object at 0x085F7B70> ok test_markdown_templates (test_plugins.test_preview.Test) ... ok test_markdown_templates_help (test_plugins.test_preview.Test) ... ok test_rst (test_plugins.test_preview.Test) ... ok test_1 (test_plugins.test_qpart_settings.AutoCompletion) ... ok test_2 (test_plugins.test_qpart_settings.AutoCompletion) ... ok test_1 (test_plugins.test_qpart_settings.Edge) ... ok test_2 (test_plugins.test_qpart_settings.Edge) ... ok test_3 (test_plugins.test_qpart_settings.Edge) ... ok test_4 (test_plugins.test_qpart_settings.Edge) ... ok test_1 (test_plugins.test_qpart_settings.Eol) ... ok test_2 (test_plugins.test_qpart_settings.Eol) ... ok test_3 (test_plugins.test_qpart_settings.Eol) ... ok test_4 (test_plugins.test_qpart_settings.Eol) ... ok test_1 (test_plugins.test_qpart_settings.Font) ... ok test_1 (test_plugins.test_qpart_settings.Indent) ... ok test_2 (test_plugins.test_qpart_settings.Indent) ... ok test_1 (test_plugins.test_qpart_settings.WhiteSpaceVisibility) ... ok test_1 (test_plugins.test_qpart_settings.WhitespaceStrip) ... ok test_1 (test_plugins.test_qpart_settings.Wrap) ... ok test_2 (test_plugins.test_qpart_settings.Wrap) ... ok test_3 (test_plugins.test_qpart_settings.Wrap) ... ok test_1 (test_plugins.test_repl.Test) ... FAIL test_2 (test_plugins.test_repl.Test) ... FAIL test_3 (test_plugins.test_repl.Test) ... ok test_esc_on_editor_closes (test_plugins.test_search.Gui) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x06CCBE40>, event = <PyQt4.QtCo e.QTimerEvent object at 0x034B7390> Post-termination event: receiver = <PyQt4.QtCore.QTimer object at 0x034B7390>, vent = <PyQt4.QtCore.QTimerEvent object at 0x0686E030> Post-termination event: receiver = <PyQt4.QtCore.QObject object at 0x034B7390>, event = <PyQt4.QtCore.QEvent object at 0x0686E030> Post-termination event: receiver = <PyQt4.QtCore.QObject object at 0x034B7390>, event = <PyQt4.QtCore.QEvent object at 0x0686E030> ok test_esc_on_widget_closes (test_plugins.test_search.Gui) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x0686E030>, event = <PyQt4.QtCo e.QTimerEvent object at 0x07173CD8> ok test_highlight_found_items (test_plugins.test_search.InFile) ... Post-terminati n event: receiver = <PyQt4.QtCore.QTimer object at 0x07974F18>, event = <PyQt4. tCore.QTimerEvent object at 0x07629FA8> ok test_search_next (test_plugins.test_search.InFile) ... Post-termination event: eceiver = <PyQt4.QtCore.QTimer object at 0x07629FA8>, event = <PyQt4.QtCore.QTi erEvent object at 0x07CE6E40> ok test_search_previous (test_plugins.test_search.InFile) ... Post-termination eve t: receiver = <PyQt4.QtCore.QTimer object at 0x0796E4B0>, event = <PyQt4.QtCore QTimerEvent object at 0x0796EBB8> ok test_select_and_search (test_plugins.test_search.InFile) ... Post-termination e ent: receiver = <PyQt4.QtCore.QTimer object at 0x0796EBB8>, event = <PyQt4.QtCo e.QTimerEvent object at 0x034BD198> ok test_select_and_search_multiline (test_plugins.test_search.InFile) ... Post-ter ination event: receiver = <PyQt4.QtCore.QTimer object at 0x034BD198>, event = < yQt4.QtCore.QTimerEvent object at 0x0775B3D8> ok test_type_and_search (test_plugins.test_search.InFile) ... Post-termination eve t: receiver = <PyQt4.QtCore.QTimer object at 0x0775B3D8>, event = <PyQt4.QtCore QTimerEvent object at 0x07064E88> ok test_whole_word (test_plugins.test_search.InFile) ... Post-termination event: r ceiver = <PyQt4.QtCore.QTimer object at 0x07064E88>, event = <PyQt4.QtCore.QTim rEvent object at 0x0760C540> ok test_1 (test_plugins.test_search.ReplaceInDirectory) ... Post-termination event receiver = <PyQt4.QtCore.QTimer object at 0x070625D0>, event = <PyQt4.QtCore.Q imerEvent object at 0x0775B3D8> ok test_action_enabled (test_plugins.test_workspace_actions.Rename) ... ok test_dev_null (test_plugins.test_workspace_actions.Rename) ... skipped 'require Linux' test_dev_null_os_fail (test_plugins.test_workspace_actions.Rename) ... skipped requires Linux' test_os_fail (test_plugins.test_workspace_actions.Rename) ... skipped 'requires Linux' test_same_path (test_plugins.test_workspace_actions.Rename) ... skipped 'requir s Linux' test_success (test_plugins.test_workspace_actions.Rename) ... ok test_action_enabled (test_plugins.test_workspace_actions.ToggleExecutable) ... k test_action_text (test_plugins.test_workspace_actions.ToggleExecutable) ... ski ped 'requires Linux' test_modify_flags (test_plugins.test_workspace_actions.ToggleExecutable) ... sk pped 'requires Linux' test_os_fail (test_plugins.test_workspace_actions.ToggleExecutable) ... skipped 'requires Linux' test_1 (test_plugins.test_workspace_commands.Test) ... ok test_2 (test_plugins.test_workspace_commands.Test) ... Post-termination event: eceiver = <PyQt4.QtCore.QTimer object at 0x06982DF8>, event = <PyQt4.QtCore.QTi erEvent object at 0x07611540> ok test_3 (test_plugins.test_workspace_commands.Test) ... ok test_4 (test_plugins.test_workspace_commands.Test) ... ok test_5 (test_plugins.test_workspace_commands.Test) ... ok test_dark_cmd (test_widgets.test_termwidget.Formatting) ... ok test_dark_error (test_widgets.test_termwidget.Formatting) ... ok test_dark_hint (test_widgets.test_termwidget.Formatting) ... ok test_dark_out (test_widgets.test_termwidget.Formatting) ... ok test_light_cmd (test_widgets.test_termwidget.Formatting) ... ok test_light_error (test_widgets.test_termwidget.Formatting) ... ok test_light_hint (test_widgets.test_termwidget.Formatting) ... ok test_light_out (test_widgets.test_termwidget.Formatting) ... ok test_1 (test_widgets.test_termwidget.History) ... ok test_1 (test_widgets.test_termwidget.Lang) ... ok

FAIL: test_1 (test_plugins.test_repl.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\enki\tests\base.py", line 117, in wr pper self.fail('{} command not found. Can not run the test without it'.format(cm lineArgs[0])) AssertionError: scheme command not found. Can not run the test without it

FAIL: test_2 (test_plugins.test_repl.Test)

Traceback (most recent call last): File "C:\Users\bjones\Documents\enki_all\enki\tests\base.py", line 117, in wr pper self.fail('{} command not found. Can not run the test without it'.format(cm lineArgs[0])) AssertionError: sml command not found. Can not run the test without it


Ran 94 tests in 43.607s

FAILED (failures=2, skipped=8)

On Fri, Jan 24, 2014 at 10:34 AM, Bryan A. Jones bjones@ece.msstate.eduwrote:

Andrei,

Also, on Ubuntu 12.05, I now get consistent seg faults when running tests on qutepart master.

On Fri, Jan 24, 2014 at 9:30 AM, Bryan A. Jones < bjones@ece.msstate.edu>wrote:

Andrei,

Will do. A side note: on qutepart master, I get this, but only on Windows:

FAIL: test_1 (test_bracket_hlighter.Test)


Traceback (most recent call last): File

"C:\Users\bjones\Documents\enki_all\qutepart\tests\test_bracket_hlighter.

py", line 55, in test_1 [(4, 5, True), (31, 32, True)]) File

"C:\Users\bjones\Documents\enki_all\qutepart\tests\test_bracket_hlighter.

py", line 38, in _verify self.assertEqual(converted, expected) AssertionError: Lists differ: [(4, 5, True), (32, 33, True)] != [(4, 5, True), ( 31, 32, True)]

First differing element 1: (32, 33, True) (31, 32, True)

  • [(4, 5, True), (32, 33, True)] ? ----
  • [(4, 5, True), (31, 32, True)] ? ++++

Bryan

On Fri, Jan 24, 2014 at 12:21 AM, Andrei Kopats < notifications@github.com

wrote:

Hi

It's cool, that you saved this backtrace. It is quite difficult to reproduce such bugs, caused by timings and not predictable garbage collection.

I made a changes, which should fix this bug. But the bug doesn't reproduce for me. Could you please test the latest qutepart master?

— Reply to this email directly or view it on GitHub< https://github.com/hlamer/enki/pull/153#issuecomment-33200278> .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

—

Reply to this email directly or view it on GitHub< https://github.com/hlamer/enki/pull/153#issuecomment-33238543> .

— Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33285313 .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

andreikop commented 10 years ago

Hi

I did some investigation about this crashes and memory management, and even wrote an article about it. http://habrahabr.ru/post/210304/ (Don't know if Google Translate capable to translate it quite well) Now switching from theoretical to practical work.

PyQt timer is self-stopping, if it is a child of target object. In this case, when Qt deletes the target object, it deletes children, including the timer.

bjones1 commented 10 years ago

Andrei,

Neat article -- thanks. So, the problems occur when a Python slot is connected to a signal, the object containing that Python slot is garbage collected, then the signal is emitted? Meaning the correct behavior is always to manually disconnect a Python slot before it can be garbage collected? I'm assuming the common case is a QTimer.singleShot(time, pythonSlot) where pythonSlot gets garbage collected then the timer fires?

How do you make a timer the child of a Python slot, which (as I understand it) would prevent this problem?

On a side note, I speak Russian (my wife is from Kazakhstan -- her blog is at kazvik.blogspot.com) but read/write is poorly.

Bryan

On Tue, Jan 28, 2014 at 12:10 AM, Andrei Kopats notifications@github.comwrote:

Hi

I did some investigation about this crashes and memory management, and even wrote an article about it. http://habrahabr.ru/post/210304/ (Don't know if Google Translate capable to translate it quite well) Now switching from theoretical to practical work.

PyQt timer is self-stopping, if it is a child of target object. In this case, when Qt deletes the target object, it deletes children, including the timer.

Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33453696 .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

andreikop commented 10 years ago

Hi

So, the problems occur when a Python slot is

connected to a signal, the object containing that Python slot is garbage collected, then the signal is emitted

Not when Python object is garbadgecollected, but when C++ object is deleted by Qt.

  1. Python slot is connected to a signal
  2. Underlying C++ object is deleted by Qt. i.e. widget is deleted on window close
  3. Python slot is called
  4. Python slot tries to call dead C++ object

How do you make a timer the child of a Python slot, which (as I understand

it) would prevent this problem?

When QObject is deleted, it deletes its QObject children. So, if QTimer is a chlild of the target object, QTimer is deleted synchronously with the object. This strategy is used for qutepart.completer._CompletionList._closeIfNotUpdatedTimer

I fixed crash on Ubuntu 12.04 and brackethighlighter test fail on some slower systems.

Very nice family photos!

Andrei

On Tue, Jan 28, 2014 at 7:04 PM, bjones1 notifications@github.com wrote:

Andrei,

Neat article -- thanks. So, the problems occur when a Python slot is connected to a signal, the object containing that Python slot is garbage collected, then the signal is emitted? Meaning the correct behavior is always to manually disconnect a Python slot before it can be garbage collected? I'm assuming the common case is a QTimer.singleShot(time, pythonSlot) where pythonSlot gets garbage collected then the timer fires?

How do you make a timer the child of a Python slot, which (as I understand it) would prevent this problem?

On a side note, I speak Russian (my wife is from Kazakhstan -- her blog is at kazvik.blogspot.com) but read/write is poorly.

Bryan

On Tue, Jan 28, 2014 at 12:10 AM, Andrei Kopats <notifications@github.com

wrote:

Hi

I did some investigation about this crashes and memory management, and even wrote an article about it. http://habrahabr.ru/post/210304/ (Don't know if Google Translate capable to translate it quite well) Now switching from theoretical to practical work.

PyQt timer is self-stopping, if it is a child of target object. In this case, when Qt deletes the target object, it deletes children, including the timer.

Reply to this email directly or view it on GitHub< https://github.com/hlamer/enki/pull/153#issuecomment-33453696>

.

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33492429 .

andreikop commented 10 years ago

I had an idea on how to track down events that occur after core.term() and

pushed it. The results on Windows look helpful. I'm not sure how to print out what routine the timer would call, but it should be easy to set a breakpoint in the debugger then trace it or inspect it (I hope).

I executed tests on Windows, and now I don't have any error traces. Could you please check the latest enki and qutepart master?

On Wed, Jan 29, 2014 at 10:48 AM, Andrei Kopats hlamer@tut.by wrote:

Hi

So, the problems occur when a Python slot is

connected to a signal, the object containing that Python slot is garbage collected, then the signal is emitted

Not when Python object is garbadgecollected, but when C++ object is deleted by Qt.

  1. Python slot is connected to a signal
  2. Underlying C++ object is deleted by Qt. i.e. widget is deleted on window close
  3. Python slot is called
  4. Python slot tries to call dead C++ object

How do you make a timer the child of a Python slot, which (as I understand

it) would prevent this problem?

When QObject is deleted, it deletes its QObject children. So, if QTimer is a chlild of the target object, QTimer is deleted synchronously with the object. This strategy is used for qutepart.completer._CompletionList._closeIfNotUpdatedTimer

I fixed crash on Ubuntu 12.04 and brackethighlighter test fail on some slower systems.

Very nice family photos!

Andrei

On Tue, Jan 28, 2014 at 7:04 PM, bjones1 notifications@github.com wrote:

Andrei,

Neat article -- thanks. So, the problems occur when a Python slot is connected to a signal, the object containing that Python slot is garbage collected, then the signal is emitted? Meaning the correct behavior is always to manually disconnect a Python slot before it can be garbage collected? I'm assuming the common case is a QTimer.singleShot(time, pythonSlot) where pythonSlot gets garbage collected then the timer fires?

How do you make a timer the child of a Python slot, which (as I understand it) would prevent this problem?

On a side note, I speak Russian (my wife is from Kazakhstan -- her blog is at kazvik.blogspot.com) but read/write is poorly.

Bryan

On Tue, Jan 28, 2014 at 12:10 AM, Andrei Kopats <notifications@github.com

wrote:

Hi

I did some investigation about this crashes and memory management, and even wrote an article about it. http://habrahabr.ru/post/210304/ (Don't know if Google Translate capable to translate it quite well) Now switching from theoretical to practical work.

PyQt timer is self-stopping, if it is a child of target object. In this case, when Qt deletes the target object, it deletes children, including the timer.

Reply to this email directly or view it on GitHub< https://github.com/hlamer/enki/pull/153#issuecomment-33453696>

.

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33492429 .

bjones1 commented 10 years ago

Andrei,

Wow, much better -- thanks! Nice job. All tests pass with no errors traces both on Windows and Ubuntu 12.04.

Bryan

On Wed, Jan 29, 2014 at 10:47 AM, Andrei Kopats notifications@github.comwrote:

I had an idea on how to track down events that occur after core.term() and

pushed it. The results on Windows look helpful. I'm not sure how to print out what routine the timer would call, but it should be easy to set a breakpoint in the debugger then trace it or inspect it (I hope).

I executed tests on Windows, and now I don't have any error traces. Could you please check the latest enki and qutepart master?

On Wed, Jan 29, 2014 at 10:48 AM, Andrei Kopats hlamer@tut.by wrote:

Hi

So, the problems occur when a Python slot is

connected to a signal, the object containing that Python slot is garbage collected, then the signal is emitted

Not when Python object is garbadgecollected, but when C++ object is deleted by Qt.

  1. Python slot is connected to a signal
  2. Underlying C++ object is deleted by Qt. i.e. widget is deleted on window close
  3. Python slot is called
  4. Python slot tries to call dead C++ object

How do you make a timer the child of a Python slot, which (as I understand

it) would prevent this problem?

When QObject is deleted, it deletes its QObject children. So, if QTimer is a chlild of the target object, QTimer is deleted synchronously with the object. This strategy is used for qutepart.completer._CompletionList._closeIfNotUpdatedTimer

I fixed crash on Ubuntu 12.04 and brackethighlighter test fail on some slower systems.

Very nice family photos!

Andrei

On Tue, Jan 28, 2014 at 7:04 PM, bjones1 notifications@github.com wrote:

Andrei,

Neat article -- thanks. So, the problems occur when a Python slot is connected to a signal, the object containing that Python slot is garbage collected, then the signal is emitted? Meaning the correct behavior is always to manually disconnect a Python slot before it can be garbage collected? I'm assuming the common case is a QTimer.singleShot(time, pythonSlot) where pythonSlot gets garbage collected then the timer fires?

How do you make a timer the child of a Python slot, which (as I understand it) would prevent this problem?

On a side note, I speak Russian (my wife is from Kazakhstan -- her blog is at kazvik.blogspot.com) but read/write is poorly.

Bryan

On Tue, Jan 28, 2014 at 12:10 AM, Andrei Kopats < notifications@github.com

wrote:

Hi

I did some investigation about this crashes and memory management, and even wrote an article about it. http://habrahabr.ru/post/210304/ (Don't know if Google Translate capable to translate it quite well) Now switching from theoretical to practical work.

PyQt timer is self-stopping, if it is a child of target object. In this case, when Qt deletes the target object, it deletes children, including the timer.

Reply to this email directly or view it on GitHub< https://github.com/hlamer/enki/pull/153#issuecomment-33453696>

.

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

  • 1 Tim. 6:14b-15 (The Message)

Reply to this email directly or view it on GitHub< https://github.com/hlamer/enki/pull/153#issuecomment-33492429> .

Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/pull/153#issuecomment-33603257 .

Bryan A. Jones, Ph.D. Associate Professor Department of Electrical and Computer Engineering 231 Simrall / PO Box 9571 Mississippi State University Mississippi state, MS 39762 http://www.ece.msstate.edu/~bjones bjones AT ece DOT msstate DOT edu voice 662-325-3149 fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on time, his arrival guaranteed by the Blessed and Undisputed Ruler, High King, High God.

bjones1 commented 10 years ago

I'm closing this -- I'd forgotten it was still open. Your fixes have addressed all these issues.