software-properties-gtk crashed with TypeError in __new__(): object of type 'NoneType' has no len()

Bug #1101881 reported by Ryland Koopus on 2013-01-19
66
This bug affects 9 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Medium
Brian Murray
Wily
Medium
Unassigned
Xenial
High
Brian Murray

Bug Description

[ Impact ]
Users on architectures other than amd64 of i386 trying to use software-properties to choose a server from which to download software will receive a crash after closing the "Choose a Download Server" dialog.

[ Test Case ]
1) Be on a not i386 or amd64 system (or be on amd64 and use a hack found in comment #11)
2) Launch software-properties-gtk
3) In the Download from: drop-down choose "Other..."
4) Observe an empty list of download servers
5) Click "Cancel"
6) Observe a traceback in the terminal which you launched software-properties-gtk

Wit the version of software-properties-gtk from -proposed you will not receive a crash.

-----------------------------------------------------------------------

on nexus 7

ProblemType: CrashDistroRelease: Ubuntu 13.04
Package: software-properties-gtk 0.92.13
Uname: Linux 3.1.10-8-nexus7 armv7l
ApportVersion: 2.8-0ubuntu2
Architecture: armhf
CrashCounter: 1
Date: Sat Jan 19 14:44:31 2013
ExecutablePath: /usr/bin/software-properties-gtk
InstallationDate: Installed on 2013-01-16 (3 days ago)
InstallationMedia: Ubuntu Raring Ringtail (development branch) - armhf (20130115-15:18)
InterpreterPath: /usr/bin/python3.3
MarkForUpload: True
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/software-properties-gtk --open-tab 2
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/software-properties-gtk', '--open-tab', '2']SourcePackage: software-properties
Title: software-properties-gtk crashed with TypeError in __new__(): object of type 'NoneType' has no len()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Ryland Koopus (ryland-koopus) wrote :
tags: removed: need-duplicate-check
Changed in software-properties (Ubuntu):
importance: Undecided → Medium
Robert Roth (evfool) wrote :

Looks similar to bug #818567, might be a duplicate.

Brian Murray (brian-murray) wrote :

I've tried recreating this on a Raring daily build from 20130131 and was unsuccessful. I tried using the command line provided in a terminal, just launching software properties from the dash and launching update-manager and then click settings. None of these methods resulted in a crash. Could you please try recreating this again with the latest daily build or after updating? Thanks in advance.

Changed in software-properties (Ubuntu):
status: New → Incomplete
information type: Private → Public
tags: added: mobile nexus7
Launchpad Janitor (janitor) wrote :

[Expired for software-properties (Ubuntu) because there has been no activity for 60 days.]

Changed in software-properties (Ubuntu):
status: Incomplete → Expired
Brian Murray (brian-murray) wrote :

This still seems to be happening somewhat regularly.

https://errors.ubuntu.com/problem/a5d66756699e2c3d60d4273a47e2a819c462ca96

Changed in software-properties (Ubuntu):
status: Expired → Confirmed
ernsteiswuerfel (erhard-f) wrote :

apport-bug redirected me to this specific bug report. I hit this bug when trying to select a mirror server from the software-properties. I already filed a bug-report for this issue: #1582017.

System: Xenial daily, Ubuntu MATE
Machine: Powerbook G4 5,6

Brian Murray (brian-murray) wrote :

In bug 1582017 it is reported that the list of mirror servers was empty, and clicking on the best server caused the crash.

Brian Murray (brian-murray) wrote :

I tried recreating this by moving my Ubuntu.mirrors file aside e.g.:

sudo mv /usr/share/python-apt/templates/Ubuntu.mirrors /tmp/

and that did not cause a crash but raised an error message saying to check your Internet connection. Then after closing the mirror selection dialog box I received the following Traceback.

WARNING: Failed to read mirror file
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 543, in on_combobox_server_changed
    res = dialog.run()
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/DialogMirror.py", line 272, in run
    iter = model.get_iter(row)
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 823, in get_iter
    path = self._coerce_path(path)
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 798, in _coerce_path
    return TreePath(path)
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 1146, in __new__
    path = ":".join(str(val) for val in path)
TypeError: 'NoneType' object is not iterable

Changed in software-properties (Ubuntu):
status: Confirmed → Triaged
Changed in software-properties (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
Brian Murray (brian-murray) wrote :

While it's trivial to avoid the Traceback, I think the root cause of the crash should be investigated. Looking at the errors page for the crash the majority of the crashes are from armhf systems while there are also some from arm64 and ppc64el.

Given that there are only MirrorsFile information for amd64 and i386 we should maybe just hide the "Download from:" drop down box in software-properties.

Brian Murray (brian-murray) wrote :

Given the quantity of crashes at errors.ubuntu.com about this, it seems worth fixing in Wily and Xenial.

Brian Murray (brian-murray) wrote :

I tested, the hiding of the "Other..." option in the "Download from:" drop down box, by editing Ubuntu.info and removing the line "MirrorsFile-amd64: Ubuntu.mirrors". With the chnages, when I ran software-properties-gtk I no longer saw an "Other..." option and so the choose download server dialog never appeared.

Changed in software-properties (Ubuntu Wily):
status: New → Triaged
importance: Undecided → Medium
Changed in software-properties (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.96.22

---------------
software-properties (0.96.22) yakkety; urgency=medium

  * SoftwarePropertiesGtk.py: only add mirror choices if there are mirrors
    available from which to choose. (LP: #1101881)
  * DialogMirror.py: guard against a traceback when get cursor returns None.
    (LP: #1101881)

 -- Brian Murray <email address hidden> Mon, 20 Jun 2016 11:08:28 -0700

Changed in software-properties (Ubuntu):
status: Triaged → Fix Released
Changed in software-properties (Ubuntu Xenial):
assignee: nobody → Brian Murray (brian-murray)
Brian Murray (brian-murray) wrote :

I've uploaded fixes to the SRU queues for Wily and Xenial.

Changed in software-properties (Ubuntu Wily):
assignee: nobody → Brian Murray (brian-murray)
description: updated
ernsteiswuerfel (erhard-f) wrote :

Thanks!

Hello Ryland, or anyone else affected,

Accepted software-properties into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/software-properties/0.96.20.2 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!

Changed in software-properties (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed
ernsteiswuerfel (erhard-f) wrote :

Works for me! Version tested: software-properties 0.96.20.2

I got no choice of mirrors any longer (for ppc in Austria), so no crash.

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

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

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.96.20.2

---------------
software-properties (0.96.20.2) xenial; urgency=medium

  * SoftwarePropertiesGtk.py: only add mirror choices if there are mirrors
    available from which to choose. (LP: #1101881)
  * DialogMirror.py: guard against a traceback when get cursor returns None.
    (LP: #1101881)

 -- Brian Murray <email address hidden> Tue, 21 Jun 2016 12:22:08 -0700

Changed in software-properties (Ubuntu Xenial):
status: Fix Committed → Fix Released
Changed in software-properties (Ubuntu Wily):
assignee: Brian Murray (brian-murray) → nobody
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers