Open mjhealy opened 6 months ago
Cloned and on windows at least with and without LEAK_VISION_TO_WORK_AROUND_CLEANUP_BUG defined I do not see crashes? whack
WSL2 ubuntu 22.04, same result with and without LEAK_VISION_TO_WORK_AROUND_CLEANUP_BUG defined/undefined. I don't own a mac so you might need to help troubleshoot this further, but to be honest I'm not super sure where to start.
Can you get any sort of backtrace or exception that's getting thrown in the crash from above?
Describe the bug I've implemented what I believe to be valid (albeit simple) sample vision subsystem in C++ for the team I coach. This uses a single camera, running under the simulator. Code is available here.
I've reduced the code reproducing the issue to simply setting up the PhotonPoseEstimator in a
Vision
subsystem class, derived fromfrc2::SubsystemBase
, with all code in all methods of the class having been commented out, leaving only the behaviors exercised by the objects declared in the subsystem (see below):We're using a "command-based" robot, generated using the templates in the WPILib tools, with the
RobotContainer
class containing an instance of the Vision subsystem.Expected behavior:
Actual behavior:
PhotonCameraSim
object in the above snippet is enabled in the exampleVision
subsystem, the program crashes on launch under the simulator:new
(and leak it), then things also perform as expected.To Reproduce Steps to reproduce the behavior:
PreprocessorConfig.h
, change#define LEAK_VISION_TO_WORK_AROUND_CLEANUP_BUG
to#undef LEAK_VISION_TO_WORK_AROUND_CLEANUP_BUG
.Please note that this behavior is being seen on a Mac running Sonoma (MacOS 14.3 (23D56)). I do not have ready access to a Windows box, and thus have not yet been able to test it there.
Screenshots / Videos
Platform:
Additional context None at this time.