update-manager crashed with AttributeError in check_hovering(): 'TextTag' object has no attribute 'get_data'

Bug #1009859 reported by Jean-Baptiste Lallement
56
This bug affects 13 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
High
Colin Watson
Quantal
Fix Released
High
Colin Watson

Bug Description

TEST CASE
1. On a system with updates available, launch update-manager
2. Select a package in the list
3. Open the description pane
4. Move the mouse over the pane

ACTUAL RESULT
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/UpdateManager/ChangelogViewer.py", line 227, in motion_notify_event
    self.check_hovering(x, y)
  File "/usr/lib/python2.7/dist-packages/UpdateManager/ChangelogViewer.py", line 251, in check_hovering
    url = tag.get_data("url")
AttributeError: 'TextTag' object has no attribute 'get_data'

ProblemType: Crash
DistroRelease: Ubuntu 12.10
Package: update-manager 1:0.162
ProcVersionSignature: Ubuntu 3.4.0-3.8-generic 3.4.0
Uname: Linux 3.4.0-3-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.1.1-0ubuntu2
Architecture: amd64
Date: Thu Jun 7 08:59:14 2012
ExecutablePath: /usr/bin/update-manager
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/update-manager
ProcEnviron:
 TERM=xterm
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
PythonArgs: ['/usr/bin/update-manager']
SourcePackage: update-manager
Title: update-manager crashed with AttributeError in check_hovering(): 'TextTag' object has no attribute 'get_data'
UpgradeStatus: Upgraded to quantal on 2012-01-31 (127 days ago)
UserGroups: adm admin cdrom dialout kvm libvirtd lpadmin plugdev sambashare vboxusers

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Changed in update-manager (Ubuntu):
importance: Undecided → High
tags: added: rls-q-incoming
tags: removed: need-duplicate-check
Revision history for this message
Robert Roth (evfool) wrote :

Bug #1009151 looks similar, however not exactly the same. Fixing this should also fix the other one, I guess.
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
Steve Langasek (vorlon) wrote :

I can't reproduce this by installing the quantal update-manager package on precise, and there are no relevant changes to update-manager. This looks like an API change in the gtk bindings?

Steve Langasek (vorlon)
tags: removed: rls-q-incoming
Revision history for this message
Sami Jaktholm (sjakthol) wrote :

The GObject.set_data and GObject.get_data method bindings were removed from PyGObject 3.3.1 release[1] because "They will basically cause a crash if misused" [2]

I attached a patch that uses traditional python object attributes instead of GObject attributes. The patch fixes this bug, #1009151 and similar crashes occuring in ReleaseNotesViewer.py.

[1] https://mail.gnome.org/archives/gnome-announce-list/2012-April/msg00048.html
[2] https://bugzilla.gnome.org/show_bug.cgi?id=641944

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-for-1009151-and-1009859" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Sami Jaktholm (sjakthol) wrote :

Here's a patch that actually works (the first one caused some other issues which should be gone with this one).

Revision history for this message
Sami Jaktholm (sjakthol) wrote :

Gosh this can't be so hard. It seems that after fixing all other stupid mistakes Quilt didn't like the patch. Well, I hope I got it right the fourth time...

Revision history for this message
Colin Watson (cjwatson) wrote :

I applied a slightly different patch to our main bzr branch before I saw that you'd attached a patch here. Sorry about the duplicate work; but it should be fine as of the next upload.

Changed in update-manager (Ubuntu Quantal):
assignee: nobody → Colin Watson (cjwatson)
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.3 KiB)

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

---------------
update-manager (1:0.163) quantal; urgency=low

  [ Colin Watson ]
  * Isolate tests from local configuration in
    /etc/update-manager/release-upgrades.d/.
  * Use Python attributes rather than GObject.get_data and GObject.set_data,
    which have been removed upstream (LP: #1009859).
  * Switch default view class to Gtk3 and replace python-gobject dependency
    with python-gi.
  * Port away from old-style apt.Package candidateFoo and installedFoo
    properties, preferring candidate.foo and installed.foo. In a number of
    cases we have to check whether candidate/installed is non-None first.
  * Use apt_pkg.version_compare rather than apt_pkg.VersionCompare.
  * Use apt_pkg.uri_to_filename rather than apt_pkg.URItoFileName.
  * Use apt_pkg.TagFile (and related new-style API) rather than
    apt_pkg.ParseTagFile.
  * Use apt_pkg.PackageManager rather than apt_pkg.GetPackageManager.
  * Use apt_pkg.Acquire rather than apt_pkg.GetAcquire.
  * Use mark_foo/marked_foo rather than markFoo/markedFoo.
  * Use apt_pkg.ActionGroup rather than apt_pkg.GetPkgActionGroup.
  * Use apt_pkg.ProblemResolver rather than apt_pkg.GetPkgProblemResolver.
  * Use apt_pkg.read_config_file rather than apt_pkg.ReadConfigFile.
  * Use new spelling of apt_pkg.DepCache methods.
  * Rename several local cache methods to PEP-8 style to avoid showing up in
    the output of /usr/share/python-apt/migrate-0.8.py.
  * Use apt_pkg.size_to_str rather than apt_pkg.SizeToStr.
  * Use apt_pkg.PackageManager.get_archives rather than
    apt_pkg.PackageManager.GetArchives.
  * Use apt_pkg.Acquire.fetch_needed rather than
    apt_pkg.Acquire.FetchNeeded.
  * Use new spelling of apt_pkg.Package/Version/Dependency methods.
  * Use apt_pkg.pkgsystem_lock rather than apt_pkg.PkgSystemLock.
  * Use new spelling of apt_pkg dependency parsing methods.
  * Use new spelling of apt_pkg.SourceList methods.
  * Bump python-apt (build-)dependency to >= 0.8.0.
  * Add a scheme for excluding false positives from the pyflakes test, and
    enable it by default.
  * Rearrange the OptionParser workaround from 1:0.154.5 to work with Python
    3, using gettext or ugettext as appropriate.
  * Always pass bytes to hashlib.md5.update.
  * Fix DistUpgradeAptCdrom to account for gzip files being opened in binary
    mode.
  * Convert the last use of os.popen to subprocess.check_output, which makes
    it easier to read str rather than bytes. (This requires Python 2.7.)
  * Decode bytes read from urlopened file objects.
  * UpdateManager/backend/InstallBackendSynaptic.py
    - Keep a reference to the data tuple passed to GObject.child_watch_add
      to avoid attempts to destroy it without a thread context
      (LP: #724687).
    - Open temporary synaptic selections file in text mode.
  * Define __bool__ rather than __nonzero__ method in Python 3.
  * sort(cmp=) and sorted(cmp=) no longer work in Python 3. Use appropriate
    key= arguments instead.
  * Fix ResourceWarning while reading /proc/mounts.
  * Make update-manager-kde depend on psmisc, for killall.
  * DistUpgrade/DistUpgradeView.py:
    - Use floor division in Fuzzy...

Read more...

Changed in update-manager (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1009859

tags: added: iso-testing
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.