Describe the bug
The PDP CAN Monitoring example crashes when run in simulation in both Java and C++. The error indicates that invalid pdp module number was used, -1.
Java:
Error at frc.robot.Robot.<init>(Robot.java:16): Unhandled exception instantiating robot edu.wpi.first.hal.PowerDistributionJNI edu.wpi.first.hal.util.UncleanStatusException: Code: -1028. Invalid pdp module -1
at edu.wpi.first.hal.PowerDistributionJNI.initialize(Native Method)
at edu.wpi.first.wpilibj.PowerDistribution.<init>(PowerDistribution.java:43)
at edu.wpi.first.wpilibj.PowerDistribution.<init>(PowerDistribution.java:56)
at frc.robot.Robot.<init>(Robot.java:16)
at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:322)
at edu.wpi.first.wpilibj.RobotBase.lambda$startRobot$0(RobotBase.java:443)
at java.base/java.lang.Thread.run(Thread.java:829)
Error at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:336): The robot program quit unexpectedly. This is usually due to a code error.
The above stacktrace can help determine where the error occurred.
See https://wpilib.org/stacktrace for more information.
Error at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:342): Could
not instantiate robot edu.wpi.first.hal.PowerDistributionJNI!
C++:
Error at frc::PowerDistribution::PowerDistribution [PowerDistribution.cpp:42]: Invalid pdp module -1: Module -1
Error at frc::impl::RunRobot: Error: The robot program quit unexpectedly. This is usually due to a code error.
The above stacktrace can help determine where the error occurred.
See https://wpilib.org/stacktrace for more information.
To Reproduce
Steps to reproduce the behavior:
create new PDP CAN Monitoring example project
run in desktop simulation
Expected behavior
It should not crash
Desktop (please complete the following information):
WPILib Version: 2022.1.1-beta-1
OS: Windows 10
Additional context
The example does not crash when deployed to the roboRIO.
Describe the bug The PDP CAN Monitoring example crashes when run in simulation in both Java and C++. The error indicates that invalid pdp module number was used, -1.
Java:
C++:
To Reproduce Steps to reproduce the behavior:
Expected behavior It should not crash
Desktop (please complete the following information):
Additional context The example does not crash when deployed to the roboRIO.