-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[BUG]: free(): invalid pointer #4137
Comments
I'm guessing this is #4105. |
I verified this is not #4105, this code was broken in 2.9 as well. |
I couldn't reproduce the --- main_using_embed_h.cpp.orig 2022-10-23 21:29:46.559375849 -0700
+++ main_using_embed_h.cpp 2022-10-23 21:56:25.089334464 -0700
@@ -21,7 +21,12 @@
~Wrapper()
{
+ py::gil_scoped_acquire hold_gil;
+ _obj.dec_ref();
+ _obj.release();
+ _wrapperInit.dec_ref();
_wrapperInit.release();
+ _wrapperFini.dec_ref();
_wrapperFini.release();
} I'm closing this bug because it's pretty likely that the Until we merge PR #4146, I recommend you patch it locally and run all your tests. |
I am encountering this with the same conditon this is my set-up that can be replicated
the simple.cpp
with the following cmake
with the following dockerfile:
|
-std::future<int> callPythonFunctionAsync(py::object &pyFunction)
+std::future<int> callPythonFunctionAsync(py::handle pyFunction)
|
I got this backtrace also I was able to run if I update to 20.04 on the docker base image. someone on gitter helped me to get the trace |
if I do not put torch, the code works, so definitly something with torch |
I'd work on sending them a PR that reproduces the crash. |
Required prerequisites
Problem description
Like issue #1472,
we still have problem in 2.10.0
free(): invalid pointer
c++ code:
wrapper.py code is
we run this code in ubuntu18.04 docker container. and the repo is
public.ecr.aws/iflytek-open/opensource/demo/mmocr:v3.1
Reproducible example code
No response
The text was updated successfully, but these errors were encountered: