Avarray: Index 43 not in range 0..42

Last Published: April 25, 2020

Error Message

This error occurs when opening a project file:

"Avarray: Index 43 not in range 0..42"


The project file contains a corrupt document.

Solution or Workaround

  1. Make a backup copy of the .apr file.

    Editing in a text editor can permanently damage a project file. If you do make a mistake, revert to the back-up copy.

  2. Open .apr file in WordPad or NotePad. The top of the file should look like this:

    FirstRootClassName: "Project"
    Roots: 2
    Version: 30

    Name: "proj1.apr"
    CreationDate: "Thursday, June 12, 1997 07:10:01"
    GUIName: "Project"
    Win: 3
    CSMgr: 4
    VisGUIWidth: 70
    Doc: 5
    Doc: 177
    Doc: 143
    Doc: 187
    Doc: 39
    ActiveDoc: 187
    Buttons: 378
    Buttons: 379
    Buttons: 380
    Dependencies: 381
    Scripts: 382
    WorkDir: 1178
    WinX: 11
    WinY: 4
    WinW: 852
    WinH: 594
    SerialNumber: "#######"
    SelColor: 1179
    GUINames: 1180
    GUINames: 1181
    GUINames: 1182
    GUINames: 1183
    GUINames: 1184
    GUINames: 1185
    GUINames: 1186

    The object of interest is 'Project.2,' which contains this list of document objects:

         Doc: 5 
    Doc: 177
    Doc: 143
    Doc: 187
    Doc: 39
    ActiveDoc: 187

  3. Delete the "ActiveDoc:" line.
  4. Add an REM to the beginning of all the document lines except for the first one. The example above would look like this:

         Doc: 5 
    REM Doc: 177
    REM Doc: 143
    REM Doc: 187
    REM Doc: 39

    ArcView does not recognize REM as a valid object keyword. Therefore, ArcView will treat this line as a comment causing the document to be skipped.

  5. Save the file. Don't exit the text editor yet.
  6. Open the project in ArcView.

    If the project opens, the document without the REM is OK. Don't save the project in ArcView. Go back to the text editor and remove the REM from the beginning of the second line. Save the file and try again in ArcView.

    If the project doesn't open, the document without the REM is bad. Add the REM to the beginning of the document line and delete the REM from another Document line.

    Use the process of elimination until you find all the bad documents and keep as many good ones as possible.

Article ID:000003806

  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic