-
Notifications
You must be signed in to change notification settings - Fork 688
Description
Describe the bug
When two NT4 clients both attempt to publish a schema for the same Protobuf message type, simgui, Glass and OutlineViewer crash with an EXCEPTION_ACCESS_VIOLATION in wpiutil.dll. This occurs specifically when the first client publishes a "lean" descriptor, followed by the other client publishing a "verbose" descriptor.
To Reproduce
Steps to reproduce the behavior:
- Launch an NT client and publish the lean schema. In my case, this client was QuestNav using C# and a descriptor generated with protoc. The descriptor is 595 bytes.
- Launch the robot simulation and publish a verbose schema. In my case, this schema was generated with quickbuf. This descriptor is 7719 bytes.
The simgui will crash when launched in this order, crashing the robot. If run without the GUI, the sim does not crash. However, once the robot is running, connecting Glass or OutlineViewer to the sim NT causes them to crash.
If the robot is launched first, with the larger schema, and then the client connects, the simgui, Glass, and OutlineViewer do not crash and the schema size shown in the outline is 595 byes.
- Link to code:
Here is the code on the C# client side, including an exclusion of one schema to avoid the crash. The proto files are also in this repo.
https://github.com/QuestNav/QuestNav/blob/c0f2f0e47c7de5caabf364292695db45b1f7bcab/unity/Assets/QuestNav/Native/NTCore/NtInstance.cs#L306
Expected behavior
Republishing a compatible, yet more verbose, schema should not cause the gui to crash.
Desktop (please complete the following information):
- OS: Windows 11
- Project Information:
WPILib Information:
Project Version: 2025.3.2
VS Code Version: 1.96.2
WPILib Extension Version: 2025.3.2
C++ Extension Version: 1.23.2
Java Extension Version: 1.38.0
Java Debug Extension Version: 0.58.1
Java Dependencies Extension Version 0.24.1
Java Version: 17
Java Location: C:\Users\Public\wpilib\2025\jdk
Vendor Libraries:
libgrapplefrc (2025.0.8)
PathplannerLib (2025.2.6)
CTRE-Phoenix (v6) (25.3.1)
photonlib (v2025.2.1)
questnavlib (2025-1.0.1-beta)
WPILib-New-Commands (1.0.0)
Additional context
See the attached protos.zip file for the schema data that's being written to the NT. This data was extracted from the base64 encoded strings in generated protobuf descriptors.