Page 1 of 1

List index out of bounds (-1) building in IA10

Posted: Fri Nov 05, 2010 3:04 pm
by jkrasky
Hello,

I just downloaded InstallAware 10 and I am attempting to build one of the setups developed in the last release of InstallAware 9. When I click the build button, it immediately throws an erorr:

"List index out of bounds (-1)"

Any ideas on what this could mean or how to troubleshoot?

Re: List index out of bounds (-1) building in IA10

Posted: Fri Nov 05, 2010 3:05 pm
by jkrasky
Hello,

Just to clarify, the setup successfully builds under IA 9 R2 with the latest build.

Thanks!

Re: List index out of bounds (-1) building in IA10

Posted: Fri Nov 05, 2010 8:05 pm
by mills
I haven't encountered this yet in IA 10.

This post seems closest to what you describe:
http://installaware.com/forum/viewtopic.php?f=2&t=5127

However, I don't think it's relevant. I would go about troubleshooting this by commenting out sections of code, probably include script statements first (since I have a feeling your project includes numerous scripts)

Re: List index out of bounds (-1) building in IA10

Posted: Mon Nov 08, 2010 11:18 am
by jkrasky
Hello Mills,

Thanks for the response. Is there any way to trace the build process in InstallAware so I can see where it's failing without having to spend all day commenting things in and out? This build worked perfectly in InstallAware 9 R2, so it's a little frustrating that this is now a problem.

Thanks again for any tips!

-Jeff

Re: List index out of bounds (-1) building in IA10

Posted: Mon Nov 08, 2010 5:52 pm
by mills
There's only the dialog that appears when compiling, which can be helpful. Whatever precedes the error can help lead you to the right place to look.

I'd create a copy of the project to start with for troubleshooting. Try removing all the install files commands and see what happens.

If you want to submit a project to us, you can post it here or email it to [email protected]. As reduced of a project you can supply that produces the error would be appreciated (hence the recommendation to try removing install file commands and any commands that reference anything [local files/folders, but support files should be OK] on your system that wouldn't be found on a different system).

Re: List index out of bounds (-1) building in IA10

Posted: Wed Dec 08, 2010 2:59 am
by Sean Flook
I have just experienced exactly the same issue with one of our projects, I have sucessfully upgraded a number of other projects without issue.

As for the compiling dialog this error appears before the dialog appears so there is no way of determining where the problem lies.

I was wondering if you had worked out what the problem was.

Cheers
Sean

Re: List index out of bounds (-1) building in IA10

Posted: Wed Dec 08, 2010 2:38 pm
by mills
We haven't been able to reproduce this in-house. Is it possible for someone to post a project that exhibits this? You could also email it to [email protected]

Re: List index out of bounds (-1) building in IA10

Posted: Thu Dec 09, 2010 11:01 pm
by mills
As I investigated this, I began to think that it was probably a case that somewhere in the code there was an extra IF statement. As far as Sean goes, he emailed us his project and I was able to solve this by eliminating an extra else statement, found in this area (around line 818):

Generate Native Images for assembly ...
Generate Native Images for assembly ...
Generate Native Images for assembly ...
end
end
end
end <--- This was the culprit, right here!
[compiler end]
Set Variable PROGRESS to 100
end <--- Or this one, however you want to look at it.
One "good practice" I encourage is to match each end statement with a comment indicating what if it should be paired with:

if Variable truth Equals TRUE

...Do some stuff

Comment: end if Variable truth Equals TRUE
end

It's very helpful when an if statement spans more than the visible screen or where complicated decisions are being made.

Re: List index out of bounds (-1) building in IA10

Posted: Fri Dec 10, 2010 2:03 am
by Sean Flook
Hi Andy,

If I removed either of the end statements you indicated I get the error Insufficient END statements when trying to compile the project. But after further investigation it was due to a misplaced 'end' statement. The one from line 818 should have been moved to the last line of the project.

Thanks for your assistance.

Sean