TheBigW / DRC

Digital Room Correction plugin for rhythmbox
GNU General Public License v3.0
39 stars 1 forks source link

more error trapping required #9

Open fossfreedom opened 9 years ago

fossfreedom commented 9 years ago

I had changed from channel 1 to channel 2 and clicked measure.

This completed the measure but instead of the dialog I saw error #8

I closed the dialog and tried to reopen - no dialog shown.

I shutdown rhythmbox and restarted with rhythmbox -D DRC and captured the following when trying to open the DRC dialog:

(19:57:30) [0x8dd600] [getDeviceListFromAlsaOutput] DRC/DRCUi.py:321: found pattern : [('0', 'HDA Intel MID', '0', 'ALC272X Analog'), ('0', 'HDA Intel MID', '3', 'HDMI 0')]
(19:57:30) [0x8dd600] [getDeviceListFromAlsaOutput] DRC/DRCUi.py:321: found pattern : [('0', 'HDA Intel MID', '0', 'ALC272X Analog')]
(19:57:30) [0x8dd600] [DRCDlg.getAlsaRecordHardwareString] DRC/DRCUi.py:774: alsa input device : hw:0,0
(19:57:30) [0x8dd600] [DRCDlg.getRecordingDeviceInfo] DRC/DRCUi.py:534: executing: ['arecord', '-D', 'hw:0,0', '--dump-hw-params', '-d 1']
(19:57:30) [0x8dd600] [DRCDlg.getRecordingDeviceInfo] DRC/DRCUi.py:537: hw infos : err : b'arecord: main:722: audio open error: Device or resource busy\n' out : b''
Traceback (most recent call last):
  File "/home/foss/.local/share/rhythmbox/plugins/DRC/DRC_rb3compat.py", line 740, in _activate
    self._connect_func(action, None, self._connect_args)
  File "/home/foss/.local/share/rhythmbox/plugins/DRC/DRCUi.py", line 532, in show_ui
    self.initUI()
  File "/home/foss/.local/share/rhythmbox/plugins/DRC/DRCUi.py", line 214, in initUI
    self.updateRecDeviceInfo()
  File "/home/foss/.local/share/rhythmbox/plugins/DRC/DRCUi.py", line 300, in updateRecDeviceInfo
    recDeviceInfo = self.getRecordingDeviceInfo()
  File "/home/foss/.local/share/rhythmbox/plugins/DRC/DRCUi.py", line 276, in getRecordingDeviceInfo
    if len(numChanels[0]) > 1 and not numChanels[0][1]:
IndexError: list index out of range

I thought I capture this "bug" before I logout and login to see if I can get the measure option to work again

TheBigW commented 9 years ago

ouch, must admit I have no idea how to handle that... alsa seems to indicate that the device is busy so other than showing a friendly message to restart RB and try again later I am not sure what else I could do if I detect this state... for the root cause I am not sure... the only external process that uses alsa resources is the measurement script which shall be closed/finished if it completed. Another possibility could be the volume spawning (InputVolumeProcess). Not sure if showing the mic volume is worth this possible side effect but thought it could be helpful. Interesting would be what happened during dialog close ... there shall be some output from

self.inputVolumeUpdate.stop()

fossfreedom commented 9 years ago

if I encounter that error again then I'll add that debugging option.

Just to say - maybe if you see that error message just output a message saying the user should logout/login since that's how I fixed the alsa busy issue.