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

Troubleshooting


Problem

User launches Controller for the first time, and receives an error message.
After acknowledging the error, the user closes and re-launches Controller, and re-tries.
  • This time the user may (unlikely) receive a second error.
  • However (more likely) everything works OK.
  
In other words, typically after acknowledging the error message(s), the next time there are no errors, and the user can successfully use Controller.
 
The error message(s) typically never appear again for this user.

Symptom

Example #1:
Information
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
OK
  
...followed by:
  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- Error Loading Main Menu
System.NullReferenceException: Object reference not set to an instance of an object.
at Cognos.Controller.Forms.ControllerMDI.LoadMenu()
OK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
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()
OK

Cause

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) (for example:   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.
  
Steps:
  • 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

TIP:
  • 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

[{"Product":{"code":"SS9S6B","label":"IBM Cognos Controller"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Controller","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.5.1;8.5;8.4;8.3;10.1;10.1.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

1034877

Document Information

Modified date:
05 February 2020

UID

swg21347320