Closed PeterMitrano closed 6 years ago
What version of python is it? And is it the latest version of pynetworktables?
Also, what are you connecting to? LabVIEW, Java, C++ ... and what version?
This looks very similar to https://github.com/robotpy/pynetworktables/issues/42, are you sure you're not using an old version?
I'm using pynetworktables==2018.1.0
with python 3.5
the network tables server is on the robot, and the robot program is in C++
I can't reproduce it locally just with outline viewer in server mode, so it's possible the network table running on the robot is somehow out of date. I know it has one of the valid releases of wpilib from this season
It's most likely a weird key that's being incorrectly encoded that's causing issues. Are you using camera server? Any chance you can connect with outline viewer and look at the camera name or description and see if there's something weird in it?
I wrote a stream debugger last year... never pushed it to master for some reason. I've updated it and pushed it to the handshake-2018
branch. Please install that... if an exception is thrown, then it will write the stream to a file called 'file.bin'. Attach that here and I'll take a look tomorrow.
Let me know when I can expect to receive a file.bin
from you, and I'll allocate some time in my schedule to take a look at it.
I'm gonna try this out now--thanks for the quick response
Any news?
A similar bug has been reported on CD: https://www.chiefdelphi.com/forums/showthread.php?p=1754568
No I realized I need the physical robot to test and haven't had a chance
On Thu, Apr 5, 2018, 23:52 Dustin Spicuzza notifications@github.com wrote:
Any news?
A similar bug has been reported on CD: https://www.chiefdelphi.com/forums/showthread.php?p=1754568
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/robotpy/pynetworktables/issues/61#issuecomment-379141064, or mute the thread https://github.com/notifications/unsubscribe-auth/AD0zEgdXnXIdLnr32lyEHuIvWw3ffiKfks5tluZ-gaJpZM4S8PFy .
In 2481's camera name there is a circle R (~restricted~ registered) for the Microsoft live cam. Would that cause problems?
That should be handled correctly, but it's possible it isn't.
(BTW, ® is the registered trademark symbol, not restricted.)
I cannot reproduce a crash by putting a string containing ® in OutlineViewer in server mode and connecting pynetworktables (both Python 2 and Python 3) to it, at least.
Okay. That was the only thing that stood out as strange to me in the keys / values.
I already sent this Dustin but I'll include it here too. file.bin.zip
Sorry for the delay, I was at a competition tonight and then stuff afterwards. I'm taking a look now, I'm able to reproduce the crash by sending the file through.
Update: from the file.bin that @Kython89 attached, we have concluded that the robot code is corrupting the value at key /LiveWindow/DriveTrain/.default from 'DriveWithJoystickCommandV2' to b'\x00\xa7>\x03eWithJoystickCommandV2'
. Somehow. Not sure how that's happening, could be a WPILibC bug. We'll keep digging.
For those interested, somehow the memory of a string was being corrupted and passed into NetworkTables (this is still under investigation). As a result, the string received by pynetworktables was not valid utf-8 (as the NT spec dictates), which caused the issue.
I tried this:
And got this: