Bug 149779 - crash with single-name devices
crash with single-name devices
Status: CLOSED DUPLICATE of bug 142801
Product: Fedora
Classification: Fedora
Component: system-config-soundcard (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bastien Nocera
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-26 10:54 EST by Adam Ambrose
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-02 12:02:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Adam Ambrose 2005-02-26 10:54:49 EST
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 12:02:11 EST

*** 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.