Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 5.9.4 OpenGL examples crash
Forum Updated to NodeBB v4.3 + New Features

Qt 5.9.4 OpenGL examples crash

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
19 Posts 3 Posters 6.9k Views 2 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #5

    Did you compare the sources of this example in both versions of Qt ? Is it he same code ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fatih.erol
      wrote on last edited by
      #6

      The source code for qtbase/examples/opengl/contextinfo are very similar in 5.3.2 and 5.9.4. The latter has some command line arguments, and minor fixes.

      Can the issue be related to existence of /usr/include/drm directory during compilation?
      I am asking, because I have seen that, while packaging ArchLinux linux-api-headers , /usr/include/drm is removed:

      # use headers from libdrm
      rm -r "$pkgdir/usr/include/drm"
      

      During the compilation of contextinfo example, 5.9.4 has an extra /usr/include/libdrm include path, while 5.3.2 does not.

      0_1519228748222_2495b3aa-f2a9-4148-b31e-47645878b7a9-image.png

      Here is the sorted output of ldd contextinfo for 5.9.4 on the left and 5.3.2 on the right (both link libdrm):

      0_1519227115753_a224721b-6f28-4c6b-b43f-02742b03bf42-image.png

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #7

        Do you mean that the cross-compiling environment changed between your 5.3 and 5.9 builds ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • F Offline
          F Offline
          fatih.erol
          wrote on last edited by fatih.erol
          #8

          yes. well, 5.3.2 package is taken off the official site, so, it is most likely not cross-compiled. 5.9.4 is cross-built by me.

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #9

            Official 5.3.2 are in Qt archive: https://download.qt.io/archive/qt/5.3/5.3.2/

            (Z(:^

            1 Reply Last reply
            0
            • F Offline
              F Offline
              fatih.erol
              wrote on last edited by
              #10

              sorry. i meant Qt 5.3.2 package comes from Arch Linux official site, so, it is built and prepared by someone else using respective tools on a i686 development system or chroot environment.

              I downloaded Qt 5.9.4 from download.qt.io, and cross-compiled it myself.

              1 Reply Last reply
              0
              • F Offline
                F Offline
                fatih.erol
                wrote on last edited by fatih.erol
                #11

                I wonder whether these are relevant:
                https://bugreports.qt.io/browse/QTBUG-64587
                https://bugreports.qt.io/browse/QTBUG-59636

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #12

                  The first one is not implemented and the second is fixed for 5.9.5. You can already test that by building from git.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • F Offline
                    F Offline
                    fatih.erol
                    wrote on last edited by
                    #13

                    Update on this issue:

                    • Qt 5.3.2 built on the 32-bit system : opengl examples run successfully.
                    • Qt 5.9.3 built on the 32-bit system : legacy opengl examples run successfully. cube/hellogl2/texture crashes.
                    • Qt 5.9.4 cross-compiled for the 32-bit system : legacy opengl examples run successfully. cube/hellogl2/texture crashes.
                    • Qt 5.10.1 cross-compiled for the 32-bit system : legacy opengl examples run successfully. cube/hellogl2/texture crashes.

                    I haven't managed to cross-compile 5.3.2 yet, to confirm that cross-compilation works properly.
                    Here is the stack trace from the crashed cube example application for Qt 5.9.4:

                    (gdb) run
                    Starting program: /home/root/opengl/cube/cube 
                    warning: Could not load shared library symbols for linux-gate.so.1.
                    Do you need "set solib-search-path" or "set sysroot"?
                    [Thread debugging using libthread_db enabled]
                    Using host libthread_db library "/usr/lib/libthread_db.so.1".
                    [New Thread 0xb46bab40 (LWP 585)]
                    pci id for fd 6: 8086:8108, driver (null)
                    
                    Program received signal SIGSEGV, Segmentation fault.
                    0xb38ce7df in ?? () from /lib/libEMGDOGL.so
                    (gdb) thread apply all backtrace
                    
                    Thread 2 (Thread 0xb46bab40 (LWP 585)):
                    #0  0xb7ffd428 in __kernel_vsyscall ()
                    #1  0xb6a963fb in poll () from /usr/lib/libc.so.6
                    #2  0xb4df8f1d in ?? () from /usr/lib/libxcb.so.1
                    #3  0xb4dfaf6b in xcb_wait_for_event () from /usr/lib/libxcb.so.1
                    #4  0xb4993703 in ?? () from /usr/lib/libQt5XcbQpa.so.5
                    #5  0xb6ddcfb1 in ?? () from /usr/lib/libQt5Core.so.5
                    #6  0xb6cd61a6 in start_thread () from /usr/lib/libpthread.so.0
                    #7  0xb6aa0e9e in clone () from /usr/lib/libc.so.6
                    
                    Thread 1 (Thread 0xb4c4c740 (LWP 581)):
                    #0  0xb38ce7df in ?? () from /lib/libEMGDOGL.so
                    #1  0xb38cee9f in ?? () from /lib/libEMGDOGL.so
                    #2  0xb38cdbf1 in ?? () from /lib/libEMGDOGL.so
                    #3  0xb38cf44b in ?? () from /lib/libEMGDOGL.so
                    #4  0xb38cf9d8 in ?? () from /lib/libEMGDOGL.so
                    #5  0xb38d04e8 in ?? () from /lib/libEMGDOGL.so
                    #6  0xb385cc81 in ?? () from /lib/libEMGDOGL.so
                    #7  0xb38e7b76 in pvroglDrawArrays () from /lib/libEMGDOGL.so
                    #8  0xb76ad8b7 in ?? () from /usr/lib/libQt5Gui.so.5
                    #9  0xb764d379 in ?? () from /usr/lib/libQt5Gui.so.5
                    #10 0xb764dadc in QPlatformBackingStore::composeAndFlush(QWindow*, QRegion const&, QPoint const&, QPlatformTextureList*, QOpenGLContext*, bool) () from /usr/lib/libQt5Gui.so.5
                    #11 0xb49b0686 in ?? () from /usr/lib/libQt5XcbQpa.so.5
                    #12 0xb79ae3c7 in ?? () from /usr/lib/libQt5Widgets.so.5
                    #13 0xb79afa09 in ?? () from /usr/lib/libQt5Widgets.so.5
                    #14 0xb79b104d in ?? () from /usr/lib/libQt5Widgets.so.5
                    #15 0xb79b17f2 in ?? () from /usr/lib/libQt5Widgets.so.5
                    #16 0xb79cbd37 in QWidgetPrivate::syncBackingStore(QRegion const&) () from /usr/lib/libQt5Widgets.so.5
                    #17 0xb7a012ea in ?? () from /usr/lib/libQt5Widgets.so.5
                    #18 0xb7a01e1a in ?? () from /usr/lib/libQt5Widgets.so.5
                    #19 0xb79a0f4a in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
                    #20 0xb79a8d2c in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
                    #21 0xb6fa396c in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
                    #22 0xb73690e2 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from /usr/lib/libQt5Gui.so.5
                    #23 0xb7369df9 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/libQt5Gui.so.5
                    #24 0xb7343cec in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
                    #25 0xb4a0298e in ?? () from /usr/lib/libQt5XcbQpa.so.5
                    #26 0xb5019ba4 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
                    #27 0xb5019ec9 in ?? () from /usr/lib/libglib-2.0.so.0
                    #28 0xb5019f96 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
                    #29 0xb6ff64b4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
                    #30 0xb4a02b61 in ?? () from /usr/lib/libQt5XcbQpa.so.5
                    #31 0xb6fa13a6 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
                    #32 0xb6fa17fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
                    #33 0xb6faa796 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
                    #34 0xb735f1f1 in QGuiApplication::exec() () from /usr/lib/libQt5Gui.so.5
                    #35 0xb79a0ea4 in QApplication::exec() () from /usr/lib/libQt5Widgets.so.5
                    #36 0x0804ad69 in main ()
                    (gdb) continue
                    Continuing.
                    [Thread 0xb46bab40 (LWP 585) exited]
                    
                    Program terminated with signal SIGSEGV, Segmentation fault.
                    The program no longer exists.
                    (gdb)
                    
                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #14

                      Do you also have that with 5.9.5/5.11 Beta ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        fatih.erol
                        wrote on last edited by
                        #15

                        I haven't tested with 5.9.5 and 5.11, checked only the official releases under https://download.qt.io.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #16

                          My bad, I'm a bit early for the 5.9.5 release which should happen during March.

                          The beta can be downloaded from the development_releases subfolder.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • F Offline
                            F Offline
                            fatih.erol
                            wrote on last edited by
                            #17

                            I tried building 5.11.0-beta1, but it fails (I guess, since I have an older mesa-libgl):

                            qeglfskmsgbmwindow.cpp: In member function ‘virtual void QEglFSKmsGbmWindow::resetSurface()’:
                            qeglfskmsgbmwindow.cpp:58:5: error: ‘PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC’ was not declared in this scope
                                 PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC createPlatformWindowSurface = nullptr;
                                 ^
                            qeglfskmsgbmwindow.cpp:61:9: error: ‘createPlatformWindowSurface’ was not declared in this scope
                                     createPlatformWindowSurface = reinterpret_cast<PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC>(
                                     ^
                            qeglfskmsgbmwindow.cpp:61:56: error: ‘PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC’ does not name a type
                                     createPlatformWindowSurface = reinterpret_cast<PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC>(
                                                                                    ^
                            qeglfskmsgbmwindow.cpp:65:9: error: ‘createPlatformWindowSurface’ was not declared in this scope
                                 if (createPlatformWindowSurface) {
                                     ^
                            Makefile:2994: recipe for target '.obj/qeglfskmsgbmwindow.o' failed
                            make[2]: *** [.obj/qeglfskmsgbmwindow.o] Error 1
                            
                            1 Reply Last reply
                            0
                            • F Offline
                              F Offline
                              fatih.erol
                              wrote on last edited by
                              #18

                              well, it looks like this is an EMGD<=>mesa<=>Qt issue.

                              • EMGD + mesa 10.1.0 + Qt 5.3.2: OK
                              • EMGD + mesa 10.1.0 + Qt 5.9.4: openGL examples cube/hellogl2/textures crash
                              • EMGD + mesa 10.3.0 + Qt 5.9.4: openGL examples cube/hellogl2/textures run, but EMGD hardware acceleration fails:
                              libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/emgd_dri.so
                              libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/emgd_dri.so
                              libGL: dlopen /usr/lib/xorg/modules/dri/emgd_dri.so failed (/usr/lib/xorg/modules/dri/emgd_dri.so: undefined symbol: _glapi_Dispatch)
                              libGL error: unable to load driver: emgd_dri.so
                              libGL error: driver pointer missing
                              libGL error: failed to load driver: emgd
                              libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/swrast_dri.so
                              libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/swrast_dri.so
                              libGL: Can't open configuration file /root/.drirc: No such file or directory.
                              libGL: Can't open configuration file /root/.drirc: No such file or directory.
                              

                              Any idea on how to get EMGD working with mesa 10.3.0?

                              # ldd -r /usr/lib/xorg/modules/dri/emgd_dri.so 
                              ldd: warning: you do not have execution permission for `/usr/lib/xorg/modules/dri/emgd_dri.so'
                              	linux-gate.so.1 (0xb775f000)
                              	libm.so.6 => /lib/libm.so.6 (0xb74d1000)
                              	libpthread.so.0 => /lib/libpthread.so.0 (0xb74b5000)
                              	libexpat.so.1 => /lib/libexpat.so.1 (0xb748c000)
                              	libdl.so.2 => /lib/libdl.so.2 (0xb7487000)
                              	libdrm.so.2 => /lib/libdrm.so.2 (0xb7478000)
                              	libEMGDOGL.so => /lib/libEMGDOGL.so (0xb71c7000)
                              	libEMGD2d.so => /lib/libEMGD2d.so (0xb71bf000)
                              	libstdc++.so.6 => /lib/libstdc++.so.6 (0xb70c9000)
                              	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb70ac000)
                              	libc.so.6 => /lib/libc.so.6 (0xb6ef4000)
                              	/usr/lib/ld-linux.so.2 (0xb7760000)
                              	libemgdsrv_um.so => /lib/libemgdsrv_um.so (0xb6ed1000)
                              undefined symbol: _glapi_Dispatch	(/usr/lib/xorg/modules/dri/emgd_dri.so)
                              undefined symbol: _glapi_Context	(/usr/lib/xorg/modules/dri/emgd_dri.so)
                              undefined symbol: _glapi_get_dispatch_table_size	(/usr/lib/xorg/modules/dri/emgd_dri.so)
                              undefined symbol: _glapi_get_dispatch	(/usr/lib/xorg/modules/dri/emgd_dri.so)
                              undefined symbol: _glapi_get_context	(/usr/lib/xorg/modules/dri/emgd_dri.so)
                              undefined symbol: _glapi_add_dispatch	(/usr/lib/xorg/modules/dri/emgd_dri.so)
                              undefined symbol: _glapi_set_context	(/usr/lib/xorg/modules/dri/emgd_dri.so)
                              undefined symbol: _glapi_set_dispatch	(/usr/lib/xorg/modules/dri/emgd_dri.so)
                              
                              # strings -a /usr/lib/libglapi.so | grep _glapi_Dispatch
                              _glapi_Dispatch
                              
                              1 Reply Last reply
                              0
                              • F Offline
                                F Offline
                                fatih.erol
                                wrote on last edited by fatih.erol
                                #19

                                so, any suggestions on how to make EMGD + mesa 10.1.0 + Qt 5.9.4 work?
                                Qt 5.3.2 works with the same combination.
                                When Qt 5.3.2 qtbase/examples/opengl is built against Qt 5.9.4, they work as well, except 'stereo buffers' in contextinfo example.
                                When Qt 5.9.4 qtbase/examples/opengl is built against Qt 5.9.4, examples such as cube, textures crash, and 'stereo buffers' in contextinfo fails as well.

                                1 Reply Last reply
                                0

                                • Login

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