Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasional segfaults with image editor #1815

Closed
corranwebster opened this issue Feb 15, 2022 · 8 comments · Fixed by #1818
Closed

Occasional segfaults with image editor #1815

corranwebster opened this issue Feb 15, 2022 · 8 comments · Fixed by #1818
Milestone

Comments

@corranwebster
Copy link
Contributor

corranwebster commented Feb 15, 2022

Looks like the failure is always Windows, Python 3.6, PySide2.

Current thread 0x0000141c (most recent call first):
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\site-packages\traitsui\qt4\image_editor.py", line 120 in paintEvent
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\site-packages\traitsui\testing\_gui.py", line 37 in process_cascade_events
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\site-packages\traitsui\testing\tester\ui_tester.py", line 116 in create_ui
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\contextlib.py", line 88 in __exit__
  File "D:\a\traitsui\traitsui\integrationtests\test_all_examples.py", line 254 in replaced_configure_traits
  File "<string>", line 100 in <module>
  File "D:\a\traitsui\traitsui\integrationtests\test_all_examples.py", line 294 in run_file
  File "D:\a\traitsui\traitsui\integrationtests\test_all_examples.py", line 353 in test_run
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\case.py", line 605 in run
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\case.py", line 653 in __call__
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\suite.py", line 122 in run
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\suite.py", line 84 in __call__
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\suite.py", line 122 in run
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\suite.py", line 84 in __call__
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\suite.py", line 122 in run
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\suite.py", line 84 in __call__
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\runner.py", line 176 in run
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\main.py", line 256 in runTests
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\main.py", line 95 in __init__
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\unittest\__main__.py", line 18 in <module>
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\runpy.py", line 85 in _run_code
  File "D:\a\traitsui\traitsui\.edm\envs\traitsui-test-3.6-pyside2\lib\runpy.py", line 193 in _run_module_as_main
Command '['edm', 'run', '-e', 'traitsui-test-3.6-pyside2', '--', 'python', '-X', 'faulthandler', '-W', 'default', '-m', 'unittest', 'discover', '-v', 'D:\\a\\traitsui\\traitsui\\integrationtests']' returned non-zero exit status 4294967295.
Error: The process 'C:\Enthought\edm\edm.bat' failed with exit code 1
@corranwebster
Copy link
Contributor Author

I thought this was related to #1810, but it hasn't been merged yet. Not sure that the changes there will fix these errors, though.

@corranwebster
Copy link
Contributor Author

But it is likely related to #1807.

@corranwebster
Copy link
Contributor Author

This may not be resolved - still seeing this in PRs after this has been merged, although the PRs didn't directly include this.

@corranwebster
Copy link
Contributor Author

Re-opening - this is still happening.

@corranwebster
Copy link
Contributor Author

Hypothesis: this may be related to https://stackoverflow.com/questions/15021877/pyqt-showing-a-file-dialog-after-creating-a-pixmap-produces-a-segmentation-faul as we are going from array (copied) -> QImage -> QPixmap and nothing is keeping the QImage alive (or the array bytes it references). As a result, this may be a Pyface bug.

Still haven't reproduced.

@corranwebster
Copy link
Contributor Author

Yep, definitely an issue with a reference being dropped. This is the example that is failing:
image

@corranwebster
Copy link
Contributor Author

This looks like a Pyface issue with a straightforward fix. See enthought/pyface#1108 and enthought/pyface#1109.

I will leave this open until those are merged.

@corranwebster
Copy link
Contributor Author

The Pyface issue is dealt with and a new release has been made. Closing this issue.

If we continue to see issues after this we will re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant