Bug 7337 - Jive's method of determining last chunk to fetch is broken
: Jive's method of determining last chunk to fetch is broken
Status: CLOSED FIXED
Product: SB Controller
Classification: Unclassified
Component: Browser
: unspecified
: Macintosh Other
: -- critical (vote)
: 7.0
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-26 14:24 UTC by Andy Grundman
Modified: 2009-09-08 09:18 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
patch to fix erroneously requesting null last chunk (530 bytes, patch)
2008-02-26 14:56 UTC, Ben Klaas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Grundman 2008-02-26 14:24:25 UTC
The following code is used to determine the last chunk of data to fetch:

	-- load last chunk
	local lastKey = math.modf(self.last_chunk.count / BLOCK_SIZE)
	if not self.store[lastKey] then
		return lastKey * BLOCK_SIZE, BLOCK_SIZE
	end

This fails if you have a count that is larger than block size (200) and is a multiple of block size.

To reproduce, set your block size to 10 and go to LMA -> Recent Artists, which contains 50 items.  Jive will fetch chunk '0 10' and then try to fetch '50 10' which returns no results and crashes DB.

There will be some number of people out there who have, say, exactly 400 artists and will have a completely broken artists menu.
Comment 1 Blackketter Dean 2008-02-26 14:42:18 UTC
Do you have a patch, andy?
Comment 2 Andy Grundman 2008-02-26 14:44:57 UTC
No Ben and I are looking at it.
Comment 3 Ben Klaas 2008-02-26 14:56:24 UTC
Created attachment 2997 [details]
patch to fix erroneously requesting null last chunk
Comment 4 Ben Klaas 2008-02-26 15:01:14 UTC
fixed in jive r2057, 7.0 branch
Comment 5 James Richardson 2008-05-15 13:04:33 UTC
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1

Please try that version, if you still see the error, then reopen this bug.

To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html