Dear Maintainer,
After installing Trixie, carrying over Kaffeine's configuration from Bookworm, the program crashes whenever I try to schedule a DVB-T recording via the EPG.
Steps to reproduce
1. Start Kaffeine.
2. Watch a channel (DVB-T2 in my case) for a few seconds to populate the EPG.
3. Open the EPG and select a programme to record.
4. Either
* click "Anzeige aufnehmen" ("Record Show") for a programme, or
* right-click the programme and select "Anzeige aufnehmen" ("Record Show") from the context menu.
Observed Behaviour
Kaffeine terminates immediately and must be restarted.
Expected Behaviour
A recording should be scheduled without crashing.
Additional information
DVB-T2 device: Bus 001 Device 010: ID 2040:8268 Hauppauge soloHD
Firmware: dvb-demod-si2168-d60-01.fw in /lib/firmware
Computer: Thomas Krenn AG, Low Energy Server v4, bought June 2023
Recordings already scheduled while using Bookworm continue to be recorded normally.
Watching live TV, switching channels, muting and unmuting, etc. work as normal.
The problem appears only after installing Trixie, where I kept users’ home directories, so Kaffeine’s configuration was carried over from Bookworm. The problem did not appear under Bookworm.
I will test with a fresh user profile and send a follow-up for this report.
Dear Maintainer,
The program also crashes when choosing "Fernsehen -> Sofortaufnahme"
("Television -> Instant Record") from the menu.
Dear Maintainer,
One can work around the crash by inserting data for shows to be recorded directly into the database, as follows:
- Gather the following details for the recording:
Name
Channel
Date and Time when the show begins, expressed in UTC
Duration (hh:mm:ss)
- Find the channel from the list of channels:
$ echo 'select name from channels order by name asc;' | sqlite3 ~/.local/share/kaffeine/sqlite.db
- Glean the format for entries:
$ echo 'select * from RecordingSchedule order by Begin asc;' | sqlite3 ~/.local/share/kaffeine/sqlite.db
6|Die Unbeugsamen|3sat HD|2025-09-29T20:15:00ZZ|02:00:00|0||||||100|0
7|Unsere Geschichte - Als der Beat-Club den Norden rockte|NDR FS SH HD|2025-10-18T09:55:00ZZ|00:55:00|0|||2025-10-18T10:00:00Z|2025-10-18T10:45:00Z|00:45:00|10|0
- Then write your own INSERT statement.
$ sqlite3 ~/.local/share/kaffeine/sqlite.db
SQLite version 3.46.1 2024-08-13 09:16:08
Enter ".help" for usage hints.
sqlite> INSERT INTO RecordingSchedule
(Name, Channel, Begin, Duration, Repeat, Priority, Disabled)
VALUES
('Re: Cosplay - Das Spiel mit einer anderen Identität',
'arte HD',
'2025-09-29T09:25:00ZZ',
'00:30:00',
0,
100,
0);
sqlite> select * from RecordingSchedule order by Begin asc;
8|Re: Cosplay - Das Spiel mit einer anderen Identität|arte HD|2025-09-29T09:25:00ZZ|00:30:00|0||||||100|0
6|Die Unbeugsamen|3sat HD|2025-09-29T20:15:00ZZ|02:00:00|0||||||100|0
7|Unsere Geschichte - Als der Beat-Club den Norden rockte|NDR FS SH HD|2025-10-18T09:55:00ZZ|00:55:00|0|||2025-10-18T10:00:00Z|2025-10-18T10:45:00Z|00:45:00|10|0
sqlite> ^D
Hi,
I can confirm this bug. Kaffeine crashes when adding or modifying DVB
channels or recordings.
The issue is in SqlInterface::sqlFindFreeKey, where std::prev is called
with an invalid argument (-1).
I tested the following fix (removing the -1 argument), and it resolves the
crash:
--- a/src/sqlinterface.h
+++ b/src/sqlinterface.h
@@ -87,7 +87,7 @@
if (!container.isEmpty()) {
- sqlKey = SqlKey(std::prev(container.constEnd(), -1).key().sqlKey +
1);
+ sqlKey = SqlKey(std::prev(container.constEnd()).key().sqlKey + 1);
}
[...]
This patch works for me. Could it be integrated into the Debian package?
Regards,
[Dominique]