Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pybind: Should fix "RuntimeError: Instance is registered" when handling unique_ptr release workflows #13056

Closed
EricCousineau-TRI opened this issue Apr 14, 2020 · 1 comment · Fixed by #13044

Comments

@EricCousineau-TRI
Copy link
Contributor

EricCousineau-TRI commented Apr 14, 2020

See pybind11 fork PR:

Related places where we got bit in Drake:


Basically, I think this happens when you get a non-owning reference to something in C++, but then try to own it afterwards.
e.g.

class Stuff {
 public:
  T* get_thing();
  unique_ptr<T> release_thing();
};
obj = Stuff()
thing = obj.get_thing()
obj.release_thing()
@EricCousineau-TRI
Copy link
Contributor Author

EricCousineau-TRI commented Apr 14, 2020

I believe I've gotten the fix working now (I had it way back in November, just wrote a bad test where I forgot to use rvp::reference_internal).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant