Python -> C++ -> Python Again #5104
stellarpower
started this conversation in
General
Replies: 1 comment
-
Actually I'm now wondering if it's to do with reference-counting. Is it safe to hold onto a pybind11::object within a C++ class? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I've got some really weird segfaults going on that are sporadic and I'm struggling to reproduce.
To start with, I was wondering, is it legal for me to be calling into C++ from Python, and then within that C++ code, call back into Python again? I have been doing so for some time without any problems, but I wanted to check first. I am also finding that when I try to get hold of a Python type within that code, as I have done before, instead I get back some "FramesList" type, - when I expose this as a property and access from Python, it also seems to have a backtrace that goes beyond the point it was assigned in C++. If it is legal, I'm not sure if there's some horrible GIL problem with my debugger thrown into the mix.
Cheers
Beta Was this translation helpful? Give feedback.
All reactions