Crash in QXcbWindow::setParent() due to NULL xcbScreen()

Bug #1571158 reported by Mitsuya Shibata on 2016-04-16
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qtbase-opensource-src (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned

Bug Description

[Impact]

Application crash in certain situation.

[Test Case]

See bug comments for test app.

[Regression Potential]]

The fixes are in the currently release upstream LTS release (Qt 5.6), but they do touch a core component of (X11) Qt so eg multi-monitor setups should be tested for no regressions.

--

Qt 5.5.1 has problem to "[QTBUG-50081] Crash in QXcbWindow::setParent() due to NULL xcbScreen()".

This is already fixed in upstream.
https://bugreports.qt.io/browse/QTBUG-50081

Mitsuya Shibata (cosmos-door) wrote :
Timo Jyrinki (timo-jyrinki) wrote :

So it's this:
https://codereview.qt-project.org/#/c/144896/

But it has required a partial revert already:
https://codereview.qt-project.org/#/c/145033/

We have many 5.6 XCB screen crasher fixes backported to xenial 5.5 already, so I think this could be suitable as continuation of those. However it seems there are always remaining related bugs in the code too.

description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtbase-opensource-src - 5.5.1+dfsg-16ubuntu10

---------------
qtbase-opensource-src (5.5.1+dfsg-16ubuntu10) yakkety; urgency=medium

  * debian/patches/Blacklist-Mali-T760-Mali-T720-from-supporting-BGRA.patch
    - Backport from upstream 5.6 (LP: #1557915) (LP: #1559906)
  * Add two patches from stable Qt 5.6 branch to fix another case of
    QXcbWindow crashes (LP: #1571158).
    - debian/patches/Fix-crash-because-of-NULL-screen-in-QXcbWindow.patch
    - debian/patches/QtGui-Don-t-set-a-screen-to-a-child-window.patch
  * Fix drag and drop issues with patches from upstream. (LP: #1577313)
    - debian/patches/xcb-Fix-drag-and-drop-to-Emacs.patch
    - debian/patches/xcb-Fix-drag-and-drop-to-applications-like-Emacs-and.patch

 -- Timo Jyrinki <email address hidden> Mon, 02 May 2016 07:46:50 +0000

Changed in qtbase-opensource-src (Ubuntu):
status: New → Fix Released
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtbase-opensource-src (Ubuntu Xenial):
status: New → Confirmed
Mahnu (emmanuel-promayon) wrote :

Any chance of fixing this in xenial as well (as suggested by comment #2)?

At the moment our application crashed on xenial at startup due to a problem in XcbWindow::setParent. Same code works fine on debian unstable and testing.

I don't know if the fix provided in 5.5.1+dfsg-16ubuntu10 will work for our code, but I will be happy to test (if there is a way to check 5.5.1+dfsg-16ubuntu10 on xenial, let me know).

Thanks to all if it is possible to fix this on the last LTS, that will be a big help.

Timo Jyrinki (timo-jyrinki) wrote :

@Mahnu: Could you test on xenial the following:

sudo apt-add-repository ppa:ci-train-ppa-service/landing-016
sudo apt update
sudo apt dist-upgrade

And later downgrade back (please do, to remove the PPA from system, the contents will change):
sudo apt install ppa-purge
sudo ppa-purge ppa:ci-train-ppa-service/landing-016

Mahnu (emmanuel-promayon) wrote :

Thank you for the detailed instructions... and the fixed packages!
Version 5.5.1+dfsg-16ubuntu7.1 solved the problem on Xenial. There is no more crash!

Any chance of pushing this version to the main repo?

Timo Jyrinki (timo-jyrinki) wrote :

Thanks Mahnu! I will publish the fix to the updates queue. When it gets out of the queue, this bug will be updated with instructions on how to test it once again (from the proposed updates). After that final round of testing and when 7 days have passed, it will eventually be copied to main updates for all.

There will not be any further update on this bug before the queue is handled however, which may take time.

Mahnu (emmanuel-promayon) wrote :

Thank you again for you work and your answers.
I hope that the updated package will pass all the required Q&A. I understand (and agree with the fact) that it is very important to make sure that there is no regression.

Let me know if I can be of any help.

In the mean time, would it be ok to use your ppa? Or do you recommend something else?

Timo Jyrinki (timo-jyrinki) wrote :

You could continue to use the PPA until the update is available for everyone (a few weeks at minimum), the PPA contents will stay as is until then. Just remember to eventually run that ppa-purge command so that you won't accidentally get some other package update(s).

Mahnu (emmanuel-promayon) wrote :

Perfect. I will remember. Thanks!

Hello Mitsuya, or anyone else affected,

Accepted qtbase-opensource-src into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qtbase-opensource-src/5.5.1+dfsg-16ubuntu7.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in qtbase-opensource-src (Ubuntu Xenial):
status: Confirmed → Fix Committed
tags: added: verification-needed
Mahnu (emmanuel-promayon) wrote :

Dear Martin,

I purged landing-016 ppa, re-compile my application, and it crashes as expected.
Then I enabled pre-released updates, updated the Qt packages to version 5.5.1+dfsg-16ubuntu7.1 from proposed, re-compile again, and the crash disappeared.

So, yes, thank you: this package fixes the crash for me!

For the details, the application is camitk-imp (available in the package "camitk" version 4.0.0, which did not make it to Ubuntu 16.04), a medical image analysis and modeling software based on Qt and VTK. My machine is a (rather old) Dell M6400 laptop.

Let me know if you want me to use the test case provided by Mitsuya as welle or need more information about my testing or if you need me to do further testing.

Thanks to everyone for this fix and to Martin for the detailed instruction on how to test and report this package!

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtbase-opensource-src - 5.5.1+dfsg-16ubuntu7.1

---------------
qtbase-opensource-src (5.5.1+dfsg-16ubuntu7.1) xenial; urgency=medium

  * debian/patches/Blacklist-Mali-T760-Mali-T720-from-supporting-BGRA.patch
    - Backport from upstream 5.6 (LP: #1557915) (LP: #1559906)
  * Add two patches from stable Qt 5.6 branch to fix another case of
    QXcbWindow crashes (LP: #1571158).
    - debian/patches/Fix-crash-because-of-NULL-screen-in-QXcbWindow.patch
    - debian/patches/QtGui-Don-t-set-a-screen-to-a-child-window.patch
  * Fix drag and drop issues with patches from upstream. (LP: #1577313)
    - debian/patches/xcb-Fix-drag-and-drop-to-Emacs.patch
    - debian/patches/xcb-Fix-drag-and-drop-to-applications-like-Emacs-and.patch

 -- Timo Jyrinki <email address hidden> Mon, 02 May 2016 12:24:35 +0000

Changed in qtbase-opensource-src (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for qtbase-opensource-src has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers