Go to Post So let me get this straight. We'll have 6 hours to re-build an entirely new robot that took us 6 weeks originally to make. - [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #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
  #2   Spotlight this post!  
Unread 09-03-2016, 11:09
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 298
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: ImageRegExFail (Or, why WPILib C++ Deploy may hate America™)

Here's another easy fix if you know what you're doing

Go to %userprofile%/wpilib/cpp (or java)/current/ant
Open build.xml
Scroll mostly to the bottom
Comment out the image check

Also the reason sysprops appears to have spaces between every character is because it's encoded in utf16. Build.xml should be reading it as utf16 (for us the image regex works fine, even though our sysprops has the same apparent spaces between every character - and afaik our comment isn't multi-line)

Last edited by euhlmann : 09-03-2016 at 11:13.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-03-2016, 02:14
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
Re: ImageRegExFail (Or, why WPILib C++ Deploy may hate America™)

That's a great short-term solution, good enough for me, but not one I could use beyond my own systems. We had the windfall this year of a large programming team, most of whom had their own laptops, and a programming mentor who worked with all of them to write robot code and deploy it on a test board attached to a test drive chassis. I don't want to have them all fuss with their installations like that.

Besides, they won't all keep up on updates, so they should have the version check enabled to catch them.

I saw how things are flagged utf-16, I don't know why the sysProps is read incorrectly here while it succeeds for others. Maybe I'll figure that out later on.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi