This project is read-only.

"ERROR: Cannot index into a null array" converting from PSADT 3.6.0 to PSADT 3.6.1

Topics: Archive - Deployment Scripts
Apr 3, 2015 at 4:52 AM
Edited Apr 3, 2015 at 4:53 AM
I took one of my existing scripts and decided to convert it to the latest production release and received the following error when attempting to execute the script.
ERROR: C:\Users\yralexandre\ESD\distrib_ENT\VLC\v2.2.0\PSADTv3.6.1\VLC\VLC-Media-Player-2.2.0.ps1 : Module
ERROR: [C:\Users\yralexandre\ESD\distrib_ENT\VLC\v2.2.0\PSADTv3.6.1\VLC\AppDeployToolkit\AppDeployToolkitMain.ps1] failed to load:
ERROR: Cannot index into a null array.
ERROR:
ERROR: At C:\Users\yralexandre\ESD\distrib_ENT\VLC\v2.2.0\PSADTv3.6.1\VLC\VLC-Media-Player-2.2.0.ps1:95 char:81
ERROR: + ... gging } Else { . $moduleAppDeployToolkitMain }
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: At line:1 char:1
ERROR: + C:\Users\yralexandre\ESD\distrib_ENT\VLC\v2.2.0\PSADTv3.6.1\VLC\VLC-Media-Player-2. ...
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
ERROR: + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,VLC-Media-Player-2.2.0.ps1
ERROR:
Any suggestions??
Developer
Apr 3, 2015 at 5:44 AM
Edited Apr 3, 2015 at 8:16 AM
From the above, it is kind of unclear where the error is taking place.

Seems like there is an attempt to index into something that is a null array.

For example if we had an null array:
[array]$a=$null

And we tried to index into it like so:
$a[1]
Apr 11, 2015 at 3:46 AM
mmashwani wrote:
From the above, it is kind of unclear where the error is taking place.

Seems like there is an attempt to index into something that is a null array.

For example if we had an null array:
[array]$a=$null

And we tried to index into it like so:
$a[1]
The unedited Deploy-Application.ps1 exhibits the same behavior when executed; I mentioned this because I have been able to execute the The unedited Deploy-Application.ps1 of previous versions (particularly PASDT v3.5 and v3.6) with out error. In my original post I simply merged (copied and pasted) the into the Deploy-Application.ps1 of PSADT v3.6.1 using Beyond Compare (a file comparison tool).
Developer
Apr 11, 2015 at 7:14 PM
Please try the latest 3.6.2 beta under the "Source Code" tab of the site to see if it fixes the issue.