Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic VMBuild beta error message (Read 1741 times)
MartinOB
Newbies
*
Offline


Posts: 2
Joined: Jan 2nd, 2018
VMBuild beta error message
Jan 2nd, 2018 at 2:53pm
Print Post  
Hi,

I have an Arduino project original written using Visual Micro in VS2017. I'm trying to get it to build automatically within Jenkins on Windows using the beta version of VMBuild.

It works well on my development PC. It works from the command line on my build server but from Jenkins it says:

The operation failed with exception: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index


This is a .net framework error but beyond that I'm stuck. Is there some way to get more information about what collection it's trying to index? I already have verbose mode switched on. The exact same command works from the command prompt so I guess it might be something to do with file ownership or permissions.

Any suggestions gratefully received.

Thanks!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMBuild beta error message
Reply #1 - Jan 2nd, 2018 at 2:58pm
Print Post  
I might need to add some trace commands for you. However that error might be that the board can't be resolved. Can you confirm what arguments Jenkins is passing to the vmbuilder?

Thanks
« Last Edit: Jan 2nd, 2018 at 2:58pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
MartinOB
Newbies
*
Offline


Posts: 2
Joined: Jan 2nd, 2018
Re: VMBuild beta error message
Reply #2 - Jan 2nd, 2018 at 3:13pm
Print Post  
Thanks for the super quick response.

As often happens (at least to me) the act of writing down the problem suggests a solution. In this case Jenkins was running as the default system user. By changing it to run as my user account it works. I have almost no insight into why this might make any difference.

Anyway, in case it's helpful, the console log is:

[HU build] $ cmd /c call C:\Windows\TEMP\jenkins6867705393334229892.bat

C:\Program Files (x86)\Jenkins\workspace\HU build>set \Windows\System32\WindowsPowerShell\v1.0\;C:\Program indowsApps 

C:\Program Files (x86)\Jenkins\workspace\HU build>VMBuild.exe -builder.verbose=true -builder.build=true -builder.project_path="C:\Program Files (x86)\Jenkins\workspace\HU build\OB_Carrot_HC\OB_Carrot_HC\OB_Carrot_HC.vcxproj" -builder.board_id="OB1 Hand Controller" 
The operation failed with exception: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

C:\Program Files (x86)\Jenkins\workspace\HU build>exit -1 

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMBuild beta error message
Reply #3 - Jan 2nd, 2018 at 3:22pm
Print Post  
Thanks

This might be related to the fact that arduino stored download board packages in users\[your name]\arduino15

So I suspect the resolution of "your name" needs the right account.

You can also create a folder below the arduino ide folder called "portable". Then copy everything from arduino 15 into portable including sub folder. Restarting both Ide's should leave them happily using \portable instead of the user specific location. You don't need to do this because you have it working but maybe useful to know.



  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint