Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

ERROR: Index -6 of local array is out of range in script 'addFileKeysForDictionary'. Script terminated.

Posted on by Microsoft Employee

Hi,

We are attempting to upgrade from Dynamics GP 2013 (12.00.1745) to Dynamics GP 2013 (12.00.2104) onto a different server. So far all of our efforts and "workarounds" have failed. This is the message we keep getting.

Any clues on what to do will be very welcomed

Thank you community

*This post is locked for comments

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: ERROR: Index -6 of local array is out of range in script 'addFileKeysForDictionary'. Script terminated.

    The solutions to the problem is provided in this thread:

    community.dynamics.com/.../1152489

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: ERROR: Index -6 of local array is out of range in script 'addFileKeysForDictionary'. Script terminated.

    Miguel.Vasquez@TouricoHolidays.com,

    Did you ever found out what the original problem was ?  I'm running into the same error message, though not in an upgrade, but when trying to re-synchronize the GP account framework with the main dictionary.. 

    The message captured from the pop-up right after Dynamics GP Utilities starts the sync process : 

    Unhandled script exception:
    Index -6 of local array is out of range in script 'addFileKeysForDictionary'. Script terminated.

    EXCEPTION_CLASS_SCRIPT_OUT_OF_RANGE
    SCRIPT_CMD_LINDEX

    After that, the GP Utilities hangs forever with the box on screen "Synchronizing Dictionary".. 

    What was attempted on this setup was to change the account framework for the companies, as they were initially set too short. The global setup was done with a max of 66 characters in length, 10 segments and a default of 6. 

    However, we tried to change this so it would look like this, but still be a max of 66.

    SGMTNUMB SGMTNAME                            LOFSGMNT    MXLENSEG

    1 Segment1 10 10
    2 Segment2 10 10
    3 Segment3 8 8
    4 Segment4 8 8
    5 Segment5 6 6
    6 Segment6 6 6
    7 Segment7 6 6
    8 Segment8 4 4
    9 Segment9 4 4
    10 Segment10 4 4

    But when going into GP's Account maintenance, and trying to start entering account numbers (GL00100 was empty so far), GP just skips after the 6th character to the next segment.. So dictionary synchronization was the missing link, but it errors out.. 

    Any hint to resolve this bug would be appreciate.

    EDIT: even it errors out, the GPU sync still worked as it looks like we're now able to enter the 10 digits as expected in the 1st & 2nd segment.. Still wondering about the error message.

  • Mick Egan Profile Picture
    Mick Egan 3,557 on at
    RE: ERROR: Index -6 of local array is out of range in script 'addFileKeysForDictionary'. Script terminated.

    Just to add to Leslie's answer, you might want to check the DYNAMICS.set and DYNUTILS.set from both servers have the same Modules.

    You might be introducing something new.

    Also, check your machine security isn't blocking.

    Mick

  • L Vail Profile Picture
    L Vail 65,271 on at
    RE: ERROR: Index -6 of local array is out of range in script 'addFileKeysForDictionary'. Script terminated.

    Hi Miguel,

    What all have you tried? Did you run a DEXSQL.log and/or a SQL Profiler trace on the update? Do you have any errors on any of the records in the DU000030 table in the DYNAMICS dictionary? At what point is the error thrown, how far through the upgrade had you gotten?

    Blind troubleshooting, yay. Did you submit a tech support case to Microsoft?

    Kind regards,

    Leslie

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans