Bug 8577 - Alarm breaks when an invalid playlist is selected
: Alarm breaks when an invalid playlist is selected
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Player UI
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-26 11:21 UTC by James Richardson
Modified: 2008-12-15 11:58 UTC (History)
4 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Richardson 2008-06-26 11:21:57 UTC
When an alarm using iTunes Playlist has been selected, then that playlist is removed from SC, the Alarm function fails to generate any sound.

The alarm will go off, the boom will turn on, the Icon will flash, but no sound is heard from the boom any more.
Comment 1 Max Spicer 2008-06-27 02:13:44 UTC
The alarm code needs to be able to verify that an url is valid before attempting to play it.  It should also be able to check that it succeeded and do something if it didn't (e.g. internet radio not being available).  I don't know how to do this at present.  Help wanted!
Comment 2 Max Spicer 2008-06-27 02:40:13 UTC
*** Bug 8570 has been marked as a duplicate of this bug. ***
Comment 3 Max Spicer 2008-06-27 02:41:18 UTC
This should also handle the case when current playlist is used but current playlist is empty.

See bug 8499 for adding alarm tones that could then be falled back to.
Comment 4 Max Spicer 2008-06-27 08:17:00 UTC
R21270 grabs 10 tracks at random and plays them in the case when the alarm playlist is the current playlist but this is empty.

Still need to handle invalid playlists or failed attempts to play playlists.
Comment 5 James Richardson 2008-06-27 11:18:13 UTC
Tested with FW 17 and 7.2-21271 and still can not get this to function
properly.

Steps to reproduce

1) attach a boom to SC
2) using either boom or SC set an alarm
3) select The current playlist as the alarm playlist
4) verify that the currently select playlist is empty on the now playing screen
5) wait for alarm time to pass, note: the Alarm icon on the boom will flash, but no sound will be playing
Comment 6 Max Spicer 2008-06-27 12:26:39 UTC
Your test case works for me i.e. I get 10 random tracks.  Could you enable debugging for the alarm and attach your log please.  You should see lines like the following:

[20:13:00.0263] Slim::Utils::Alarm::sound (497) Current playlist is empty
[20:13:00.0272] Slim::Utils::Alarm::sound (502) Playing 10 random tracks
Comment 7 James Richardson 2008-06-27 13:13:31 UTC
[08-06-27 13:07:06.8495] Slim::Buttons::Alarm::setMode (298) setMode called.  method is push
[08-06-27 13:07:08.4836] Slim::Buttons::Alarm::exitHandler (444) exitHandler called with exit type right
[08-06-27 13:07:08.4841] Slim::Buttons::Alarm::exitRightHandler (478) Menu item type: 'menu'
[08-06-27 13:07:08.4844] Slim::Buttons::Alarm::exitRightHandler (508) creating new alarm
[08-06-27 13:07:08.4848] Slim::Buttons::Alarm::exitRightHandler (561) Pushing into INPUT.Choice
[08-06-27 13:07:09.6069] Slim::Buttons::Alarm::exitHandler (444) exitHandler called with exit type right
[08-06-27 13:07:09.6073] Slim::Buttons::Alarm::exitRightHandler (478) Menu item type: 'time'
[08-06-27 13:07:09.6077] Slim::Buttons::Alarm::exitRightHandler (561) Pushing into INPUT.Time
[08-06-27 13:07:20.4960] Slim::Buttons::Alarm::timeExitHandler (584) exit type: right
[08-06-27 13:07:20.4986] Slim::Buttons::Alarm::saveAlarm (231) Saving alarm...
[08-06-27 13:07:20.4991] Slim::Utils::Alarm::save (754) Saving alarm.
[08-06-27 13:07:20.4998] Slim::Utils::Alarm::save (763) Alarm saved with id 59a725ff Rescheduling alarms...
[08-06-27 13:07:20.5001] Slim::Utils::Alarm::scheduleNext (989) Asked to schedule next alarm for BOOM:00:d1
[08-06-27 13:07:20.5005] Slim::Utils::Alarm::findNextTime (376) Potential next time found: 13:10:0 27/6/2008
[08-06-27 13:07:20.5010] Slim::Utils::Alarm::scheduleNext (1022) Next alarm is at 13:10:0 27/6/2008
[08-06-27 13:07:20.5013] Slim::Utils::Alarm::scheduleNext (1034) Scheduling alarm
[08-06-27 13:07:20.5017] Slim::Utils::Alarm::setRTCAlarm (1064) Asked to set rtc alarm for BOOM:00:d1
[08-06-27 13:07:20.5023] Slim::Utils::Alarm::setRTCAlarm (1095) Setting RTC alarm
[08-06-27 13:07:27.2090] Slim::Buttons::Alarm::exitHandler (444) exitHandler called with exit type right
[08-06-27 13:07:27.2094] Slim::Buttons::Alarm::exitRightHandler (478) Menu item type: 'menu'
[08-06-27 13:07:27.2136] Slim::Buttons::Alarm::exitRightHandler (561) Pushing into INPUT.Choice
[08-06-27 13:07:28.6178] Slim::Buttons::Alarm::exitHandler (444) exitHandler called with exit type right
[08-06-27 13:07:28.6182] Slim::Buttons::Alarm::exitRightHandler (478) Menu item type: 'menu'
[08-06-27 13:07:28.6185] Slim::Buttons::Alarm::exitRightHandler (561) Pushing into INPUT.Choice
[08-06-27 13:07:34.3802] Slim::Buttons::Alarm::exitHandler (444) exitHandler called with exit type left
[08-06-27 13:07:35.2851] Slim::Buttons::Alarm::setMode (298) setMode called.  method is pop
[08-06-27 13:10:00.0005] Slim::Utils::Alarm::sound (430) Alarm triggered for BOOM:00:d1
[08-06-27 13:10:00.0008] Slim::Utils::Alarm::sound (447) Sounding alarm
[08-06-27 13:10:00.0051] Slim::Utils::Alarm::pushAlarmScreensaver (1290) Attempting to push into alarm screensaver: SCREENSAVER.datetime. Current mode: INPUT.List
[08-06-27 13:10:00.0054] Slim::Utils::Alarm::pushAlarmScreensaver (1296) Pushing alarm screensaver
[08-06-27 13:10:00.0064] Slim::Utils::Alarm::sound (470) Current vol: 50 Alarm vol: 50
[08-06-27 13:10:00.0067] Slim::Utils::Alarm::sound (497) Current playlist is empty
[08-06-27 13:10:00.0069] Slim::Utils::Alarm::sound (502) Playing 10 random tracks
[08-06-27 13:10:28.2831] Slim::Utils::Alarm::_setAlarmSubscription (861) Adding alarm subscription
[08-06-27 13:10:28.2836] Slim::Utils::Alarm::scheduleNext (989) Asked to schedule next alarm for BOOM:00:d1
[08-06-27 13:10:28.2840] Slim::Utils::Alarm::findNextTime (376) Potential next time found: 13:10:0 27/6/2008
[08-06-27 13:10:28.2844] Slim::Utils::Alarm::findNextTime (382) Last alarm due: 13:10:0 27/6/2008
[08-06-27 13:10:28.2848] Slim::Utils::Alarm::findNextTime (387) Skipping..
[08-06-27 13:10:28.2851] Slim::Utils::Alarm::findNextTime (376) Potential next time found: 13:10:0 28/6/2008
[08-06-27 13:10:28.2856] Slim::Utils::Alarm::findNextTime (382) Last alarm due: 13:10:0 27/6/2008
[08-06-27 13:10:28.2859] Slim::Utils::Alarm::scheduleNext (1022) Next alarm is at 13:10:0 28/6/2008
[08-06-27 13:10:28.2861] Slim::Utils::Alarm::scheduleNext (1034) Scheduling alarm
[08-06-27 13:10:28.2863] Slim::Utils::Alarm::setRTCAlarm (1064) Asked to set rtc alarm for BOOM:00:d1
[08-06-27 13:10:28.2867] Slim::Utils::Alarm::setRTCAlarm (1095) Setting RTC alarm
[08-06-27 13:10:28.2873] Slim::Utils::Alarm::_alarmEnd (1364) _alarmEnd called with request: stop
[08-06-27 13:10:28.2875] Slim::Utils::Alarm::_alarmEnd (1375) Ignoring self-created request
[08-06-27 13:10:32.3816] Slim::Plugin::AudioScrobbler::Plugin::_handshakeOK (335) Invalid Last.fm username or password.
Comment 8 James Richardson 2008-06-27 13:15:42 UTC
Max: Here is the log, from creating the alarm, then waiting for it to go off.

I did notice that there was about a 15 second delay from when the alarm went off, and music started to play.  I'm assuming this is the time it takes to wake the server, build the list, and fetch the tracks...correct behavior?
Comment 9 James Richardson 2008-06-27 13:21:45 UTC
[08-06-27 13:17:47.3056] Slim::Buttons::Alarm::setMode (298) setMode called.  method is pop
[08-06-27 13:20:00.0008] Slim::Utils::Alarm::sound (430) Alarm triggered for BOOM:00:d1
[08-06-27 13:20:00.0014] Slim::Utils::Alarm::sound (447) Sounding alarm
[08-06-27 13:20:00.0069] Slim::Utils::Alarm::pushAlarmScreensaver (1290) Attempting to push into alarm screensaver: SCREENSAVER.datetime. Current mode: INPUT.List
[08-06-27 13:20:00.0073] Slim::Utils::Alarm::pushAlarmScreensaver (1296) Pushing alarm screensaver
[08-06-27 13:20:00.0085] Slim::Utils::Alarm::sound (470) Current vol: 0 Alarm vol: 100
[08-06-27 13:20:00.0089] Slim::Utils::Alarm::sound (473) Changing volume from 0 to 100
[08-06-27 13:20:00.0110] Slim::Utils::Scanner::scanPathOrURL (65) Error: No path or URL was requested!
[08-06-27 13:20:00.0126] Slim::Utils::Alarm::_setAlarmSubscription (861) Adding alarm subscription
[08-06-27 13:20:00.0129] Slim::Utils::Alarm::scheduleNext (989) Asked to schedule next alarm for BOOM:00:d1
[08-06-27 13:20:00.0133] Slim::Utils::Alarm::findNextTime (376) Potential next time found: 13:20:0 27/6/2008
[08-06-27 13:20:00.0137] Slim::Utils::Alarm::findNextTime (382) Last alarm due: 13:20:0 27/6/2008
[08-06-27 13:20:00.0140] Slim::Utils::Alarm::findNextTime (387) Skipping..
[08-06-27 13:20:00.0143] Slim::Utils::Alarm::findNextTime (376) Potential next time found: 13:20:0 28/6/2008
[08-06-27 13:20:00.0146] Slim::Utils::Alarm::findNextTime (382) Last alarm due: 13:20:0 27/6/2008
[08-06-27 13:20:00.0150] Slim::Utils::Alarm::scheduleNext (1022) Next alarm is at 13:20:0 28/6/2008
[08-06-27 13:20:00.0154] Slim::Utils::Alarm::scheduleNext (1034) Scheduling alarm
[08-06-27 13:20:00.0157] Slim::Utils::Alarm::setRTCAlarm (1064) Asked to set rtc alarm for BOOM:00:d1
[08-06-27 13:20:00.0162] Slim::Utils::Alarm::setRTCAlarm (1095) Setting RTC alarm
[08-06-27 13:20:00.0171] Slim::Utils::Alarm::_alarmEnd (1364) _alarmEnd called with request: stop
[08-06-27 13:20:00.0174] Slim::Utils::Alarm::_alarmEnd (1375) Ignoring self-created request
Comment 10 James Richardson 2008-06-27 13:23:07 UTC
After the last test, I cleared the playlist, turn the BOOM off, then rescheduled the alarm via the SC Web UI.

I noticed the alarm time changed on the Player, but failed to play the requested random 10 songs when the alarm was triggered.
Comment 11 Max Spicer 2008-06-27 13:49:13 UTC
I'm confused.  Do you mean that in comment #7 and #8 music did start to play after all?  A 15 second delay certainly isn't expected, but that could be a different issue.

In comment #9 you get the following:

[08-06-27 13:20:00.0110] Slim::Utils::Scanner::scanPathOrURL (65) Error: No path or URL was requested!

I don't know what this means, but it looks suspicious.

Is your sc setup unusual in any way?  I'm afraid I'm out of my depth here - it would probably be helpful if you could get other slimdevices folk to take a look.  As I said in the first comment, I could do with some help on this bug!
Comment 12 James Richardson 2008-06-27 14:08:19 UTC
Max:  Correct, in comment #7 the alarm did go off.  In comment #9 the alarm did NOT go off.

Exact same boom / SC.  The only difference was that for #9 the boom was turned off, where in #7 the boom was left on (but not playing anything)

Comment 13 Max Spicer 2008-06-27 14:16:38 UTC
Got you.  I can reproduce that here if the boom is on but not playing when the alarm sounds.  Oddly, it loads the tracks and makes every appearance of playing but no audio comes out.  This now persists when I stop the alarm, play new tracks etc.  I think the volume has somehow got itself very confused.  It shows as 50 and if I increase it I can just about here music.
Comment 14 Max Spicer 2008-06-27 14:42:36 UTC
Sorry, it turns out I can't reproduce it after all.  My previous comment was due to some weird behaviour from a dsp image that Caled checked in.  The alarm did in fact start playing just fine, but the volume was really low due to the unrelated (I hope!) issue.  I don't know why it's not working for you, I'm afraid.  Let's see what other users get.  It would be really helpful if you could try reproducing on other people's setups.  Maybe there's something unique about mine that I've missed?
Comment 15 Max Spicer 2008-07-02 10:14:58 UTC
R21439 should hopefully fix this bug.  A timer is set for 20 seconds after the alarm sounds to check that music is playing.  If it isn't, the standard fallback behaviour is invoked, which is currently random tracks.  This should catch all situations apart from the music library being empty.  (Bug 8499 would allow even that situation to be handled)
Comment 16 KDF 2008-07-05 17:13:05 UTC
for linking purposes, that's change 21439.  For reference, bugzilla will automatically create links to the svn repo by matching the pattern "change \d+".  Using this form allows for quick reference to the diff.
Comment 17 Chris Owens 2008-07-07 10:40:53 UTC
Thank you Max!
Comment 18 James Richardson 2008-07-08 12:00:56 UTC
Verified fixed in 7.2-21573 r18

HOWEVER, it took almost 30 seconds for music to start playing
Comment 19 James Richardson 2008-12-15 11:58:45 UTC
This bug has been fixed in the latest release of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.