Bug? Index was outside the bounds of the array???

Discussion in 'Bugs & wishlist' started by JohnCody, Jun 18, 2015.

  1. JohnCody

    JohnCody Active Member Licensed User

    I just upgraded to B4A 5.03 from 4.x and when I tried to load in my first existing project, I got this error:

    "An error occurred.
    Error Loading file.
    Index was outside the bounds of the array."

    What is wrong - I am dead in the water now because I cant load this project that just today loaded fine in v4.

    I will try to downgrade back to 4.x because I have a deadline to meet with this project, so I hope doing so will waste any time with headaches.
     
  2. JohnCody

    JohnCody Active Member Licensed User

    Now its giving me the same error AFTER downgrading to v4.3 AND restoring my project files that I luckily backed up before installing V5.

    What gives! Now I have to waste time getting V4.3 working which was just working fine before trying to upgrade to v5 :(

    What system files could V5 have changed that now V4 wont work????
     
  3. sorex

    sorex Expert Licensed User

    did you install it in the same folder? if so, reneame that folder and try again.
     
  4. JohnCody

    JohnCody Active Member Licensed User

    I found out this problem - luckily in quick order.

    For some reason, B4A 4.x corrupted my project.b4a file today - it had these two lines in it:

    Build1=,com.omnisoft.ackbrowser
    Build2=DEBUG,com.omnisoft.ackbrowser,ISME

    As you can see the first parameter in "Build1" is missing, causing the initial problem. So I replaced both lines with the single default value:

    Build1=Default,com.omnisoft.ackbrowser

    But then I got another error:

    "An error occurred.
    Error loading file.
    index was out of range. Must be non-negative and less then the size of the collection.
    Parameter name: Index"

    This seems to have been caused by my project.b4a.meta having these entries in it:

    ModuleClosedNodes3=59
    SelectedBuild=1

    This second error appears to been caused by me reducing the number of builds in my project.b4a file from 2 to one (to fix the first problem), but the meta file had "SelectedBuild=1", which now doesn't exist, so I had to change it to "0" so its in sync with the change I made to the project.b4a file above.

    I don't know what the "ModuleClosedNodes3=59" line does, but the version of my project that loaded OK from yesterday had a value if 58, so I also did this change to make sure this issue will be fixed.
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Note that you can delete the meta file and it will be recreated.
     
Loading...