Bug#844601: python-spyder: "from spyder.plugins.editor import Editor" hangs the machine

Dmitry Shachnev mitya57 at debian.org
Fri Nov 25 15:18:50 UTC 2016


Hi all, and sorry for the late response.

On Sat, Nov 19, 2016 at 11:48:51AM -0300, Lisandro Damián Nicanor Pérez Meyer wrote:
> I'm CCing the pyqt5 maintainer and expert. Python is not my realm really.

The problem with python-spyder is that it tries to use Qt widgets without a
QApplication instance. If I construct a QApplication, and then try to import
the editor module, it works fine.

I think the Python traceback is more helpful here than a C++ stack trace:

$ python3 -X faulthandler -c "import spyder.plugins.editor"
Fatal Python error: Segmentation fault

Current thread 0x00007f56650a9700 (most recent call first):
  File "/usr/lib/python3/dist-packages/qtawesome/iconic_font.py", line 200 in load_font
  File "/usr/lib/python3/dist-packages/qtawesome/iconic_font.py", line 168 in __init__
  File "/usr/lib/python3/dist-packages/qtawesome/__init__.py", line 36 in _instance
  File "/usr/lib/python3/dist-packages/qtawesome/__init__.py", line 153 in load_font
  File "/usr/lib/python3/dist-packages/spyder/utils/icon_manager.py", line 257 in icon
  File "/usr/lib/python3/dist-packages/spyder/plugins/runconfig.py", line 445 in RunConfigPage
  File "/usr/lib/python3/dist-packages/spyder/plugins/runconfig.py", line 440 in <module>
[...]

Line 200 of iconic_font.py is:

  id_ = QFontDatabase.addApplicationFont(os.path.join(directory, ttf_filename))

The QFontDatabase method will definitely not work properly without a
Q(Gui)Application instance.

--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20161125/ad35dc3c/attachment-0001.sig>


More information about the debian-science-maintainers mailing list