update-manager crashed with AttributeError in resize_to_standard_width(): 'NoneType' object has no attribute 'get_resolution' if $DISPLAY is not set

Bug #1269397 reported by Karma Dorje on 2014-01-15
62
This bug affects 12 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Medium
Unassigned
Trusty
Medium
Unassigned

Bug Description

ERRORS BUCKET:
https://errors.ubuntu.com/bucket/?id=/usr/bin/update-manager%3AAttributeError%3A%3Clambda%3E%3Aresize_to_standard_width

TEST CASE:
1. Open a terminal
2. run: unset DISPLAY
3. run: update-manager

EXPECTED RESULT:
It exits with a cannot open display message

ACTUAL RESULT:
It crashes

apt-cache policy update-manager
update-manager:
  Installed: 1:0.196.5
  Candidate: 1:0.196.5
  Version table:
 *** 1:0.196.5 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: CrashDistroRelease: Ubuntu 14.04
Package: update-manager 1:0.196.5
ProcVersionSignature: Ubuntu 3.13.0-3.18-generic 3.13.0-rc8
Uname: Linux 3.13.0-3-generic x86_64
ApportVersion: 2.13.1-0ubuntu1
Architecture: amd64
Date: Wed Jan 15 18:05:36 2014
ExecutablePath: /usr/bin/update-manager
InstallationDate: Installed on 2012-09-30 (472 days ago)
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120817.1)
InterpreterPath: /usr/bin/python3.3
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/update-manager -d
PythonArgs: ['/usr/bin/update-manager', '-d']SourcePackage: update-manager
Title: update-manager crashed with AttributeError in resize_to_standard_width(): 'NoneType' object has no attribute 'get_resolution'
UpgradeStatus: Upgraded to trusty on 2013-11-10 (65 days ago)
UserGroups:

Karma Dorje (taaroa) wrote :
tags: removed: need-duplicate-check
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
information type: Private → Public
Launchpad Janitor (janitor) wrote :

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

Changed in update-manager (Ubuntu):
status: New → Confirmed
Krzysztof (kszajows) on 2014-03-20
Changed in update-manager (Ubuntu):
status: Confirmed → In Progress
Karma Dorje (taaroa) on 2014-03-20
Changed in update-manager (Ubuntu):
status: In Progress → Confirmed
Changed in update-manager (Ubuntu):
importance: Medium → High
status: Confirmed → Triaged
summary: update-manager crashed with AttributeError in
resize_to_standard_width(): 'NoneType' object has no attribute
- 'get_resolution'
+ 'get_resolution' if $DISPLAY is not set
description: updated
tags: added: rls-t-incoming
Changed in update-manager (Ubuntu):
importance: High → Medium
tags: removed: rls-t-incoming
Changed in update-manager (Ubuntu Trusty):
milestone: none → trusty-updates
description: updated
Michael Vogt (mvo) wrote :
Changed in update-manager (Ubuntu Trusty):
status: Triaged → Fix Committed

Hello Karma, or anyone else affected,

Accepted update-manager into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/update-manager/1:0.196.12 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!

description: updated
tags: added: verification-needed
Mathew Hodson (mathew-hodson) wrote :

No crash. The test case gives the expected result with http://launchpad.net/ubuntu/+source/update-manager/1:0.196.12

$ unset DISPLAY
$ update-manager

(update-manager:15801): Gtk-WARNING **: cannot open display:
$

tags: added: verification-done
removed: verification-needed

I remember that I have called update-manager by accident from the console (no X11-DISPLAY).

Probably it would be nice, if it would have a text mode interface that could be used when no display is available, but I know there are other commands that do the same at the command line, so it could also output some help text that might be useful for beginners . For example:

  update-manager is a graphical user interface that needs an X11 Display.

  If you do not have an X11 display, at the command line, you can use apt-get instead. See man apt-get for details.

Launchpad Janitor (janitor) wrote :

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

---------------
update-manager (1:0.196.12) trusty-proposed; urgency=low

  * use Gtk.init() to ensure update-manager fails with a
    runtime error message instead of crashing if the display
    can not be opened (LP: #1269397)
 -- Michael Vogt <email address hidden> Thu, 24 April 2014 14:58:38 +0200

Changed in update-manager (Ubuntu Trusty):
status: Fix Committed → Fix 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 regresssions.

Launchpad Janitor (janitor) wrote :

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

---------------
update-manager (1:0.196.12) trusty-proposed; urgency=low

  * use Gtk.init() to ensure update-manager fails with a
    runtime error message instead of crashing if the display
    can not be opened (LP: #1269397)
 -- Michael Vogt <email address hidden> Thu, 24 April 2014 14:58:38 +0200

Changed in update-manager (Ubuntu):
status: Fix Committed → Fix Released
Changed in update-manager (Ubuntu):
milestone: trusty-updates → none

Apport is giving me information that this issue is raising now at cosmic. Upgrade done today.

tags: added: cosmic

Reopening, this regressed on Cosmic.

Changed in update-manager (Ubuntu):
status: Fix Released → Confirmed
Julian Andres Klode (juliank) wrote :

Works for me:

$ env -i update-manager
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused

(update-manager:13433): Gtk-WARNING **: 08:47:49.719: cannot open display:

Here is the crash file from Cosmic. From the information in this crash file it happens when update-manager is launched by update-notifier:

 mai 30 08:33:36 sark update-notifier.desktop[6220]: Traceback (most recent call last):
 mai 30 08:33:36 sark update-notifier.desktop[6220]: File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 100, in <lambda>
 mai 30 08:33:36 sark update-notifier.desktop[6220]: self.resize_to_standard_width())
 mai 30 08:33:36 sark update-notifier.desktop[6220]: File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 141, in resize_to_standard_width
 mai 30 08:33:36 sark update-notifier.desktop[6220]: GObject.signal_handler_block(ctx, self.signal_changed)
 mai 30 08:33:36 sark update-notifier.desktop[6220]: AttributeError: 'UpdateManager' object has no attribute 'signal_changed'
 mai 30 08:33:36 sark update-notifier.desktop[6220]: Traceback (most recent call last):
 mai 30 08:33:36 sark update-notifier.desktop[6220]: File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 100, in <lambda>
 mai 30 08:33:36 sark update-notifier.desktop[6220]: self.resize_to_standard_width())
 mai 30 08:33:36 sark update-notifier.desktop[6220]: File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 141, in resize_to_standard_width
 mai 30 08:33:36 sark update-notifier.desktop[6220]: GObject.signal_handler_block(ctx, self.signal_changed)
 mai 30 08:33:36 sark update-notifier.desktop[6220]: AttributeError: 'UpdateManager' object has no attribute 'signal_changed'
 mai 30 08:33:36 sark update-notifier.desktop[6220]: Traceback (most recent call last):
 mai 30 08:33:36 sark update-notifier.desktop[6220]: File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 100, in <lambda>
 mai 30 08:33:36 sark update-notifier.desktop[6220]: self.resize_to_standard_width())
 mai 30 08:33:36 sark update-notifier.desktop[6220]: File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 141, in resize_to_standard_width
 mai 30 08:33:36 sark update-notifier.desktop[6220]: GObject.signal_handler_block(ctx, self.signal_changed)
 mai 30 08:33:36 sark update-notifier.desktop[6220]: AttributeError: 'UpdateManager' object has no attribute 'signal_changed'

It is actually not a duplicate but apport being confused by a similar trace.

Changed in update-manager (Ubuntu):
status: Confirmed → Fix Released

for anyone landing on this bug report and running Cosmic I reported bug 1774131.

Sorry for the noise.

Willem Hobers (whobers) wrote :

testing xubuntu 18.10

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

Other bug subscribers