wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.08k stars 612 forks source link

C++ Alerts do not handle move/delete properly #7224

Open rzblue opened 4 hours ago

rzblue commented 4 hours ago

Alert adds std::shared_ptr(this) to the SendableAlerts in its constructor, which is invalidated if the alert is moved or deleted.

rzblue commented 4 hours ago

I'm working on fixing this. There will be a behavior change in that creating 2 alerts with the same name will result in an exception being thrown, which I believe is the correct behavior (this behavior will also be ported to java).