ERROR: hook /usr/share/apport/package-hooks/source_gnome-control-center.py crashed: TypeError: add_info() takes 1 positional argument but 2 were given

Bug #1237119 reported by Daniel Hahler
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Fix Released
Medium
Brian Murray

Bug Description

% ubuntu-bug gnome-control-center-data
ERROR: hook /usr/share/apport/package-hooks/source_gnome-control-center.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 197, in _run_hook
    symb['add_info'](report, ui)
TypeError: add_info() takes 1 positional argument but 2 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 202, in _run_hook
    symb['add_info'](report)
  File "/usr/share/apport/package-hooks/source_gnome-control-center.py", line 30, in add_info
    report["usr_lib_gnome-control-center"] = package_versions(*sorted(plugin_packages))
  File "/usr/lib/python3/dist-packages/apport/hookutils.py", line 790, in package_versions
    map(max, [map(len, t) for t in zip(*versions)])
ValueError: need more than 0 values to unpack
ubuntu-bug gnome-control-center-data 27,10s user 16,70s system 81% cpu 53,692 total

(process:6725): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: gnome-control-center-data 1:3.6.3-0ubuntu43
ProcVersionSignature: Ubuntu 3.11.0-11.17-generic 3.11.3
Uname: Linux 3.11.0-11-generic x86_64
ApportVersion: 2.12.5-0ubuntu1
Architecture: amd64
Date: Wed Oct 9 00:48:54 2013
InstallationDate: Installed on 2012-05-28 (498 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: gnome-control-center
UpgradeStatus: Upgraded to saucy on 2013-10-08 (0 days ago)

Revision history for this message
Daniel Hahler (blueyed) wrote :
tags: added: apport-hook
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Tobiasz Jarczyk (dotnokato-q) wrote :

I can confirm this bug happening in trusty.

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

This probably has something to do with the plugins installed and apport being unable to find the package version for one of them. We can see the following in the hook:

    # collect informations on the /usr/lib/control-center-1 components
    plugin_packages = set()
    for paneldir in (['/usr/lib/control-center-1'] + glob.glob('/usr/lib/*/control-center-1')):
        for dirpath, dirnames, filenames in os.walk(paneldir):
            for filename in filenames:
                path = os.path.join(dirpath, filename)
                package = apport.packaging.get_file_package(path)
                if package == 'gnome-control-center':
                    continue

                plugin_packages.add(package)

        report["usr_lib_gnome-control-center"] = package_versions(*sorted(plugin_packages))

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

Actually, get_file_package can return None ("Return None if the file is not shipped by any package."), which would cause the issue.

Changed in gnome-control-center (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Brian Murray (brian-murray)
importance: Undecided → Medium
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the fix Brian!

Changed in gnome-control-center (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.6.3-0ubuntu50

---------------
gnome-control-center (1:3.6.3-0ubuntu50) trusty; urgency=low

  [ Sebastien Bacher ]
  * debian/gnome-control-center.links: drop old symlink that was used
    to add a system-settings entry to indicator-session, that's deprecated

  [ Brian Murray ]
  * debian/source_gnome-control-center.py: Do not attempt to find the version
    of a package for a plugin not from a package. (LP: #1237119)

  [ Robert Ancell ]
  * debian/gnome-control-center.sh:
  * debian/rules:
    - Add a wrapper to run unity-control-center in Unity
  * debian/patches/10_keyboard_layout_on_unity.patch:
  * debian/patches/ubuntu_update_translations_template.patch:
    - Rename unity-region-panel to gnome-unity-region-panel so it doesn't
      conflict with the one in unity-control-center
 -- Robert Ancell <email address hidden> Thu, 09 Jan 2014 11:47:33 +1300

Changed in gnome-control-center (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Tobiasz Jarczyk (dotnokato-q) wrote :

Hi,
After upgrading gnome-control-center to version 1:3.6.3-0ubuntu50 I am still getting exceptions when running ubuntu-bug gnome-control-center:

$ ubuntu-bug gnome-control-center-data
ERROR: hook /usr/share/apport/package-hooks/source_gnome-control-center.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 197, in _run_hook
    symb['add_info'](report, ui)
TypeError: add_info() takes 1 positional argument but 2 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 202, in _run_hook
    symb['add_info'](report)
  File "/usr/share/apport/package-hooks/source_gnome-control-center.py", line 32, in add_info
    report["usr_lib_gnome-control-center"] = package_versions(*sorted(plugin_packages))
  File "/usr/lib/python3/dist-packages/apport/hookutils.py", line 790, in package_versions
    map(max, [map(len, t) for t in zip(*versions)])
ValueError: need more than 0 values to unpack

$ sudo apt-cache policy gnome-control-center
gnome-control-center:
  Zainstalowana: 1:3.6.3-0ubuntu50
  Kandydująca: 1:3.6.3-0ubuntu50
  Tabela wersji:
 *** 1:3.6.3-0ubuntu50 0
        500 http://pl.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

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

Tobiasz - Thanks for letting me know about the incomplete fix.

Changed in gnome-control-center (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.6.3-0ubuntu52

---------------
gnome-control-center (1:3.6.3-0ubuntu52) trusty; urgency=low

  * debian/patches/gcc_not_in_unity.patch:
    - don't list "Unity" in OnlyShowIn, other g-c-c and u-c-c entries get
      duplicated in the Unity dash, when they both installed (lp: #1280872)
  * debian/libgnome-control-center1.symbols,
    debian/patches/10_keyboard_layout_on_unity.patch,
    debian/patches/input-sources-text-entry.patch,
    debian/patches/sound_nua_panel.patch,
    debian/patches/unity_menus.patch,
    debian/patches/unity_notice_info.patch:
    - dropped some unity specific changes

  [ Brian Murray ]
  * debian/source_gnome-control-center.py: Do not pass an empty list
    of plugin packages to apport. (LP: #1237119)
 -- Sebastien Bacher <email address hidden> Wed, 26 Feb 2014 19:21:03 +0100

Changed in gnome-control-center (Ubuntu):
status: In Progress → Fix Released
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.