You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I've received a couple reports now of people having trouble parsing PathPlanner json files on the robo rio when using C++ since the recent changes to the C++ json library. I am unable to reproduce this issue in simulation, so it seems to be specific to the rio (or maybe linux), but I do not currently have access to one I can use for further testing.
The errors being generated are syntax errors, yet there are no syntax errors with the JSON files. It seems to be failing on the closing } at the end of the file. These files can be parsed without issue with other json libraries, and I am parsing the files identically to how other json files are parsed throughout WPILib (before the mentioned PRs below), so I don't think this is an error on my end.
For example, here is how auto files get parsed in PathPlannerLib:
This is almost certainly due to the issue fixed by 5875, because prior to that, there would be trailing zeros in the buffer. A decent workaround for text files would be just trimming any trailing \0 bytes.
We've been experiencing an issue that might be related to this. Our simulation (running on WSL) is crashing because of an invalid end of input from a pathweaver json file.
Describe the bug
I've received a couple reports now of people having trouble parsing PathPlanner json files on the robo rio when using C++ since the recent changes to the C++ json library. I am unable to reproduce this issue in simulation, so it seems to be specific to the rio (or maybe linux), but I do not currently have access to one I can use for further testing.
The errors being generated are syntax errors, yet there are no syntax errors with the JSON files. It seems to be failing on the closing
}
at the end of the file. These files can be parsed without issue with other json libraries, and I am parsing the files identically to how other json files are parsed throughout WPILib (before the mentioned PRs below), so I don't think this is an error on my end.For example, here is how auto files get parsed in PathPlannerLib:
This does not use the new
GetCharBuffer
method from #5877, which is unreleased. I'm curious if this would have any affect on this issue?Perhaps it is also possible that #5875 would have an effect here as well?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
JSON library should parse valid json files without syntax errors
Screenshots
Here are error output screenshots provided by users:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: