audio_settings crashes if none of the element indexes (sources, sinks) is marked as active
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
High
|
Brendan Donegan |
Bug Description
On a system here (Dell Inspiron 17R), audio_settings is bombing with this trace:
Traceback (most recent call last):
File "/usr/share/
sys.
File "/usr/share/
store_
File "/usr/share/
active_entry = active_
AttributeError: 'NoneType' object has no attribute 'group'
I went in and was able to replicate this behavior by simply running:
/usr/share/
I traced this to trying to find a line like this in pactl list-sources output:
* index: 0
This is given by a regular expression defined as follows:
active_
The important part is the asterisk. On a system where the test doesn't bomb, pacmd list-sources |grep index says this:
index: 0
* index: 1
However on the failing system it's this:
index: 0
index: 1
Apparently the line where the regex search is performed assumes that it will always succeed, instead of checking that it had a match (line 91 in the script):
active_entry = active_
I'm attaching in its entirety the pacmd output that gives trouble, maybe the parsing can be fixed to accomodate this.
Related branches
- Brendan Donegan (community): Approve
-
Diff: 253 lines (+77/-58)2 files modifieddebian/changelog (+2/-0)
scripts/audio_settings (+75/-58)
Changed in checkbox: | |
importance: | Medium → High |
tags: | added: cert-sru-issue |
Changed in checkbox: | |
status: | In Progress → Fix Released |
status: | Fix Released → Fix Committed |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |
This is a matter of just making it fail more gracefully - the fact that there is no source or sink selected ought to make the test fail so I wouldn't like to change that.