IBM Support

"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

Technote (troubleshooting)


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.


Example #1:

    Standard Error
    Number: 5
    Source: mscorlib
    Description: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

...followed by:
    --- Error Loading Main Menu
    System.NullReferenceException: Object reference not set to an instance of an object.
    at Cognos.Controller.Forms. ControllerMDI.LoadMenu()

Example #2:
    --- Error Loading Main Menu
    System.FormatException: String was not recognised as a valid Boolean
    at System.Boolean.Parse(String value)
    at Cognos.Controller.Forms.ControllerMDI.LoadMenu()


There are several possible causes for similar errors.

  • TIP: See separate IBM Technote #1459450 for more examples.
    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:
    Example #1:
    Invalid files caused by a non-Cognos (customer-created) script that populates the user's profile with relevant file(s) (e.g. ccr.config).
    Example #2:
    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:
    Check whether there is a logon script that is automatically populating users profiles as they logon, and modify/disable this as necessary. Afterwards perform the steps inside Example #2 (below).
    • Example #2:
    Reset the user's Controller cache by performing the following:
    1. Ensure that user not logged into Controller
    2. Open up the user's %APPDATA% folder (see below for explanation)
    3. Open the subfolder "Cognos"
    4. Open the subfolder "CCR"
    5. Delete all the files/subfolders *except* for the file "ccr.config"
    6. Test

    • 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

    Related information

    1499456 - How to automatically clear local cache when c
    1459450 - ** Troubleshooting ** "Error Loading Main Men

    Historical Number


    Document information

    More support for: Cognos Controller

    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