[Interest] Qt5 LinuxFB crash

Andre Renaud andre at bluewatersys.com
Fri Feb 1 00:30:16 CET 2013


Hi Thomas,
> 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



More information about the Interest mailing list