Port from Qt 4 to Qt 5.1.1 : QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled



  • I am not a GUI developer, I am porting our code to Qt 5.1.1 It runs in the batch mode, but crashes in GUI. Please advise what do I need to change in the code.

    It crashes in the call to notify here:

    bool Application::notify(QObject* receiver, QEvent* qevent)
    {
    bool ret_value = true;
    try {
    ret_value = QApplication::notify(receiver, qevent);
    }

    The call stack is:

    (gdb)where
    #0 0x00007fffee963c80 in QOpenGLContext::shareGroup() const () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Gui.so.5
    #1 0x00007fffeeb804c6 in ?? () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Gui.so.5
    #2 0x00007fffeeb8060b in QOpenGLFunctions::initializeOpenGLFunctions() () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Gui.so.5
    #3 0x00007fffede3fe2e in QGL2PaintEngineEx::begin(QPaintDevice*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5OpenGL.so.5
    #4 0x00007fffeeb0b967 in QPainter::begin(QPaintDevice*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Gui.so.5
    #5 0x00007fffee4ad0a9 in QGraphicsView::paintEvent(QPaintEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #6 0x00007fffee1d1740 in QWidget::event(QEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #7 0x00007fffee2b8d06 in QFrame::event(QEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #8 0x00007fffee4ae3bb in QGraphicsView::viewportEvent(QEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #9 0x00007fffef108c6d in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Core.so.5
    #10 0x00007fffee19ab3f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #11 0x00007fffee19e006 in QApplication::notify(QObject*, QEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #12 0x00000000018dccee in azui::Application::notify (this=0x2eba040, receiver=0x4ad4330, qevent=0x7fffffffccd0) at /home/zach/p5/arptop/arp/ui5/azmain/azmain.cpp:390
    #13 0x00007fffef108a44 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Core.so.5
    #14 0x00007fffee1ce61b in ?? () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #15 0x00007fffee1a2c18 in QWidgetPrivate::repaint_sys(QRegion const&) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #16 0x00007fffee1f2778 in ?? () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #17 0x00007fffee19ab74 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #18 0x00007fffee19e006 in QApplication::notify(QObject*, QEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Widgets.so.5
    #19 0x00000000018dccee in azui::Application::notify (this=0x2eba040, receiver=0x4b5c140, qevent=0x7fffffffd5c0) at /home/zach/p5/arptop/arp/ui5/azmain/azmain.cpp:390
    #20 0x00007fffef108a44 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Core.so.5
    #21 0x00007fffee92eec5 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Gui.so.5
    #22 0x00007fffee9373fd in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Gui.so.5
    #23 0x00007fffee920568 in QWindowSystemInterface::sendWindowSystemEventsImplementation(QFlagsQEventLoop::ProcessEventsFlag) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Gui.so.5
    #24 0x00007fffe08633d0 in ?? () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/stow/qt-everywhere-opensource-src-5.1.1/plugins/platforms/libqxcb.so
    #25 0x00007fffef10780b in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Core.so.5
    #26 0x00007fffef10b82e in QCoreApplication::exec() () from /AZ/x86_64/kernel-3.2.0-25-virtual/glibc-2.15/2013-09-19-12.16.39/lib/libQt5Core.so.5
    #27 0x00000000018dc4b5 in azui::Arp::start_gui (this=0x2efe000) at /home/zach/p5/arptop/arp/ui5/azmain/azmain.cpp:301
    #28 0x00000000018db0a8 in azui::Arp::run (this=0x2efe000, argc=15, argv=0x7fffffffd9d8) at /home/zach/p5/arptop/arp/ui5/azmain/azmain.cpp:100
    #29 0x00000000018dac74 in main (argc=15, argv=0x7fffffffd9d8) at /home/zach/p5/arptop/arp/ui5/azmain/azmain.cpp:48

    Help appreciated, thanks, Zach.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.