Go to Post As engineers we should aspire to create, not destroy. If this is the case, why would we want to create machines with the sole purpose to destroy? - WakeZero [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #46   Spotlight this post!  
Unread 10-03-2014, 23:22
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

Quote:
Originally Posted by NotInControl View Post
... we use Java ...
We switched from C++ to Java after seeing our issues, and while it was hard to reproduce with C++, everything we have tried so far with Java has shown no sign of the problem.
Reply With Quote
  #47   Spotlight this post!  
Unread 11-03-2014, 18:12
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

Quote:
Originally Posted by compwiztobe View Post
We switched from C++ to Java after seeing our issues, and while it was hard to reproduce with C++, everything we have tried so far with Java has shown no sign of the problem.
That is interesting. I have to admit I have not yet confirmed this to be the cause of the symptoms I saw on our robot in the pits this passed weekend.

The robot in question is now bagged, however I will be trying to recreate these problems on our practice bot over the next few days.

The symptoms expressed in this thread were very similar to the symptoms we saw which is why I think this bug may be a suspect.

However, we have always had all of our smartdashboard calls in a separate thread that gets started on robot init. The reason for this is to reduce the amounts of writes per second.

The only smarthdashboard call I have that is running in the same thread as the robot thread is our autonomous sendable chooser which runs in the disabledPeriodic() block.

We are going to do testing with and without this function call to see if we can get the robot to hang again. During our quick diagnostics in the pits, the only way we could re-establish full comms was by restarting the robot, and the driverstation/dashboard. Doing just one or the other was not enough to correct the problem.

I am more concerned with preventing the robot from hanging then having my dashboard work.

We have never seen this problem on the field, as we always have a standard practice to shut robot off, and exit all dashboard/driverstaion windows prior to every match.
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
Reply With Quote
  #48   Spotlight this post!  
Unread 11-03-2014, 22:30
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

Quote:
Originally Posted by JamesTerm View Post
I believe the last issue remaining deals with the time it takes to connect to the time it takes to make the initial first write. I'm thinking of putting a sleep in there as well as taking a closer look at ConnectionMonitorThread::run()... I suspect this thread may not be sleeping in some cases... but I could be wrong.
No, no, no... I was wrong. I found this bug! grrrrr, ok it's now fixed... same place to get the zip and patch. Here's the full patch including Dustin's fixes. https://www.dropbox.com/s/f4mcx9x0hj...tinPatch.patch

I'll explain... this latest fix is for the client side code mostly... what was happening is during the time when the server (robot) loses connection like rebooting the cRIO. The client code was still trying to issue reads and throwing exceptions... the fix knows when this has been closed and when the reconnect has been issued... so during that time it will stop issuing the reads. On some platforms (e.g. win32) the read would return bogus data, which is another issue, but the most important thing is that it should be calling the read when it knows it should succeed.

This has been a week of hair pulling for me... but now I think it is good to go. Of course the key to the success of this (like anything else) is a lot of testing. All of the other fixes are just as important as this one... they all are needed to resolve issue. I'm looking forward to hearing back from anyone who wants to test it before the official release. Thanks.

Now I'm signing off of this task... and going back to other code.
Reply With Quote
  #49   Spotlight this post!  
Unread 16-03-2014, 10:56
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

For anyone who has been following up on this thread, I just wanted to say that we tested the smart dashboard and network tables (with the James/Dustin patches) for the Dallas regionals with no issue. I gotta say I felt a little bit of anxiety the first 3-4 matches, but felt more confident as the days progressed... we left driver station running on full time with SmartDashboard and Driver Station windows always on where this tests the stress of cRIO reconnect on existing connections. We also use the GetNumber() for autonomous ball count. It always maintained the correct ball count throughout the day. I am hoping more teams will use this again once these patches are officially released. I'll post back here when they are.
Reply With Quote
  #50   Spotlight this post!  
Unread 19-03-2014, 18:17
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,089
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

Update: FIRST has released an official stable release that should address the problem. It will not be a required update for teams, but if you use NetworkTables I'd highly recommend it. It can be downloaded here: http://first.wpi.edu/FRC/c/update/Stable/
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #51   Spotlight this post!  
Unread 19-03-2014, 18:41
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

Thanks Dustin for the posting... I'll keep an ear out here for any issues that may arise.
Reply With Quote
  #52   Spotlight this post!  
Unread 19-03-2014, 19:42
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

Looking through the source, it looks like artf1712 was also fixed, as well as http://forums.usfirst.org/showthread...ive-data-rates
Reply With Quote
  #53   Spotlight this post!  
Unread 22-03-2014, 23:53
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,089
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

At the Virginia Regional this weekend, I helped out a team using Java that would inexplicably go to 100% CPU and all control would drop out. While there were some definite problems with their code, it turned out that when they commented out all the SmartDashboard code, the problems stopped happening. Very odd.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #54   Spotlight this post!  
Unread 23-03-2014, 02:36
kylelanman's Avatar
kylelanman kylelanman is online now
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 191
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

We were aware of this bug and attempted to avoid the situation by always power cycling before placing the robot on the field. I am nearly certain we reproduced this bug on the practice field. We had a faulty ethernet cable. During robot power on the connection was intermittent. The dashboard never came to life. We ended up having to hard power cycle the robot and restart the dashboard. Restarting the dashboard may not have been necessary. But we did them in tandem and the dashboard came back to life. Minutes after this we applied the patch and had no NT problems the rest of the regional.
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

Reply With Quote
  #55   Spotlight this post!  
Unread 23-03-2014, 09:40
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

Quote:
Originally Posted by virtuald View Post
At the Virginia Regional this weekend, I helped out a team using Java that would inexplicably go to 100% CPU and all control would drop out. While there were some definite problems with their code, it turned out that when they commented out all the SmartDashboard code, the problems stopped happening. Very odd.
Was this team 2481, and was the 3886 patch already applied before these problems occurred?

To kylelanman: What programming language are you using?
Reply With Quote
  #56   Spotlight this post!  
Unread 23-03-2014, 10:23
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,089
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

Quote:
Originally Posted by JamesTerm View Post
Was this team 2481, and was the 3886 patch already applied before these problems occurred?
It was not team 2481, and the team was using Java, so the 3886 patch would not apply.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #57   Spotlight this post!  
Unread 23-03-2014, 23:38
kylelanman's Avatar
kylelanman kylelanman is online now
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 191
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

Quote:
Originally Posted by JamesTerm View Post
To kylelanman: What programming language are you using?
C++
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

Reply With Quote
  #58   Spotlight this post!  
Unread 24-03-2014, 17:49
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

Quote:
Originally Posted by virtuald View Post
It was not team 2481, and the team was using Java, so the 3886 patch would not apply.
Ah ok... I looked over the JAVA source and it is different in its synchronization locking management, and from what I've heard there's been no known issues with it like there was for c++. I just wanted to make sure that the patch fix does not have any more outstanding issues... and so now I know this patch does not apply to JAVA teams. If this is the only known issue it could be a red herring. I will however keep an ear out for JAVA issues too... in case we need to code review it for next season.
Reply With Quote
  #59   Spotlight this post!  
Unread 25-03-2014, 19:47
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

The update is now availible in the release folder as announced in today's team update. http://first.wpi.edu/FRC/c/update/Re...325rev3887.exe
Reply With Quote
  #60   Spotlight this post!  
Unread 26-03-2014, 14:25
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 307
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: Serious bug identified in SmartDashboard/NetworkTables -- robot hangs

At the risk of sounding ignorant in this excellent technical discussion...

Am I correct in thinking that even if we do not explicitly perform any NetworkTables operations that we could be affected by the bug in question and therefore need the update? We use the SmartDashboard only for simple display operations, eg. calling PutXXX to display values on the dashboard screen. It sounds like these operations use the NetworkTables behind the scenes and are therefore subject to this issue. So I wanted to verify if we need to install the update.

FYI, we are using C++ on the robot and the SmartDashboard on the driverstation.

Also, does this update include a change to the .jar file for the dashboard implementation which runs on the driverstation laptop or just a change to the library code built into the application that runs on the cRIO? I ask so that we know if it needs to be installed on the driverstation as well as the programming laptop.

Thanks.
__________________

Last edited by MamaSpoldi : 26-03-2014 at 14:42.
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 13:36.

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