-
Notifications
You must be signed in to change notification settings - Fork 60
SmartDashboard.putData fails with custom Sendable subclasses #630
Comments
I'm quite confused as to what exactly pybind11 is doing here, given that |
I managed to get a native code backtrace:
|
I think pybind11 is trying to take ownership of the reference ( |
It is rather odd that pybind11 wants to take a copy of SendableBuilder... |
Well, after the function is called, what happens to the python reference to SendableBuilder? Since it's a reference, it's potentially not safe for it to continue to exist? |
Actually, that doesn't make sense. Likely what's happening is...
.. that is a bit surprising. |
I thought about this some more tonight, and while the behavior I cited before is still what I think is likely happening, I'm no longer surprised by it (though it is surprising!). The ideal solution would be a pybind11 holder type that could be explicitly disowned. There are some hacky PRs in pybind11, but there's a |
Note that it still tries to copy it when the SendableBuilder* holders aren't shared_ptr. |
This is reported to still be broken. |
This upstream issue seems related: |
robot.py:
Traceback:
It looks like it's the call to
initSendable
that causes this. If the method is deleted:From the tracebacks I got, it looks like it throws up in
frc::SendableRegistry::Publish
.The text was updated successfully, but these errors were encountered: