Quote:
Originally Posted by bob.wolff68
Jeremy,
I'm going to read some tea leaves here on your PutNumber crash with a boolean and I may or may not hit the mark... we saw an issue (and have reported it) which would crash smartdashboard/network tables and the robot consistently...
1) int i = 5; SmartDashboard:  utNumber("MyLocation", i); // This works and must be done once to induce the crash - put a non-boolean into a named location...
2) bool i = false; SmartDashboard:  utNumber("MyLocation", i); // This crashes consistently - the change from an int to a bool leaves someone with the "wrong expectation" of what type will actually be used.
// And here's the fix... don't re-use "MyLocation" with different types - in fact if you want to be sure, make sure you name your locations based on what type they will wind up receiving - "bool_MyLocation" and "int_MyLocation"
3) bool i = false; SmartDashboard:  utNumber("differentLocation", i); // This works just fine.
bob
|
Yes, I think your instinct is sound; I was suspecting something along those lines. Although note that our case uses PutBoolean, and I'm not sure that the programmers were reusing variables. We're going to try playing with this a bit, and seeing if adding an exception handler around the PutNumber calls prevents the robot code from dying at the least. Losing your camera is bad, losing your whole robot is catastrophic...
Presumably, there is some xml or other config file on the Driver Station somewhere that can be deleted to 'forget' that information, right? I'll have them try to find that and see if deleting it eases some of this pain.
One of my programmers has a hunch that sending too many variables, too fast, is another source of trouble. I think that's just superstition on his part, but I thought I'd mention it to anyone else losing hair over this.
Cheers,
Jeremy