Bug 7829 - Jive menu broken if BLOCK_SIZE == list count + 1 and "Play All" or similar is prepended to the list
: Jive menu broken if BLOCK_SIZE == list count + 1 and "Play All" or similar is...
Status: NEW
Product: Logitech Media Server
Classification: Unclassified
Component: Controller
: 7.0.1
: PC Other
: P2 normal (vote)
: Future
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-15 08:05 UTC by Ben Klaas
Modified: 2011-01-14 12:08 UTC (History)
5 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Klaas 2008-04-15 08:05:23 UTC
This is a general problem with both queries in XMLBrowser.pm and Queries.pm. If the BLOCK_SIZE is exactly equal to the requested list size, and an extra item like "Play All" is being prepended on the top of the list, the menu is broken.

With a default BLOCK_SIZE of 200, this condition is rarely hit. 

However, this is easily reproducible with desktop Squeezeplay by finding a directory that gets a "Play All" added, determine the list size (just from the query, not including the extra item(s) added for the menu), then set BLOCK_SIZE in DB.lua to that number, restart Squeezeplay and browse back to that directory.
Comment 1 Chris Owens 2008-04-16 09:20:56 UTC
Ben notes the right way to fix this is an architectural change that needs serious thinking.  
Comment 2 Ben Klaas 2008-04-16 09:22:38 UTC
though Richard notes that my architectural change idea is flawed in that it just pushes the hack from SC to Jive.

I'm out of ideas on how to effectively fix this. Suggest a meeting post 7.0.1 to discuss only this issue.
Comment 3 Chris Owens 2008-06-19 09:23:46 UTC
Maybe Mickey can coordinate such a meeting?
Comment 4 Ben Klaas 2008-06-19 10:46:45 UTC
I'm not sure this requires a meeting, given there's fairly strong resistance to changing how we have it now. I'd like to see it changed to something less headache-inspiring, but I don't see it happening.

assigning to myself for assessment post 7.1
Comment 5 Ben Klaas 2008-07-25 07:59:28 UTC
punting to 7.3
Comment 6 James Richardson 2008-10-14 15:58:44 UTC
Ben: do Michael's changes in bug 9566 comment 12 change 23550 affect this bug?
Comment 7 Ben Klaas 2008-10-14 16:12:40 UTC
no, that change will do nothing to fix this bug
Comment 8 Ben Klaas 2008-11-02 12:24:27 UTC
this isn't going to be fixed by 7.3. retarget for 7.3.1
Comment 9 Ben Klaas 2008-12-11 11:06:10 UTC
Tom and I speculated that the fix for Bug 7186 on the 7.4 jive branch may have also fixed this issue

from empirical tests, that is not the case, although the criteria for hitting the bug may have slightly changed.

To test, I browsed to Music Library->Genres->Rock, and noted through debug messages what the size of that list was (124). I then changed BLOCK_SIZE to 124 and retested (works), 125 (works), and 123 (request loop, broken menu scrolling).

I also saw that a BLOCK_SIZE of 61 (but not 60, 62, or 63) reproduced the issue

this debug is actually showing the count being returned differently with each chunk...

130413:10800 INFO (NetworkThread.lua:254) - NOTIFY: playerNew(Player {Squeezebox 160109})
130414:11723 WARN (DB.lua:184) - ********************************* total count:124
130414:11723 WARN (DB.lua:185) - ********************************* loading key number 0
130414:11724 WARN (DB.lua:186) - ********************************* cFrom: 1
130414:11724 WARN (DB.lua:187) - ********************************* cTo:   61
130415:12352 WARN (DB.lua:184) - ********************************* total count:123
130415:12352 WARN (DB.lua:185) - ********************************* loading key number 2
130415:12352 WARN (DB.lua:186) - ********************************* cFrom: 123
130415:12352 WARN (DB.lua:187) - ********************************* cTo:   123
130416:13779 WARN (DB.lua:184) - ********************************* total count:124
130416:13780 WARN (DB.lua:185) - ********************************* loading key number 0
130416:13780 WARN (DB.lua:186) - ********************************* cFrom: 1
130416:13780 WARN (DB.lua:187) - ********************************* cTo:   61
130417:14432 WARN (DB.lua:184) - ********************************* total count:123
130417:14433 WARN (DB.lua:185) - ********************************* loading key number 2
130417:14433 WARN (DB.lua:186) - ********************************* cFrom: 123
130417:14433 WARN (DB.lua:187) - ********************************* cTo:   123
130418:15865 WARN (DB.lua:184) - ********************************* total count:124
130418:15865 WARN (DB.lua:185) - ********************************* loading key number 0
130418:15865 WARN (DB.lua:186) - ********************************* cFrom: 1
130418:15865 WARN (DB.lua:187) - ********************************* cTo:   61
130419:16493 WARN (DB.lua:184) - ********************************* total count:123
130419:16493 WARN (DB.lua:185) - ********************************* loading key number 2
130419:16493 WARN (DB.lua:186) - ********************************* cFrom: 123
130419:16493 WARN (DB.lua:187) - ********************************* cTo:   123
130420:17931 WARN (DB.lua:184) - ********************************* total count:124
130420:17931 WARN (DB.lua:185) - ********************************* loading key number 0
130420:17931 WARN (DB.lua:186) - ********************************* cFrom: 1
130420:17931 WARN (DB.lua:187) - ********************************* cTo:   61
130421:18567 WARN (DB.lua:184) - ********************************* total count:123
130421:18567 WARN (DB.lua:185) - ********************************* loading key number 2
130421:18567 WARN (DB.lua:186) - ********************************* cFrom: 123
130421:18567 WARN (DB.lua:187) - ********************************* cTo:   123
130422:20208 WARN (DB.lua:184) - ********************************* total count:124
130422:20208 WARN (DB.lua:185) - ********************************* loading key number 0
130422:20208 WARN (DB.lua:186) - ********************************* cFrom: 1
130422:20208 WARN (DB.lua:187) - ********************************* cTo:   61
vk/squeezeplay/7.4/trunk/squeezeplay/build/osx/bin: 
Comment 10 Ben Klaas 2009-01-05 10:17:22 UTC
retarget for 7.3.3
Comment 11 Chris Owens 2009-03-16 09:35:15 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 12 KDF 2009-03-16 21:20:42 UTC
I think I may have addressed a related issue as part of bug 10646 where the list gets broken in Queries::playlistTracksQuery.  The last item (favourites) is lost in many cases, but the patch fixes this.

I'm holding off merging as I'd like to have feedback.
Comment 13 Chris Owens 2009-03-30 17:29:51 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 14 Chris Owens 2009-03-31 08:51:45 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 15 Andy Grundman 2009-07-30 21:49:54 UTC
Old bug, it can wait.