SharePoint Calendar – Offset and length were out of bounds….

When swapping from the Day view to Week view of a SharePoint calendar, we were getting the following error message: “Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection”.

Tried setting the Information Management Policy Settings to 2 months (was 3) to archive list down to less items (It had about 4800 records, got it down to 4200). [NB: Run Information Management Policy job first, then Expiration Policy]. Problem was not resolved.

We have 2 views of the data, filtered to a different number of items in each. (The calendar displays a timetable for instrumental music lessons). I moved an instrument from one view to the other, thereby cutting down the number of items in the larger view. The error message then went away.

UPDATE: Just discovered that part of the problem was that there were recurring events in the calendar with an end date way out to 2015 which was adversely affecting the number of results returned by the query.