"Index was out of range. Must be non-negative and less than the size of the collection" launching Controller client the first time, caused by invalid cache files
User launches Controller for the first time, and receives an error message.
* After acknowledgeing the error, the user *may* receive a second error.
After acknowledging the error message(s), the user closes and re-launches Controller. This time there are no errors, and the user can successfully use Controller.
* The error message(s) typically never appear again for this user.
Description: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Error Loading Main Menu
System.NullReferenceException: Object reference not set to an instance of an object.
at Cognos.Controller.Forms. ControllerMDI.LoadMenu()
--- Error Loading Main Menu
System.FormatException: String was not recognised as a valid Boolean
at System.Boolean.Parse(String value)
There are several possible causes for similar errors.
This Technote specifically relates the the scenario where the cause is that there are invalid Controller cache files inside end user's Windows profile.
Real-life customer examples:
Invalid files caused by a non-Cognos (customer-created) script that populates the user's profile with relevant file(s) (e.g. ccr.config).
In another real-life example, the customer had recently upgraded their version of Controller. The error was produced the first time that the end user launched Controller (immediately after the upgrade).
- The cause was some invalid (out of date) cache files (left over from previous version),
Resolving the problem
In many scenarios, the users can simply ignore the error message, and re-logon and will not ever get this problem again.
- In other scenarios, the user must delete any invalid files, and let Controller automatically re-create them during the next logon to Controller.
- Example #1:
- Example #2:
- Ensure that user not logged into Controller
- Open up the user's %APPDATA% folder (see below for explanation)
- Open the subfolder "Cognos"
- Open the subfolder "CCR"
- Delete all the files/subfolders *except* for the file "ccr.config"
- On older Windows (XP / 2003) the folder %APPDATA% is located here: C:\Documents and settings\USERNAME
- On newer Windows (Vista / 7 / 2008) the folder %APPDATA% is located here: C:\Users\USERNAME\AppData\Roaming
More support for:
Software version: 8.3, 8.4, 8.5, 8.5.1, 10.1, 10.1.1
Operating system(s): Windows
Reference #: 1347320
Modified date: 17 December 2013