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

Pybinding functions that return raw pointers causes Segfaults #4

Closed
aaronchongth opened this issue Mar 9, 2021 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@aaronchongth
Copy link
Member

.def("lane_from", py::overload_cast<std::size_t, std::size_t>(
&Graph::lane_from))
.def("lane_from", py::overload_cast<std::size_t, std::size_t>(
&Graph::lane_from, py::const_))

https://github.com/open-rmf/rmf_traffic/blob/main/rmf_traffic/include/rmf_traffic/agv/Graph.hpp#L512-L515

This is due to pybind11 copying and deleting the raw pointer when it goes out of scope.

@aaronchongth aaronchongth self-assigned this Mar 9, 2021
@aaronchongth aaronchongth added the bug Something isn't working label Mar 9, 2021
mxgrey added a commit that referenced this issue Apr 22, 2021
Yadunund pushed a commit that referenced this issue Mar 18, 2024
* Fixed camera detection poses and others minor fixes

Signed-off-by: ahcorde <ahcorde@gmail.com>

* fix build

Signed-off-by: ahcorde <ahcorde@gmail.com>

Signed-off-by: ahcorde <ahcorde@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant