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

Bug #1273306 reported by Martin Pitt
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
window-mocker
New
Undecided
Unassigned
appmenu-qt (Ubuntu)
Invalid
Undecided
Łukasz Zemczak
qtbase-opensource-src (Ubuntu)
Fix Released
Undecided
Ł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
SegvAnalysis:
 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
StacktraceTop:
 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/libappmenu-qt.so
 AppMenuPlatformMenuBar::destroyMenuBar() () from /tmp/apport_sandbox_qceHPQ/usr/lib/x86_64-linux-gnu/qt5/plugins/menubar/libappmenu-qt.so
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

Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in python3.3 (Ubuntu):
status: New → Confirmed
Revision history for this message
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 libappmenu-qt.so functions.

Revision history for this message
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
Revision history for this message
Ł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
Revision history for this message
Ł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
Revision history for this message
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.

Revision history for this message
Ł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.

Thanks!

Changed in appmenu-qt (Ubuntu):
status: Incomplete → In Progress
Revision history for this message
Ł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)
Revision history for this message
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
Revision history for this message
Ł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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.