Error in line 58 of audio.py: passing float as list index

Bug #1022580 reported by Francesco Brundu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport-symptoms (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

1)
Description: Ubuntu 12.04 LTS
Release: 12.04

2)
apport-symptoms:
  Installed: 0.16
  Candidate: 0.16
  Version table:
 *** 0.16 0
        500 http://it.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

3)
Trying to report bug with 'ubuntu-bug audio'

4)
Step to reproduce:

'ubuntu-bug audio'

choose '2'

-----------------------------------
As a workaround I edited line 58 to

return (None, cards[int(nr/2)], nr % 2 == 0, None)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: apport-symptoms 0.16
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
ApportVersion: 2.0.1-0ubuntu11
Architecture: amd64
Date: Mon Jul 9 16:29:30 2012
Dependencies:

EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120328)
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
SourcePackage: apport-symptoms
UpgradeStatus: No upgrade log present (probably fresh install)

tags: added: quantal
description: updated
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

I really don't understand which the problem could be.

nr is taken from input as integer, for some reason in some configurations python gets a float and returns a casting error.

I cannot reproduce in my personal pc, so this should be something related to beagleboard or english usb keyboard

Changed in apport-symptoms (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

This would be a problem with Python 3, which we use in Ubuntu 12.10 now. It ought to work in 12.04 with Python 2, as some_int/2 is still an int (rounded down).

Changed in apport-symptoms (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport-symptoms - 0.18

---------------
apport-symptoms (0.18) quantal; urgency=low

  * symptoms/audio.py: Ensure we use integer array indexes when dividing.
    (LP: #1022580)
 -- Martin Pitt <email address hidden> Thu, 12 Jul 2012 06:59:39 +0200

Changed in apport-symptoms (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.