View Single Post
  #1   Spotlight this post!  
Unread 09-03-2016, 05:27
jlindquist74's Avatar
jlindquist74 jlindquist74 is offline
WOPR Software Integration Lead
FRC #1622
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 1337
Location: Poway, CA
Posts: 41
jlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant future
ImageRegExFail (Or, why WPILib C++ Deploy may hate America™)

We had a bizarre problem crop up deploying code to one of our RoboRIOs. Deploying to the test robot worked fine, but the production robot would fail, claiming the image was not correct. The "correct" version given was 2016 v19... which is what we had installed.

The "installed" version given was the nefarious "ImageRegExFail".

After uninstalling and reinstalling plugins, Eclipse itself, and toolchains, and reformatting and reimaging and re-firmware'ing the RIO a dozen times over the course of the week, I finally found it.

If, in the NI Web-based Configuration of the RIO, you put a carriage return in the "Comments" field of the System Settings, the sysProps.xml file generated by the deploy mechanism is created with spaces between every character. Thus, the regular expression matching in build.xml that pulls out the year and version number will fail, and the deploy script promptly faceplants.

Code:
2016 Production Robot
Team 1622, Poway HS
is bad. However

Code:
2016 Production Robot Team 1622, Poway HS
is perfectly acceptable.

Either that comments field should not accept a carriage return, or the process that generates sysProps.xml needs to be modified not to choke on it.

Barring that, the Google Fairy will find this post for the next poor schmuck to run into this!
Reply With Quote