When I run the django manage.py app, I got free(): invalid pointer error.
Example:
>python manage.py check
System check identified no issues (0 silenced).
free(): invalid pointer
Abortado (imagem do núcleo gravada)
The django app is running fine but I’m trying to get rid off this message.
How can I fix this error or get more info to debug it?
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux (Ubuntu 20.04)
Django==2.2.28
with virtualenv
3
Answers
I have tested with same environment with same Django version and I ran the
check
command, which did not yield this problem. I assume it is an issue with Pytorch, as mentioned in here: GitHub issue #21018.To resolve it, you can take the following steps (copy pasted from this SO answer: https://stackoverflow.com/a/56363390/2696165)
That’s a C error related to memory freeing, probably due to a bug from some unpatched dependency package, since you’re using an old Django version.
Some options:
Check your project at debug level:
python3 manage.py check --fail-level DEBUG
List your dependencies and look online for which one originates that error:
python3 -m pip freeze
Log files.
This usually happens with external dependencies.
You can run the check command on a specific app:
Running on any specific database is also possible.
A few similar articles found:
https://github.com/duckietown/apriltags3-py/issues/1
https://github.com/googleapis/python-pubsub/issues/414
https://bugs.python.org/issue41335