Bug 10391 - RandomMix with now genre selected leads to DB error
: RandomMix with now genre selected leads to DB error
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.3.0
: PC Other
: P1 major with 1 vote (vote)
: 7.4.0
Assigned To: Andy Grundman
:
Depends on: 8201
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-18 22:33 UTC by Michael Herger
Modified: 2009-10-05 14:27 UTC (History)
12 users (show)

See Also:
Category: Bug


Attachments
screen capture of SqueezePlay changing genres (2.89 MB, video/avi)
2009-02-18 02:51 UTC, Bruno Liechti
Details
this log belongs to previously attached video (6.76 KB, application/octet-stream)
2009-02-18 09:06 UTC, Bruno Liechti
Details
screen capture of SqueezePlay and responding SqueezeCenter (11.89 MB, video/x-msvideo)
2009-08-09 03:22 UTC, Bruno Liechti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2008-12-18 22:33:33 UTC
James reported:

Some times I get the following error
 
[08-12-18 15:49:25.4991] Slim::Control::Request::execute (1889) Error: While
trying to run function coderef [Slim::Plugin::RandomPlay::Plugin::cliRequest]:
[Carp::Clan::__ANON__(): Error executing 'SELECT me.id, me.url,
me.content_type, me.title, me.titlesort, me.titlesearch, me.album, me.tracknum,
me.timestamp, me.filesize, me.disc, me.remote, me.audio, me.audio_size,
me.audio_offset, me.year, me.secs, me.cover, me.vbr_scale, me.bitrate,
me.samplerate, me.samplesize, me.channels, me.block_alignment, me.endian,
me.bpm, me.tagversion, me.drm, me.musicmagic_mixable, me.musicbrainz_id,
me.lossless, me.lyrics, me.replay_gain, me.replay_peak, me.extid FROM tracks me
WHERE ( id IN (  ) ) ORDER BY RAND()': DBD::mysql::st execute failed: You have
an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near ') ) ORDER BY RAND()' at line 1
at
/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm
line 771.
]
 
 
This happened when selecting a Single Genre, playing, selecting NO genre,
selecting a new genre, attempting to play.
 
This happens from the Controller UI or the WEB UI
Comment 1 Simon Turner 2009-01-08 02:36:22 UTC
This bug seems to have replaced bug 8201. I am still experiencing bug 8201 in Windows 7.3.1.
Comment 2 Michael Herger 2009-01-08 02:41:31 UTC
*** Bug 8201 has been marked as a duplicate of this bug. ***
Comment 3 Michael Herger 2009-01-08 05:53:20 UTC
change 24559 - RandomPlay would fail on SQL query or use wrong genre when all tracks of a given genre have been played. Delete correct hash element to reset the counter.
Comment 4 Michael Herger 2009-01-10 09:18:23 UTC
*** Bug 10210 has been marked as a duplicate of this bug. ***
Comment 5 James Richardson 2009-01-22 09:58:36 UTC
Fixed - Closed Message (SC)

This bug has been fixed in the 7.3.3 release version 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.
Comment 6 James Richardson 2009-01-22 13:53:56 UTC
Correction: SqueezeCenter version is 7.3.2
Comment 7 Bruno Liechti 2009-02-17 14:13:00 UTC
I'm sorry to tell you that I still encounter this problem with SC 7.4 - 25015 and SBC 7.4 r4154

This is CONTROLLER ONLY. The web UI works fine!

Bug #8201 seems to have described the problem more precisely: 

When I play a random song mix, everything works fine and the playlist is filled up with songs of the chosen genres. When I stop now playing and go back to change genres selection, the new set of random songs is still chosen from the previously selected genres.

I have to manually clear the playlist and wait for a short message saying "random mix stopped". After this reset the random songs out of the new genres will play.
Comment 8 Michael Herger 2009-02-17 23:56:29 UTC
James - can you reproduce this issue?
Comment 9 Simon Turner 2009-02-18 01:26:48 UTC
I am still experiencing the inability to start a random playlist using a new genre without previously clearing the last randon mix playlist too. This on 7.3.3 - 25037
Comment 10 Bruno Liechti 2009-02-18 02:51:21 UTC
Created attachment 4826 [details]
screen capture of SqueezePlay changing genres
Comment 11 James Richardson 2009-02-18 08:37:28 UTC
Bruno / Simon

Can you please attach a log file.

go to Settings > Advanced > Logging
check 'save logging settings...'
Set plugin.randomplay = DEBUG
click Apply
shut down SC
locate your log folder
delete the server.log file
start SC
replicate the error condition
shut down SC
locate and attach the server.log file to this bug
=================================================

I am unable to replicate the stated error with SC 7.3.2 r24695
will retest with nightly 7.4
Comment 12 Bruno Liechti 2009-02-18 09:06:14 UTC
Created attachment 4827 [details]
this log belongs to previously attached video
Comment 13 Michael Herger 2009-02-23 06:49:31 UTC
I've tested this with 7.3.3 and 7.4 - and it's working fine for me. No error messages, no misbehaviour. It always plays a new mix based on the newly selected genre.

QA to reproduce
Comment 14 Bruno Liechti 2009-02-23 10:09:29 UTC
On Windows XP and Mac OS 10.4 misbehaviour still occurs after clean re-install of latest SC 7.4-25127 without 3rd-party-plugins.

Is there anything else I can do beside submitting a log and a video to help you reproduce this issue? Thanks for investigating.
Comment 15 Chris Owens 2009-03-16 09:43:35 UTC
We are now planning to make a 7.3.3 release.  Please review your bugs (all marked open against 7.3.3) to see if they can be fixed in the next few weeks, or if they should be retargeted for 7.4 or future.

Thanks!
Comment 16 James Richardson 2009-03-26 13:22:45 UTC
Using SC 7.3.3 r25687
SBC r4673

Library: 11 Tracks, 11 Artists, 6 Genres

1) Clear and Scan library
2) Pick up Controller
3) Navigate to: Music Library > Random Mix > Choose Genres
4) Click on Select None
5) Click on 1st genere listing (Alt Rock for me)
6) LEFT arrow
7) Click on Song Mix | 2 items get populated into the playlist, both correctly Alt Rock Genre
8) LEFT arrow
9) Click on Choose Genres > Click 1st item to clear the sector box
10) Click on 2nd item (Country for me)
11) LEFT arrow
12) Click on Song Mix | 1 item is populated into the playlist, correctly Country genre.  NOTE: This is the ONLY item in the current playlist, the 2 Alt Rock items were removed
===========================
Doing the above I am unable to reproduce the error as described in bug 8201 or comment 7

IF i'm not doing what your doing, please list out STEP-By-STEP instructions.  Also, please test with a SUBSET of your full library as well.
Comment 17 Bruno Liechti 2009-03-27 09:13:39 UTC
Re-test using:
SC 7.3.3 r25698
SBC r4673

1. SUBSET Library: 22 Tracks, 11 Artists, 11 Genres => works

2. FULL Library: 7970 Tracks, 360 Artists, 12 Genres => doesn't work, see comments #7 & #10

Thanks for considering the library size factor.
Comment 18 James Richardson 2009-03-27 10:04:05 UTC
OK, expanding my Library to:

Total Tracks: 44,060
Total Albums: 3,936
Total Artists: 4,245
Total Genres: 123


I now see the issue.  Selecting a new genre will NOT fully clear the current playlist, the 1st item will stay the same, all items in the playlist after the first will properly change to the new genre.

This ONLY happens on the controller.  Using the WEB UI or IP3K UI I do not see this error happen.
Comment 19 Bruno Liechti 2009-03-27 10:16:01 UTC
My behaviour still seems to be different from yours.

"...the 1st item will stay the same, all items in the playlist after the first will properly change to the new genre."

For me the whole playlist is filled up with tracks from the previously selected  genre.
Comment 20 Simon Turner 2009-03-27 10:51:24 UTC
My experience is the same as Brunos (as has been as long as I can remember). I am on 7.3.3. If you can't reproduce it James maybe it is affected by some other setting that Bruno and I have set in common (although I can't imagine what it acn be).
Comment 21 Chris Owens 2009-03-30 17:31:29 UTC
Since there's now a planned 7.3.3 release, bugs which won't make the cut-off are being moved to the next target out.  If you feel that this bug needs to be addressed more (or less) urgently than the 7.4 release, please cc chris@slimdevices.com and leave a comment in the bug to that effect so we can review it.

Thanks.
Comment 22 Chris Owens 2009-03-31 08:53:55 UTC
For some reason Bugzilla did not change the target when I did this yesterday.  Or maybe it was me.  In either case, I'm trying it again.
Comment 23 Simon Turner 2009-04-25 05:22:37 UTC
I have the latest 7.3.3. nightly (26209) and Random Mix still does not work correctly.

Using the controller and random song mix.

If I select a genre and play Random Song Mix then select an different genre, unselecting the first and hit play for the song mix (not tried oither mixes) then Random Mix will still play the genre that I have deselected and not the newly selected genre. Even if I pause Random Mix inbetween changing genres the old (unselected) selected genre will play. I can only change genres by stopping Random Mix, which on the controller seems to mean that I have to play a non-Random Mix selected track before I can play another genre via Random Mix.

It is not a random problem. It always happens, and it has been happening for ages.

Is that what this bug is describing? I've got a bit lost in the discussion above.
Comment 24 Jim McAtee 2009-04-27 11:26:15 UTC
(In reply to comment #23)
> If I select a genre and play Random Song Mix then select an different genre,
> unselecting the first and hit play for the song mix (not tried oither mixes)
> then Random Mix will still play the genre that I have deselected and not the
> newly selected genre.

I can confirm this bug.  Here's what I find in SC 7.4, operating from the web interface:

1. Select a single genre and press 'Save'.

2. Press 'Random Songs'.

The current song stops, the old playlist is emptied and songs from the correct genre are loaded and begin to play.

3. Unselect the previously chosen genre and select another, then press 'Save'.

The current song does _not_ stop, the playlist is _not_ emptied.  When the current song ends, however, songs from the correct genre(s) will be added to the end of the playlist.

So, what's happening (in the web interface, at least) is:

a) Any time you 'play random songs/artists/years' it clears the playlist and begins again, as it should.

b) If you select and save a new genre mix, only the FIRST time after beginning playback does it correctly clear the playlist and begin playing a new song.  All subsequent changes and saves fail to clear the playlist of the old genre mix.
Comment 25 Chris Owens 2009-04-27 17:15:54 UTC
Increasing the 'importance' based on feedback from users.
Comment 26 Andy Grundman 2009-08-08 06:27:05 UTC
OK I see some problems with the web form.  Are you guys saying when you change the genres and click save it should immediately restart playback using that genre? (It does this some of the time.)  I'm not sure that's the intuitive thing that should happen, since 'play' wasn't actually clicked.
Comment 27 Simon Turner 2009-08-08 16:04:51 UTC
No, I'm, not saying that, although it might well be useful. I'm saying that when I stop RandomMix, choose a different set of genres and restart it the newly chosen set of genres should be played.
Comment 28 Bruno Liechti 2009-08-09 02:23:38 UTC
I second Simon's comment #27. This happens on the Controller/SqueezePlay (all the time).

Jim's comment #24 seems to be another issue.
Comment 29 Bruno Liechti 2009-08-09 03:22:10 UTC
Created attachment 5590 [details]
screen capture of SqueezePlay and responding SqueezeCenter

Windows XP SP3
SqueezePlay August 08 2009
SqueezeCenter 7.3.3

I hope this video contributes to a clarification. Thanks for your efforts!
Comment 30 Simon Turner 2009-08-09 03:46:07 UTC
I am perplexed that this bug seems so difficult to replicate and that it does not affect all users when it is a constant bug for me.
I include multiple genres in my genre tag using ; as a delimiter. Might that have a bearing?
Comment 31 Bruno Liechti 2009-08-09 03:52:33 UTC
(In reply to comment #30)
> I include multiple genres in my genre tag using ; as a delimiter.

So do I.
Comment 32 Andy Grundman 2009-08-09 18:52:11 UTC
Thanks, that's very helpful.  There are probably two separate issues here, one with the Controller UI and one with the web.  I'll work on the controller issue first.
Comment 33 SVN Bot 2009-08-11 05:30:28 UTC
 == Auto-comment from SVN commit #28145 to the slim repo by michael ==
 == https://svn.slimdevices.com/slim?view=revision&revision=28145 ==

Fixed Bug: 10391
Description: we need to reset track list when changing genres; this was done in the web page handler, but not the CLI choosegenre command

This issue was not related to the original report. When in doubt please open a new bug report instead of re-opening an existing one to avoid confusion. Thanks!
Comment 34 James Richardson 2009-10-05 14:27:12 UTC
This bug has been marked as fixed in the 7.4.0 release version of SqueezeBox Server!
    * SqueezeCenter: 28672
    * Squeezebox 2 and 3: 130
    * Transporter: 80
    * Receiver: 65
    * Boom: 50
    * Controller: 7790
    * Radio: 7790  

Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes

If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html

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