Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT5 QApplication Crashes When There is No Monitor
Forum Updated to NodeBB v4.3 + New Features

QT5 QApplication Crashes When There is No Monitor

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    simy307
    wrote on 24 May 2013, 00:27 last edited by
    #1

    I am running a Qt Desktop Application on CentOS 6.4 with Qt 5 Libraries.

    When I start the application from VNC/Teamviewer, as some of our servers do not have monitors, the application crashes. 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.

    My question is: Is there a way to get around this? I have tried editing the Qt5 library files but that does nothing (acts like nothing has changed at all even when I delete the function call). I need to keep the GUI, as I log on constantly to the headless servers with vnc/teamviewer to view graphical meters and output on the GUI; and also because there are servers with monitors that it must run on graphically.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on 24 May 2013, 09:45 last edited by
      #2

      Could you please "file a bug report":https://bugreports.qt-project.org/ about this? It should really get some developer attention!

      1 Reply Last reply
      0
      • S Offline
        S Offline
        simy307
        wrote on 24 May 2013, 22:18 last edited by
        #3

        Thank you for the suggestion! I have just done so. "Bug Report":https://bugreports.qt-project.org/browse/QTBUG-31354

        1 Reply Last reply
        0

        1/3

        24 May 2013, 00:27

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved