QtCreator crashing when opening a .ui file (or attempting to access anything related to designer)
-
Hello.
QtCreator has recently started crashing when attempting to open a .ui file in designer. I am not sure what has changed on my system to cause the problem. I have tried reinstalling qtcreator, upgrading to the latest version, making sure it uses the libs that it ships with, but to no avail. Any help would be appreciated. The following is output to the terminal when QtCreator aborts:
nativeResourceForScreen: null screen
nativeResourceForScreen: null screen
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted
Cannot create window: no screens available
Abort -
Hi and welcome to devnet,
Do you have the same thing happening if you open your .ui file with Qt's Desginer (the standalone version) ?
-
Hello. Thanks for the response.
There evidently is no separate designer installed with the binary installer of QtCreator which I downloaded from qt-project.org. However, the project I am working on does build Qt from source and this does build a copy of designer which does load.
Note that the same crash occurs if I try to modify any designer related options in the Tools->Options->Designer section in QtCreator.
-
Qt Creator 3.6 ?
-
Yes sir.
Initially I was using a previous version (3.5.1 if I recall) where the problem first occurred and I upgraded to see if it would fix it. I had a similar problem once before several weeks ago, although I do not know if the error printed to the terminal was the same. A simple reinstall of my current version fixed it at that time. However this time niether reinstalling nor upgrading has helped.
-
Can you start Qt Creator through gdb to see exactly where it fails ?
-
Here are partial backtaces from 4 separate instances of the crash. Each one is reproduced in a different way. Note that one of them is a SIGSEGV and the other 3 are SIGABRT. The system is running KDE on OpenSUSE 31.2 with latest patches applied as of the current date.
[Mouse over the "+" button next to the "Device Prot.." on the "Embedded Designer" tab in Tools->Options->Designer produces the following]
Program received signal SIGSEGV, Segmentation fault. 0x00007ffff666d77d in QScreen::virtualSiblings() const () from /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Gui.so.5 (gdb) bt #0 0x00007ffff666d77d in QScreen::virtualSiblings() const () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Gui.so.5 #1 0x00007ffff6f17df6 in QDesktopWidget::isVirtualDesktop() const () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #2 0x00007ffff6ee61f9 in () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #3 0x00007ffff6ee6362 in () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #4 0x00007ffff6ee698b in QToolTip::showText(QPoint const&, QString const&, QWidget*, QRect const&, int) () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #5 0x00007ffff6f0170c in QWidget::event(QEvent*) () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #6 0x00007ffff707bdf9 in QToolButton::event(QEvent*) () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #7 0x00007ffff6ec04cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
[Clicking the "Device Prot.." dropdown on the "Embedded Designer" tab in Tools->Options->Designer produces the following]
Program received signal SIGABRT, Aborted. 0x00007ffff47d5187 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff47d5187 in raise () at /lib64/libc.so.6 #1 0x00007ffff47d6538 in abort () at /lib64/libc.so.6 #2 0x00007ffff594613e in () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Core.so.5 #3 0x00007ffff664c3ac in QWindowPrivate::init() () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Gui.so.5 #4 0x00007ffff6f1a4cc in () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #5 0x00007ffff6eedca8 in QWidgetPrivate::createTLSysExtra() () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #6 0x00007ffff6ef5e1c in QWidgetPrivate::create_sys(unsigned long long, bool, bool) () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #7 0x00007ffff6ef4f09 in QWidget::create(unsigned long long, bool, bool) () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #8 0x00007ffff6f00daa in QWidget::setVisible(bool) () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5 #9 0x00007ffff6fd64e7 in QComboBox::showPopup() () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Widgets.so.5
[Loading a .ui file produces the following]
Program received signal SIGABRT, Aborted. 0x00007ffff47d5187 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff47d5187 in raise () at /lib64/libc.so.6 #1 0x00007ffff47d6538 in abort () at /lib64/libc.so.6 #2 0x00007ffff594613e in () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Core.so.5 #3 0x00007ffff664c3ac in QWindowPrivate::init() () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Gui.so.5 #4 0x00007fff6a05b339 in QQuickWindow::QQuickWindow(QQuickRenderControl*) (this=0x3c1ea70, control=0x3c1a580) at items/qquickwindow.cpp:1100 #5 0x00007fff6ad9a359 in QQuickWidgetPrivate::init(QQmlEngine*) (this=0x3c220e0, e=0x0) at qquickwidget.cpp:81 #6 0x00007fff6ad9b334 in QQuickWidget::QQuickWidget(QWidget*) (this=0x3973160, parent=0x0) at qquickwidget.cpp:360 #7 0x00007fff6afa90fb in QQuickWidgetPlugin::createWidget(QWidget*) (this=0x380a200, parent=0x0) at qquickwidget_plugin.cpp:88 #8 0x00007fffc96d3d36 in qdesigner_internal::WidgetFactory::createCustomWidget(QString const&, QWidget*, bool*) const () at /opt/qtcreator-3.6.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Designer.so.5 #9 0x00007fffc96d45bd in qdesigner_internal::WidgetFactory::createWidget(QString const&, QWidget*) const () at /opt/qtcreator-3.6.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Designer.so.5 #10 0x00007fffc96db5df in qdesigner_internal::WidgetDataBase::defaultPropertyValues(QString const&) () at /opt/qtcreator-3.6.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Designer.so.5 #11 0x00007fffc96db7b1 in qdesigner_internal::WidgetDataBase::grabDefaultPropertyValues() () at /opt/qtcreator-3.6.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Designer.so.5
[Attempting to create a new Qt Form class produces the following]
Program received signal SIGABRT, Aborted. 0x00007ffff47d5187 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff47d5187 in raise () at /lib64/libc.so.6 #1 0x00007ffff47d6538 in abort () at /lib64/libc.so.6 #2 0x00007ffff594613e in () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Core.so.5 #3 0x00007ffff664c3ac in QWindowPrivate::init() () at /opt/qtcreator-3.6.0/bin/../lib/Qt/lib/libQt5Gui.so.5 #4 0x00007fff61635339 in QQuickWindow::QQuickWindow(QQuickRenderControl*) (this=0x44f5720, control=0x44f1230) at items/qquickwindow.cpp:1100 #5 0x00007fff62374359 in QQuickWidgetPrivate::init(QQmlEngine*) (this=0x44f8d90, e=0x0) at qquickwidget.cpp:81 #6 0x00007fff62375334 in QQuickWidget::QQuickWidget(QWidget*) (this=0x424b310, parent=0x0) at qquickwidget.cpp:360 #7 0x00007fff625830fb in QQuickWidgetPlugin::createWidget(QWidget*) (this=0x40e23a0, parent=0x0) at qquickwidget_plugin.cpp:88 #8 0x00007fffc9650d36 in qdesigner_internal::WidgetFactory::createCustomWidget(QString const&, QWidget*, bool*) const () at /opt/qtcreator-3.6.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Designer.so.5 #9 0x00007fffc96515bd in qdesigner_internal::WidgetFactory::createWidget(QString const&, QWidget*) const () at /opt/qtcreator-3.6.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Designer.so.5 #10 0x00007fffc96585df in qdesigner_internal::WidgetDataBase::defaultPropertyValues(QString const&) () at /opt/qtcreator-3.6.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Designer.so.5 #11 0x00007fffc96587b1 in qdesigner_internal::WidgetDataBase::grabDefaultPropertyValues() () at /opt/qtcreator-3.6.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Designer.so.5 #12 0x00007fffca05aa09 in () at /opt/qtcreator-3.6.0/lib/qtcreator/plugins/libDesigner.so
-
Did you had any update recently concerning e.g. your graphic card driver ?
-
Recently some updates to OpenSuse were applied. I did reinstall my graphics driver after that. I then upgraded the driver after that. It may be that QtCreator did not work on the older driver either, but I can't recall now. I am about to try a beta of the Nvidia driver to see if that helps. So far Qt Creator is the only program that I am aware of that has no worked recently.
-
Really strange. You should take a look at the bug report system to see if it's something known. If not please consider opening a new one providing a minimal compilable example that reproduce this behavior with all the details you can give about your current system (distribution version, driver, graphic card type etc.)