Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0, 5.2.0
-
None
-
CentOS 6.4 or 6.5, Qt 5.02 or 5.2.0, Qt Creator 2.7.1 or 3.0.0
Description
When I start the application on a headless machine, as some of our servers do not have monitors, the application crashes. I use teamviewer/vnc to graphically access these servers. Starting from:
QApplication a(argc, argv);
I have tracked this down to a core file call qxcbconnection.cpp and the line:
xcb_create_window(m_connection, XCB_COPY_FROM_PARENT, m_connectionEventListener, m_screens.at(0)->root(), 0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_ONLY, m_screens.at(0)->screen()->root_visual, 0, 0);
The problem is, if there is no monitor connected, then m_screens is empty, and therefore causes an “index out of bounds” error.
Attachments
Issue Links
- relates to
-
QTBUG-31389 "QXcbConnection: Failed to get the primary output of the screen" when launching applications when using X forwarding
- Closed
-
QTBUG-32973 Windows disappear when X monitor is disconnected
- Closed
-
QTCREATORBUG-11173 Crashes when using through X11 forwarding
- Closed