/usr/bin/update-manager:AttributeError:<lambda>:on_settings_button_clicked:show_settings

Bug #1703365 reported by errors.ubuntu.com bug bridge
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
High
Unassigned
Zesty
Fix Released
High
Unassigned

Bug Description

[Impact]
Update Manager passes it's window Id to software-properties by calling get_xid() which does not exist under wayland and results in this crash. This patch does not add --toplevel under wayland to work around this crash.

[Test Case]
Test Steps
1. Launch update-manager and wait until the main UI is displayed (after sources are refreshed)
2. Click on "Settings..."

Expected result
The Settings dialog is displayed

Actual result
It is not displayed and this crash occurs
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/UpdateManager/Dialogs.py", line 112, in <lambda>
    button.connect("clicked", lambda x: callback())
  File "/usr/lib/python3/dist-packages/UpdateManager/Dialogs.py", line 127, in on_settings_button_clicked
    self.window_main.show_settings()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 196, in show_settings
    "--toplevel", "%s" % self.get_window().get_xid()
AttributeError: 'GdkWaylandWindow' object has no attribute 'get_xid'

[Regression Potential]
Very low. The option --toplevel is excluded only for wayland and added for any other display server. So for other display server than wayland the behaviour is unchanged.

The Ubuntu Error Tracker has been receiving reports about a problem regarding update-manager. This problem was most recently seen with package version 1:17.04.3, the problem page at https://errors.ubuntu.com/problem/12e7e8364ae0ad1fe84dc3972adbc9506d7e2f71 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker you can request it at http://forms.canonical.com/reports/.

Related branches

tags: added: wayland
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in update-manager (Ubuntu):
status: New → Confirmed
Jeremy Bícha (jbicha)
Changed in update-manager (Ubuntu):
importance: Undecided → High
Changed in update-manager (Ubuntu Zesty):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

This patch sets GDK_BACKEND to x11 to workaround this crash when calling software-properties from update-manager.

Changed in update-manager (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "update-manager-17.10.6.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Sebastien Bacher (seb128) wrote :

the patch seems too much, software-properties-gtk works fine under wayland it's just show_settings() in UpdateManager.py which creates the issue

        cmd = ["/usr/bin/software-properties-gtk",
               "--open-tab", "2",
               "--toplevel", "%s" % self.get_window().get_xid()

the get_xid() is an x11 specific call, a better workaround would be to just not add the toplevel argument when used under wayland

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Okay, it makes sense. Here is a new version following your comment.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Looks good to me!

Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded this artful, thanks! The bug description could use a few more details if we want to SRU this to zesty.

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

This bug was fixed in the package update-manager - 1:17.10.6

---------------
update-manager (1:17.10.6) artful; urgency=medium

  * UpdateManager.py: Workaround a crash when calling software-properties-gtk
     by not using --toplevel under wayland (LP: #1703365)

 -- Jean-Baptiste Lallement <email address hidden> Mon, 21 Aug 2017 13:00:27 +0200

Changed in update-manager (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

patch for zesty

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

update-manager version 17.04.6 already exists in -proposed for zesty, so I fixed the version numbers / changelog when sponsoring this fix.

Changed in update-manager (Ubuntu Zesty):
status: Confirmed → In Progress
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted update-manager into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:17.04.7 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 on 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-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. 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 update-manager (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-zesty
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Zesty:
I have reproduced the problem with update-manager 1:17.04.6 in zesty-updates and have verified that the version of update-manager 1:17.04.7 in -proposed fixes the issue.

Marking as verification-done

tags: added: verification-done-zesty
removed: verification-needed-zesty
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:17.04.7

---------------
update-manager (1:17.04.7) zesty; urgency=medium

  * UpdateManager.py: Workaround a crash when calling software-properties-gtk
     by not using --toplevel under wayland (LP: #1703365)

 -- Jean-Baptiste Lallement <email address hidden> Thu, 24 Aug 2017 10:00:11 -0700

Changed in update-manager (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for update-manager 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.

tags: added: id-599db5dbf67a12b663a6569a
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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