enthought / enthought/traitsui
Crash in PyQt when launching the FileEditor's dialog from a TableEditor on OSX 10.11
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
I'm getting a crash in PyQt4 when I use a FileEditor in an ObjectColumn in a TableEditor. The OSX file picker flashes briefly, and then python.exe crashes.
It only seems to happen in OSX 10.11; 10.7, 10.8 and 10.10 work fine.
The following code reproduces the problem:
```
from traits.api import File, Str, HasTraits, List
from traitsui.api import View, Item, TableEditor, ObjectColumn
class _Control(HasTraits):
channel = Str
file = File
class Controls(HasTraits):
controls = List(_Control)
def default_traits_view(self):
return View(Item('controls',
editor=TableEditor(
columns =
[ObjectColumn(name = 'channel'),
ObjectColumn(name = 'file')])))
c = Controls(controls = [_Control()])
c.configure_traits()
```
When I use faulthandler to give me a backtrace, I get the following:
Fatal Python error: Segmentation fault
Current thread 0x00007fff76a24000 (most recent call first):
File "/Users/Allen/anaconda2/lib/python2.7/site-packages/traitsui/qt4/file_editor.py", line 127 in show_file_dialog
File "/Users/Allen/anaconda2/lib/python2.7/site-packages/pyface/util/guisupport.py", line 137 in start_event_loop_qt4
File "/Users/Allen/anaconda2/lib/python2.7/site-packages/traitsui/qt4/view_application.py", line 136 in **init**
File "/Users/Allen/anaconda2/lib/python2.7/site-packages/traitsui/qt4/view_application.py", line 83 in view_application
File "/Users/Allen/anaconda2/lib/python2.7/site-packages/traitsui/qt4/toolkit.py", line 212 in view_application
File "/Users/Allen/anaconda2/lib/python2.7/site-packages/traits/has_traits.py", line 2386 in configure_traits
File "test.py", line 24 in
Segmentation fault: 11
Launching the QFileDialog from other contexts seems to work: ie, in the above example, if I say `_Control().configure_traits()` and launch the file picker things work fine.
Relevant versions:
Python 2.7.12 (Anaconda x86_64)
traits 4.5.0
traitsui and pyface 5.1.0
pyqt4 4.11.4
Qt4 4.8.7
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.