I have a four tuner WinTV-quadHD card. The tuners show up as "Device" tabs in the "Configure Television" window. In each of these tabs, I set a "Source" and "Name" for the corresponding tuner. After saving this information and quitting kaffeine, the values for higherVoltage in the config.dvb file were very large values (probably random, uninitialized junk). The value for the first tuner is a positive number, the values for the remaining tuners are negative. If I then restart kaffeine, it complains that "kaffeine.dvb: Cannot read /home/rfisher/.local/share/kaffeine/config.dvb". However, it is able to read the "Source" and "Name" for the first tuner, but not the remaining tuners. If you quit at this point, it will rewrite config.dvb with this information removed for the second through fourth tuners, but leaving the stored information for the first tuner. If you edit config.dvb and replace the negative values for higherVoltage with the same large, positive value used for the first tuner, it reads the entire file, does not complain about that it can't, and gets the correct "Name" and "Source" information for all four tuners. So, this is what I think is happening: 1. kaffeine is storing uninitialized data for higherVoltage into the config.dvb file. higherVoltage appears to be of type Qt::CheckState which should only have the values 0, 1, or 2. It should not have large positive or negative values. 2. The error message implies that the file permissions are incorrect - they are not. kaffeine is able to read and write to the file. I think it is trying to indicate that the file is malformed due to the negative values for higherVoltage. If so, the error message should say so clearly.
(In reply to Randall Fisher from comment #0) > I have a four tuner WinTV-quadHD card. The tuners show up as "Device" tabs > in the "Configure Television" window. In each of these tabs, I set a > "Source" and "Name" for the corresponding tuner. > > After saving this information and quitting kaffeine, the values for > higherVoltage in the config.dvb file were very large values (probably > random, uninitialized junk). The value for the first tuner is a positive > number, the values for the remaining tuners are negative. > > If I then restart kaffeine, it complains that "kaffeine.dvb: Cannot read > /home/rfisher/.local/share/kaffeine/config.dvb". > > However, it is able to read the "Source" and "Name" for the first tuner, but > not the remaining tuners. If you quit at this point, it will rewrite > config.dvb with this information removed for the second through fourth > tuners, but leaving the stored information for the first tuner. > > If you edit config.dvb and replace the negative values for higherVoltage > with the same large, positive value used for the first tuner, it reads the > entire file, does not complain about that it can't, and gets the correct > "Name" and "Source" information for all four tuners. > > So, this is what I think is happening: > 1. kaffeine is storing uninitialized data for higherVoltage into the > config.dvb file. higherVoltage appears to be of type Qt::CheckState which > should only have the values 0, 1, or 2. It should not have large positive > or negative values. Hmm... did you change Kaffeine to a newer version? If so, then maybe it is just the backward-compatible code for config.dvb generated with older versions that is broken. > 2. The error message implies that the file permissions are incorrect - > they are not. kaffeine is able to read and write to the file. I think it > is trying to indicate that the file is malformed due to the negative values > for higherVoltage. If so, the error message should say so clearly. Yeah, the message there is not nice: if (!reader.isValid()) qCWarning(logDvb, "Cannot read %s", qPrintable(file.fileName())); I'll fix it.
Added two patches: dvbmanager: higherVoltage exists only for DVB-S: https://commits.kde.org/kaffeine/26d6ce62732baaa87f9eea432513db3e5e78cb47 dvbmanager: Improve config.dvb parsing error message: https://commits.kde.org/kaffeine/daa7865398d0897cc2fef7d218b3a8fbce6ea664 > > When the config.dvb file reader fails, it produces a very > obscure message. Improve it.
(In reply to Mauro Carvalho Chehab from comment #2) > Added two patches: > > dvbmanager: higherVoltage exists only for DVB-S: > > https://commits.kde.org/kaffeine/26d6ce62732baaa87f9eea432513db3e5e78cb47 > > dvbmanager: Improve config.dvb parsing error message: > > https://commits.kde.org/kaffeine/daa7865398d0897cc2fef7d218b3a8fbce6ea664 Sorry, hit enter before finishing... Those two patches should address both issues.