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
62
This bug affects 12 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Fix Released
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:

Revision history for this message
Karma Dorje (taaroa) wrote :
tags: removed: need-duplicate-check
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
information type: Private → Public
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
Krzysztof (kszajows)
Changed in update-manager (Ubuntu):
status: Confirmed → In Progress
Karma Dorje (taaroa)
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
Revision history for this message
Michael Vogt (mvo) wrote :
Changed in update-manager (Ubuntu Trusty):
status: Triaged → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

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
Revision history for this message
Mathew Hodson (mhodson) 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
Revision history for this message
Michael Mess (michael-michaelmess) wrote :

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.

Revision history for this message
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
Revision history for this message
Chris Halse Rogers (raof) 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 regresssions.

Revision history for this message
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
Mathew Hodson (mhodson)
Changed in update-manager (Ubuntu):
milestone: trusty-updates → none
Revision history for this message
Edson T. Marques (edsontmarques) wrote :

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

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

Reopening, this regressed on Cosmic.

Changed in update-manager (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
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:

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

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'

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

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

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

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

Sorry for the noise.

Revision history for this message
Willem Hobers (whobers) wrote :

testing xubuntu 18.10

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.