Bug 149779 - crash with single-name devices
Summary: crash with single-name devices
Keywords:
Status: CLOSED DUPLICATE of bug 142801
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-soundcard
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bastien Nocera
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-26 15:54 UTC by Adam Ambrose
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-02 17:02:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adam Ambrose 2005-02-26 15:54:49 UTC
Description of problem:
I have two sound devices; one is standard, and the other is a usb
logitech web camera.   This 2nd device shows up in the "Sound cards"
list of the hardware browser with the name of "Camera".

When I run system-config-soundcard, I get the following traceback:

<<<<
Traceback (most recent call last):
  File
"/usr/share/system-config-soundcard/system-config-soundcard.py", line
46, in ?
    app = soundcard.childWindow()
  File "/usr/share/system-config-soundcard/soundcard.py", line 87, in
__init__
    self.device, self.module, self.maker, self.model =
self.soundcardBackend.getData(card)
  File "/usr/share/system-config-soundcard/soundcardBackend.py", line
106, in getData
    maker, model = string.split(description, " ", 1)
ValueError: unpack list of wrong size
>>>>

When I added a "print description" right before the breaking line, I
noticed that the description was just "Camera".  So I added the
following to handle descriptions with no spaces:

--- soundcardBackend.py 2005-02-26 07:44:03.116916632 -0800
+++ soundcardBackend.py.modified        2005-02-26 07:43:51.838631192
-0800
@@ -102,8 +102,11 @@
         device, module, description = card
        if (string.count(description,"|") == 1):
             maker, model = string.split(description, "|")
-       else:
+       elif (string.count(description," ") == 1):
            maker, model = string.split(description, " ", 1)
+       else:
+           maker = description
+           model = ""
         return device, module, maker, model

     def playTestSound(self, module, index):

This fixed this problem, but I still ran into a problem:

/usr/share/system-config-soundcard/soundcard.py:151:
DeprecationWarning: use gtk .ComboBox
  self.primaryDeviceOptionMenu = gtk.OptionMenu()
Traceback (most recent call last):
  File
"/usr/share/system-config-soundcard/system-config-soundcard.py", line
46,  in ?
    app = soundcard.childWindow()
  File "/usr/share/system-config-soundcard/soundcard.py", line 159, in
__init__
   
self.primaryDeviceMenu.set_active(self.cardList.index(self.soundcardBackend.
getDefaultCard()))
ValueError: list.index(x): x not in list


At this point, I lost patience.  :) I just unplugged my usb camera,
and system-config-soundcard configured my standard sound card just fine.


Version-Release number of selected component (if applicable):
1.2.10-1

How reproducible:
Every time, if you have a sound card device that only shows up with
one name in its description.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Bastien Nocera 2005-04-02 17:02:11 UTC

*** This bug has been marked as a duplicate of 142801 ***


Note You need to log in before you can comment on or make changes to this bug.