Bug 319261

Summary: Pause in sound alarm repeating isn't respected
Product: [Applications] kalarm Reporter: wojnilowicz <lukasz.wojnilowicz>
Component: soundAssignee: David Jarvie <djarvie>
Status: CLOSED FIXED    
Severity: normal CC: drtwox
Priority: NOR    
Version: 2.10.1-ak   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.10.5
Sentry Crash Report:
Attachments: Calendar with a single alarm that exhibits the buggy behaviour
Calendar with a single alarm that exhibits the buggy behaviour
Raw payload for the buggy alarm
Screenshot of kalarm to show the alarm is active and valid
This is the alarm
The calendar file for the alarm.

Description wojnilowicz 2013-05-03 09:14:05 UTC
My sound alarm keeps repeting without pauses that I've set earlier

Reproducible: Always

Steps to Reproduce:
1. start Kalarm
2. new sound alarm
3. choose e.g. /usr/share/sounds/pop.wav as sound file
4. check repeat
5. enter e.g. 2 seconds
6. hit ok
7. edit above alarm
Actual Results:  
Pause in sound alarm repeating is 128 s

Expected Results:  
Pause in sound alarm repeating should be 2 s

Choose /usr/share/sounds/pop.wav particulary then you will see how unplesant sound it is.
Comment 1 David Jarvie 2013-05-29 22:41:41 UTC
I can't reproduce this fault on my system. Which audio backend are you using? (Go to System Settings -> Multimedia -> Backend tab).
Comment 2 David Jarvie 2013-05-29 22:44:53 UTC
Actually, I wonder if I have understood your report correctly. Do you mean that there is a gap of 128 seconds between repetitions of the sound? If so, I don't understand why you find the sound to be unpleasant.
Comment 3 wojnilowicz 2013-05-30 05:01:38 UTC
(In reply to comment #1)
> I can't reproduce this fault on my system. Which audio backend are you
> using? (Go to System Settings -> Multimedia -> Backend tab).

GStreamer throught Phonon
Phonon 4.6.0
GStreamer 0.10.36

(In reply to comment #2)
> Actually, I wonder if I have understood your report correctly. Do you mean
> that there is a gap of 128 seconds between repetitions of the sound? If so,
> I don't understand why you find the sound to be unpleasant.

That's what is displayed, but it isn't respected. The sound is repeated without any pause at all. If you've choose pop.wav which is ca. 1 s long and represents an "click" and in case of alarm you hear that "click" second by second then it's unpleasant and you feel like attacked by "clicks".
Comment 4 David Jarvie 2013-06-04 12:58:19 UTC
Can you please attach your KAlarm calendar file containing one of these faulty alarms. It is likely to be ~/.kde/share/apps/kalarm/calendar.ics (you can confirm its location by selecting View -> Show Calendars, and in the Calendars list, hover the mouse over the Active Alarms item). Feel free to remove other alarms or modify display texts if you are concerned about privacy.
Comment 5 drtwox 2013-06-05 07:28:39 UTC
Created attachment 80308 [details]
Calendar with a single alarm that exhibits the buggy behaviour
Comment 6 David Jarvie 2013-06-05 15:56:14 UTC
Unfortunately the calendar you attached doesn't contain any alarms. Perhaps the alarm had already expired or been deleted before you copied the calendar file?
Comment 7 drtwox 2013-06-05 22:00:00 UTC
Created attachment 80325 [details]
Calendar with a single alarm that exhibits the buggy behaviour

Sorry about the last one.
Comment 8 David Jarvie 2013-06-06 00:44:10 UTC
Sorry, but the new attachment also contains no alarms. Alarms start with a line beginning "BEGIN:VEVENT" and end with "END:VEVENT", so you can check whether a calendar file contains alarms by checking for these lines.

To find out what is wrong, please carry out the following steps:
1) Check that the alarm is definitely still active by deselecting View -> Show Archived Alarms (if it is archived, it will disappear from the list with this option deselected).

2) Check that it still shows in the alarm list.

3) If it shows, check that you only have one active alarms calendar (shown in the Calendars list).

4) Check the calendar file whose name is displayed when you hover over the active alarms calendar in the Calendars list, and see if there are any VEVENT lines.

5) If not, it seems likely that the alarm database may contain alarms which have not been stored in the calendar file. This shouldn't happen. If you are able to, please run "akonadiconsole" application to investigate this, and perform the steps below.

a) In its Agents tab, find the active alarms calendar with the KAlarm icon beside it, and click on it. Note the Identifier shown in the Details section at the bottom of the window.

b) In the Browser tab, right click on the active alarms entry in the left-hand pane, and select Folder Properties from the context menu. Select the Internals tab, and check that the "Owner" is the same as the Identifier noted in step 5. If not, and if there are other active alarms entries shown in the Browser tab, repeat for those entries until you find one with the correct Owner.

c) The alarms in the selected calendar are shown in the top right pane. Select the Raw Payload tab and then select each alarm in turn. Copy the contents of all the alarms into a text file and attach it.

This should help to establish what is wrong, and should help in working out a fix.
Comment 9 drtwox 2013-06-06 07:21:27 UTC
Created attachment 80329 [details]
Raw payload for the buggy alarm

This is the raw payload collected with the method described.
Comment 10 drtwox 2013-06-06 07:22:14 UTC
Created attachment 80330 [details]
Screenshot of kalarm to show the alarm is active and valid
Comment 11 drtwox 2013-06-06 07:23:18 UTC
Created attachment 80331 [details]
This is the alarm

No matter what I change it to, the pause between repetitions will always revert to 128 seconds.
Comment 12 drtwox 2013-06-06 07:24:43 UTC
Created attachment 80332 [details]
The calendar file for the alarm.
Comment 13 drtwox 2013-06-06 07:29:22 UTC
That is the only calendar.ics file in my entire home directory, and I have exactly one alarm in kalarm.

I have attached the raw payload, the calendar file and two screenshots showing the alarm. You are correct that the calendar file appears to have no alarms, yet the screenshot shows that it does. This alarm persists when I quit kalarm and is there when I reload it, so it must be saving somewhere, but as mentioned above my entire home directory has only the one calendar file, located at ~/.kde/share/apps/kalarm/calendar.ics.
Comment 14 David Jarvie 2013-06-06 12:54:09 UTC
Thanks for all that information. I have now managed to reproduce the fault. It appears to only happen with Audio alarms, so you could get round it for now by setting up a display alarm which plays a sound file. I'll fix this for the next release.

Unfortunately what you have reported shows another fault also, that your alarm configuration is not being saved to your alarm calendar file. Could you please check the permissions on the calendar file, and ensure that is writable by you.

If it is writable:
1) Ensure that an active alarm is displayed in KAlarm main window (create a new one if necessary).
2) Run akonadiconsole. In the Agents tab, select the KAlarm active alarms calendar, and click Restart.
3) After the calendar restart has completed, check whether the alarm is still visible in the KAlarm main window.
4) If the alarm is still visible, check whether the calendar file has been updated to include the alarm details (BEGIN:VEVENT ... END:VEVENT).
Comment 15 drtwox 2013-06-06 21:59:26 UTC
Yes, it is writable.

I found that following those four steps did not fix the save problem so I deleted the existing alarm and recreated it; it is now listen in the calendar.ics file.

Thanks for the help and keep writing great software! :)
Comment 16 David Jarvie 2013-06-15 14:20:54 UTC
This is now fixed. The fix will be in KDE 4.10.5.

kdepim commits: d143ebccabb32a2321518d5a02a356f897947e58 (4.10 branch), 64c8dd14026402a7930db90e100ac40aab3a8dc6 (master)
kdepimlibs commits: d143ebccabb32a2321518d5a02a356f897947e58 (4.10 branch), 12416aecb320699ab7d79c643668ecd7583c1281.