python3.3 crashed with SIGSEGV in QWidget::destroy()

Bug #1273306 reported by Martin Pitt on 2014-01-27
This bug affects 3 people
Affects Status Importance Assigned to Milestone
appmenu-qt (Ubuntu)
Łukasz Zemczak
qtbase-opensource-src (Ubuntu)
Łukasz Zemczak

Bug Description

This happens when trying to run window-mocker with python3:

$ bzr branch lp:~coreygoldberg/window-mocker/py3
$ cd py3
$ PYTHONPATH=. python3 bin/window-mocker -t Qt5

When merely closing the window it cleanly exits for me; but when resizing the window I get this crash.

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: python3.3-minimal 3.3.3-6
ProcVersionSignature: Ubuntu 3.13.0-5.20-generic 3.13.0
Uname: Linux 3.13.0-5-generic x86_64
ApportVersion: 2.13.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Jan 27 17:23:52 2014
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/python3.3
ExecutableTimestamp: 1389422324
InstallationDate: Installed on 2013-10-14 (105 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Beta amd64 (20131013)
ProcCmdline: python3 bin/window-mocker -t Qt5
ProcCwd: /home/martin/ubuntu/tmp/py3
 Segfault happened at: 0x7ff6f44b994d <_ZN7QWidget7destroyEbb+637>: mov 0x8(%rax),%rdi
 PC (0x7ff6f44b994d) ok
 source "0x8(%rax)" (0x00000008) not located in a known VMA region (needed readable region)!
 destination "%rdi" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: python3.3
 QWidget::destroy (this=this@entry=0x239d360, destroyWindow=destroyWindow@entry=true, destroySubWindows=destroySubWindows@entry=true) at kernel/qwidget_qpa.cpp:172
 QWidget::~QWidget (this=0x239d360, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1478
 QMenu::~QMenu (this=0x239d360, __in_chrg=<optimized out>) at widgets/qmenu.cpp:1362
 MenuBarAdapter::~MenuBarAdapter() () from /tmp/apport_sandbox_qceHPQ/usr/lib/x86_64-linux-gnu/qt5/plugins/menubar/
 AppMenuPlatformMenuBar::destroyMenuBar() () from /tmp/apport_sandbox_qceHPQ/usr/lib/x86_64-linux-gnu/qt5/plugins/menubar/
Title: python3.3 crashed with SIGSEGV in QWidget::destroy()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm autopilot cdrom dip lpadmin plugdev sambashare sbuild sudo

Related branches

Martin Pitt (pitti) wrote :
Launchpad Janitor (janitor) wrote :

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

Changed in python3.3 (Ubuntu):
status: New → Confirmed
Martin Pitt (pitti) wrote :

This goes through libappmenu-qt, so I tried under env -u UBUNTU_MENUPROXY. It still crashes, but less often. But the stack trace in that case looks very similar, in particular it goes through the same functions.

Martin Pitt (pitti) wrote :

I confirm that if I uninstall appmenu-qt5, the crash goes away. Changing package to appmenu-qt5 tentatively.

affects: python3.3 (Ubuntu) → appmenu-qt (Ubuntu)
Changed in appmenu-qt (Ubuntu):
status: Confirmed → New
Łukasz Zemczak (sil2100) wrote :

Looking into it right now. Due to the small number of Qt5 applications available for our platform, the new appmenu-qt5 might still have some bugs in it. I never tested it with python qt5 before, so I might have missed something there. Let me see what's up.

Changed in appmenu-qt (Ubuntu):
assignee: nobody → Łukasz Zemczak (sil2100)
status: New → In Progress
Łukasz Zemczak (sil2100) wrote :

Could I get some more information on this bug? How did you reproduce it? When installing Qt 5.2 I no longer have a python3-pyqt5 install candidate, as it depends on libqt5core5 (instead of libqt5core5a) - and I didn't see a successful rebuild against Qt 5.2 anywhere. What version of python3-pyqt5 did you use with 5.2? Where can I get it to test it properly?

Changed in appmenu-qt (Ubuntu):
status: In Progress → Incomplete
Martin Pitt (pitti) wrote :

This is not related to Qt 5.2, that isn't in trusty yet (that still has 5.0). I was just installing python3-pyqt5 5.2+dfsg-1ubuntu7 (current trusty version), checked out above window-mocker py3 branch, and run it as in the description.

Łukasz Zemczak (sil2100) wrote :

Oh, ok that changes a lot. I was asking Corey about the details, and I asked about which Qt version is used - he said it's 5.2, so I thought the bug is related to the new QPA-based appmenu-qt5 I have been recently working on.

But it seems it's related to the old now-deprecated appmenu-qt then. There has not been a new version of the old appmenu-qt5 (for Qt 5.0.2) since a really really long while, so I guess it had to be broken for a longer time. I'll try reverting my Qt 5.2 and looking into this anyway.


Changed in appmenu-qt (Ubuntu):
status: Incomplete → In Progress
Łukasz Zemczak (sil2100) wrote :

Ok, I checked briefly the code and I see the problem, but I wonder if I can fix it in appmenu-qt or will have to do it otherwise. appmenu-qt is deprecated anyway, so the fix will have to be a distro-patch anyway. Let me finish this up tomorrow morning.

Changed in qtbase-opensource-src (Ubuntu):
status: New → In Progress
assignee: nobody → Łukasz Zemczak (sil2100)
Dmitry Shachnev (mitya57) wrote :

FWIW, PyQt5 rebuilt against Qt 5.2 is now available in ppa:canonical-qt5-edgers/qt5-beta2.

Changed in window-mocker:
assignee: nobody → rosa maria (rprosamaria383)
assignee: rosa maria (rprosamaria383) → nobody
Łukasz Zemczak (sil2100) wrote :

So, the fix will be landing in the archive today.

Changed in appmenu-qt (Ubuntu):
status: In Progress → Invalid
Changed in qtbase-opensource-src (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtbase-opensource-src - 5.0.2+dfsg1-7ubuntu18

qtbase-opensource-src (5.0.2+dfsg1-7ubuntu18) trusty; urgency=medium

  [ Albert Astals ]
  * Add 0001-Do-not-overwrite-basePixmap-of-QIconLoader-PixmapEnt.patch:
    - Backport an upstreamed fix to blurry icons (LP: #1271158)

  [ Łukasz 'sil2100' Zemczak ]
  * Add fix_destroy_qapp_segfault.diff:
    - Fix a segfault when QWidget element gets freed after the main
      application exits. Do not assume qApp is present. It's already
      fixed in upstream Qt 5.2 (LP: #1273306)
 -- Timo Jyrinki <email address hidden> Thu, 06 Feb 2014 11:57:09 +0000

Changed in qtbase-opensource-src (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers