Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt5.6: DirectFB segmentation fault on Broadcom BCM7231B2
QtWS25 Last Chance

Qt5.6: DirectFB segmentation fault on Broadcom BCM7231B2

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
15 Posts 2 Posters 5.3k Views
  • 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.
  • D Offline
    D Offline
    debian
    wrote on 9 Nov 2016, 10:16 last edited by
    #1

    Hello!
    I try use Qt5.6.1 on board with Broadcom BCM7231B2 CPU, I found description for Qt4.7 (https://wiki.qt.io/Broadcom97420). I modify mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf and success build with follow configuration:

    ./configure -release -force-debug-info -opensource -confirm-license -largefile -accessibility -no-qml-debug -system-zlib -no-journald -system-libpng -system-libjpeg -system-freetype -openssl -no-libproxy -no-glib -no-gtkstyle -gui -widgets -verbose -no-nis -no-cups -no-iconv -no-tslib -no-icu -no-fontconfig -strip -no-pch -no-ltcg -no-dbus -device mipsel-broadcom-97425-g++ -device-option B_REFSW_DEBUG=n -device-option BRCM_ROCKFORD_PATH=/refsw_release_unified_20121210/rockford/ -device-option BRCM_APPLIBS_PATH=/refsw_release_unified_20121210/AppLibs/ -device-option 'LINKER_FLAGS=-lpng -lz' -separate-debug-info -no-kms -no-gbm -directfb -linuxfb -no-mirclient -no-gstreamer -no-system-proxies -I/target/usr/include -I/target/usr/include/freetype2 -I/target/usr/include/directfb -L/target/usr/lib
    

    Unfortunately example exit with segmentation fault:

    ./analogclock
    QFactoryLoader::QFactoryLoader() checking directory path "/tmp/sml723x_qt5/plug.
    QFactoryLoader::QFactoryLoader() looking at "/tmp/sml723x_qt5/plugins/platforms"
    Found metadata in lib /tmp/sml723x_qt5/plugins/platforms/libqdirectfb.so, metad=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "directfb",
                "directfbegl"
            ]
        },
        "className": "QDirectFbIntegrationPlugin",
        "debug": false,
        "version": 329217
    }
    
    
    Got keys from plugin meta data ("directfb", "directfbegl")
    QFactoryLoader::QFactoryLoader() looking at "/tmp/sml723x_qt5/plugins/platforms"
    Found metadata in lib /tmp/sml723x_qt5/plugins/platforms/libqlinuxfb.so, metada=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "linuxfb"
            ]
        },
        "className": "QLinuxFbIntegrationPlugin",
        "debug": false,
        "version": 329217
    }
    
    
    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/tmp/sml723x_qt5/plugins/platforms"
    Found metadata in lib /tmp/sml723x_qt5/plugins/platforms/libqminimal.so, metada=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimal"
            ]
        },
        "className": "QMinimalIntegrationPlugin",
        "debug": false,
        "version": 329217
    }
    
    
    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/tmp/sml723x_qt5/plugins/platforms"
    Found metadata in lib /tmp/sml723x_qt5/plugins/platforms/libqoffscreen.so, meta=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "offscreen"
            ]
        },
        "className": "QOffscreenIntegrationPlugin",
        "debug": false,
        "version": 329217
    }
    
    
    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() checking directory path "/tmp/sml723x_qt5/exam.
    loaded library "/tmp/sml723x_qt5/plugins/platforms/libqdirectfb.so"
    
       ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.4.17 v1.5 |~~~~~~~~~~~~~~~~~~~~~~~~~~
            (c) 2001-2012  The world wide DirectFB Open Source Community
            (c) 2000-2004  Convergence (integrated media) GmbH
          ----------------------------------------------------------------
    
    (*) DirectFB/Core: Single Application Core. (2016-08-25 16:33) 
    Segmentation fault
    

    How can I solve this problem?
    Thank you and excuse my bad english.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 9 Nov 2016, 23:00 last edited by
      #2

      Hi,

      You should run your application through the debugger to see where exactly it fails.

      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
      • D Offline
        D Offline
        debian
        wrote on 21 Nov 2016, 14:44 last edited by
        #3
        (gdb) bt
        #0  0x00000000 in ?? ()
        #1  0x761cd93c in directfb_bcmnexus () at bcmnexus.c:320
        #2  0x761e28a8 in __do_global_ctors_aux ()
          from /usr/lib/directfb-1.4-17-pure/systems/libdirectfb_bcmnexus_sys.so
        #3  0x761cc88c in ?? ()
          from /usr/lib/directfb-1.4-17-pure/systems/libdirectfb_bcmnexus_sys.so
        

        bcmnexus.c:320 is DFB_CORE_SYSTEM( bcmnexus )
        DFB_CORE_SYSTEM defined in DirectFB-1.4.17/src/core/core_system.h

        #define DFB_CORE_SYSTEM(shortname)                              \
        __attribute__((constructor)) void directfb_##shortname( void ); \
                                                                        \
        void                                                            \
        directfb_##shortname( void )                                    \
        {                                                               \
             direct_modules_register( &dfb_core_systems,                \
                                      DFB_CORE_SYSTEM_ABI_VERSION,      \
                                      #shortname, &system_funcs );      \
        }
        

        direct_modules_register implemented in DirectFB-1.4.17/src/lib/direct/modules.c

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 21 Nov 2016, 21:41 last edited by
          #4

          Can you run a DirectFB hello world successfully ?

          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
          • D Offline
            D Offline
            debian
            wrote on 22 Nov 2016, 08:19 last edited by
            #5

            I think this not should be problem because I change only qt version, now our application use Qt-4.7.3 and work fine.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 22 Nov 2016, 22:24 last edited by
              #6

              There's been quite some changes in the backend.

              Can you test with a more recent version of Qt to see if it's still present ?

              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
              • D Offline
                D Offline
                debian
                wrote on 23 Nov 2016, 09:00 last edited by
                #7

                You mean 5.6.2, 5.7.0 or 5.8.0?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 23 Nov 2016, 09:09 last edited by
                  #8

                  If possible each in that order so you can determine whether it was fixed and at which point.

                  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
                  • D Offline
                    D Offline
                    debian
                    wrote on 23 Nov 2016, 11:56 last edited by
                    #9

                    Unfortunately my current toolchain (gcc-4.5.3) not support c++11, Qt-5.7.0 and above not available.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 23 Nov 2016, 21:01 last edited by
                      #10

                      Then yes, try 5.6.2 or even the top of the 5.6 branch.

                      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
                      • D Offline
                        D Offline
                        debian
                        wrote on 24 Nov 2016, 08:51 last edited by
                        #11

                        I think this will be useless, I not see any changes in directfb support.

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          debian
                          wrote on 24 Nov 2016, 10:14 last edited by
                          #12

                          I add some debug output in sources and found what problem in QBackingStore::QBackingStore.

                          QBackingStore::QBackingStore(QWindow *window)
                              : d_ptr(new QBackingStorePrivate(window))
                          {
                          	qDebug() << __func__ << ":" << __LINE__ << "d_ptr" << d_ptr                  /// line 135
                          		<< "window" << window;
                          	qDebug() << __func__ << ":" << __LINE__                                                        /// line 137
                          		<< "platformIntegration" << QGuiApplicationPrivate::platformIntegration();
                              d_ptr->platformBackingStore = QGuiApplicationPrivate::platformIntegration()->createPlatformBackingStore(window);
                          	qDebug() <<  __func__ << ":" << __LINE__;
                          }
                          

                          And console output;

                          RasterWindow : 49 RasterWindow(0x7fc1d408)
                          QBackingStore : 135 d_ptr true window RasterWindow(0x7fc1d*** 60465:49:48.459 nexus_generic_driver: 408)
                          QBackingStforcing driver shutdownore : 137 platformIntegration 0x41bea8
                          

                          I wait get output from *QDirectFbIntegration::createPlatformBackingStore.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 24 Nov 2016, 21:15 last edited by
                            #13

                            Then maybe a silly thing but did you try to check whether these instructions were still working with Qt 4 (e.g. 4.8.7) ?

                            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
                            • D Offline
                              D Offline
                              debian
                              wrote on 25 Nov 2016, 08:16 last edited by
                              #14

                              @SGaist now we are use qt-4.7.3, but it very old version and very hard add new future in application

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 25 Nov 2016, 21:21 last edited by
                                #15

                                That's why I suggest to first try with 4.8.7. That way you ensure that it's still working with that one. Then you can compare the backend with 5.6 to see if you can spot something.

                                You should also take a look at the bug report system to see if there's anything related.

                                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

                                • Login

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