Qt5.6: DirectFB segmentation fault on Broadcom BCM7231B2
-
wrote on 9 Nov 2016, 10:16 last edited by
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. -
Hi,
You should run your application through the debugger to see where exactly it fails.
-
wrote on 21 Nov 2016, 14:44 last edited by
(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
-
Can you run a DirectFB hello world successfully ?
-
wrote on 22 Nov 2016, 08:19 last edited by
I think this not should be problem because I change only qt version, now our application use Qt-4.7.3 and work fine.
-
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 ?
-
wrote on 23 Nov 2016, 09:00 last edited by
You mean 5.6.2, 5.7.0 or 5.8.0?
-
If possible each in that order so you can determine whether it was fixed and at which point.
-
wrote on 23 Nov 2016, 11:56 last edited by
Unfortunately my current toolchain (gcc-4.5.3) not support c++11, Qt-5.7.0 and above not available.
-
Then yes, try 5.6.2 or even the top of the 5.6 branch.
-
wrote on 24 Nov 2016, 08:51 last edited by
I think this will be useless, I not see any changes in directfb support.
-
wrote on 24 Nov 2016, 10:14 last edited by
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.
-
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) ?
-
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.