Discussion:
[Interest] Qt5 LinuxFB crash
Andre Renaud
2013-01-31 02:49:42 UTC
Permalink
Hi,
I'm evaluating Qt5 on an older ARM platform, using just the linuxfb
(no xcb, or opengl). However when I run any of the examples I get a
segfault somewhere inside the libqlinuxfb.so. Unfortunately, due to
memory constraints, I am unable to build and run the full debug
version of Qt5, so I can't get a more detailed stack trace than this:
***@snapper:/home/andre/work/package-builder/build/qt-everywhere-opensource-src-

(gdb) r
Starting program:
/home/andre/work/package-builder/build/qt-everywhere-opensource-src-5.0.0/qtbase/examples/widgets/animation/animatedtiles/animatedtiles
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x40fc7a5c in ?? () from /plugins/platforms/libqlinuxfb.so
(gdb) where
#0 0x40fc7a5c in ?? () from /plugins/platforms/libqlinuxfb.so
#1 0x40fc5e04 in ?? () from /plugins/platforms/libqlinuxfb.so
#2 0x40fc59b8 in ?? () from /plugins/platforms/libqlinuxfb.so
#3 0x40581d64 in ?? ()
from /home/andre/work/package-builder/staging/lib/libQt5Gui.so.5
#4 0x4058e920 in QGuiApplicationPrivate::createPlatformIntegration() ()
from /home/andre/work/package-builder/staging/lib/libQt5Gui.so.5
#5 0x4058fd78 in QGuiApplicationPrivate::createEventDispatcher() ()
from /home/andre/work/package-builder/staging/lib/libQt5Gui.so.5
#6 0x40a68efc in QCoreApplication::init() ()
from /home/andre/work/package-builder/staging/lib/libQt5Core.so.5
#7 0x40a68f60 in QCoreApplication::QCoreApplication(QCoreApplicationPrivate&)
() from /home/andre/work/package-builder/staging/lib/libQt5Core.so.5
#8 0x4058fc68 in QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) ()
from /home/andre/work/package-builder/staging/lib/libQt5Gui.so.5
#9 0x400fd004 in QApplication::QApplication(int&, char**, int) ()
from /home/andre/work/package-builder/staging/lib/libQt5Widgets.so.5
#10 0x0000e530 in main ()

Does anyone have any hints as to where this might be going wrong? It
seems like it may be the same (or similar) fault to that mentioned
here http://lists.qt-project.org/pipermail/interest/2013-January/005382.html.

Regards,
Andre
Thomas Petazzoni
2013-01-31 14:51:09 UTC
Permalink
Dear Andre Renaud,
Post by Andre Renaud
I'm evaluating Qt5 on an older ARM platform, using just the linuxfb
(no xcb, or opengl). However when I run any of the examples I get a
segfault somewhere inside the libqlinuxfb.so. Unfortunately, due to
memory constraints, I am unable to build and run the full debug
I confirm that the linuxfb backend is broken as of today. One bug is
fixed by
http://lists.qt-project.org/pipermail/interest/2013-January/005381.html.

But the other bug detailed at
http://lists.qt-project.org/pipermail/interest/2013-January/005382.html
is still not fixed.

Note that even if your device is resource constrained, you can get a
full backtrace: build Qt with debugging symbols, keep the library files
with debugging symbols on your development workstation, and on your
target, put a stripped version of the libraries. Then, do a usual
remote debugging session, pointing your cross gdb to the libraries
having the debugging symbols on your workstation, and you'll get full
stack traces.

Best regards,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Andre Renaud
2013-01-31 19:34:25 UTC
Permalink
Dear Thomas,
Post by Thomas Petazzoni
I confirm that the linuxfb backend is broken as of today. One bug is
fixed by
http://lists.qt-project.org/pipermail/interest/2013-January/005381.html.
Thanks for that - I should have mentioned that in the strace output
the last thing it did was a KDGETMODE ioctl. So that patch fixed it.

Regards,
Andre
Thomas Petazzoni
2013-01-31 21:24:44 UTC
Permalink
Dear Andre Renaud,
Post by Andre Renaud
Dear Thomas,
Post by Thomas Petazzoni
I confirm that the linuxfb backend is broken as of today. One bug is
fixed by
http://lists.qt-project.org/pipermail/interest/2013-January/005381.html.
Thanks for that - I should have mentioned that in the strace output
the last thing it did was a KDGETMODE ioctl. So that patch fixed it.
And then it works for you? For me, even with the KDGETMODE fix, it
still crashes later.

Regards,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Andre Renaud
2013-01-31 21:35:06 UTC
Permalink
Post by Thomas Petazzoni
Post by Andre Renaud
Thanks for that - I should have mentioned that in the strace output
the last thing it did was a KDGETMODE ioctl. So that patch fixed it.
And then it works for you? For me, even with the KDGETMODE fix, it
still crashes later.
Most programs seem to work fine. The qtbase/examples/gui/rasterwindow
application still dies in the way you've described, but that seems to
be the only one.

Regards,
Andre
Thomas Petazzoni
2013-01-31 22:48:01 UTC
Permalink
Dear Andre Renaud,
Post by Andre Renaud
Post by Thomas Petazzoni
Post by Andre Renaud
Thanks for that - I should have mentioned that in the strace output
the last thing it did was a KDGETMODE ioctl. So that patch fixed it.
And then it works for you? For me, even with the KDGETMODE fix, it
still crashes later.
Most programs seem to work fine. The qtbase/examples/gui/rasterwindow
application still dies in the way you've described, but that seems to
be the only one.
Aaah, interesting. I had been testing only with the rasterwindow
application, since I thought it was kind of the simplest application.
I'll test with other applications as well.

But still, it'd be great to get some help to fix this rasterwindow
application crash. I've already offered to test patches, continue to
provide backtraces and so on, but so far, I haven't had a lot of
feedback.

Best regards,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Andre Renaud
2013-01-31 23:30:16 UTC
Permalink
Hi Thomas,
Post by Thomas Petazzoni
Aaah, interesting. I had been testing only with the rasterwindow
application, since I thought it was kind of the simplest application.
I'll test with other applications as well.
But still, it'd be great to get some help to fix this rasterwindow
application crash. I've already offered to test patches, continue to
provide backtraces and so on, but so far, I haven't had a lot of
feedback.
As a work-around you can correct the issue by 'creating' the window
before you try to get the backing store from it in rasterwindow. I'm
not sure if this is actually a bug in rasterwindow, or if it is
expected to be done automatically for you. In qwindow.cpp, it appears
that multiple calls to create are fine - subsequent ones will simply
do nothing, so an alternative would be to have
QLinuxFbIntegration::createPlatformBackingStore call create regardless
(it'll be a no-op if it's already been done).

Either of these patches effectively fix the crash for me.

--- a/examples/gui/rasterwindow/rasterwindow.cpp 2013-02-01
12:22:04.414289323 +1300
+++ b/examples/gui/rasterwindow/rasterwindow.cpp 2013-02-01
12:22:09.914337845 +1300
@@ -45,8 +45,8 @@
: QWindow(parent)
, m_update_pending(false)
{
- m_backingStore = new QBackingStore(this);
create();
+ m_backingStore = new QBackingStore(this);

setGeometry(100, 100, 300, 200);
--
--- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
2013-02-01 12:26:58.390337550 +1300
+++ a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
2013-02-01 12:27:10.890315043 +1300
@@ -84,6 +84,7 @@

QPlatformBackingStore
*QLinuxFbIntegration::createPlatformBackingStore(QWindow *window)
const
{
+ window->create();
return new QFbBackingStore(window);
}
--

Regards,
Andre

Loading...