openpose
openpose copied to clipboard
src/tcmalloc.cc:333] Attempt to free invalid pointer
Hello Guys,
I have just successfully completed the build of openpose on my Mac, and I tried to run the example command you gave in some of your README, but for each and every attempt I get the same error:
src/tcmalloc.cc:333] Attempt to free invalid pointer 0x7faf20d05b00
Here are a few examples:
% ./build/examples/openpose/openpose.bin --video input/test_video.mp4
Starting OpenPose demo...
Configuring OpenPose...
Starting thread(s)...
---------------------------------- WARNING ----------------------------------
We have introduced an additional boost in accuracy in the CUDA version of about 0.2% with respect to the CPU/OpenCL versions. We will not port this to CPU given the considerable slow down in speed it would add to it. Nevertheless, this accuracy boost is almost insignificant so the CPU/OpenCL versions can be safely used.
-------------------------------- END WARNING --------------------------------
src/tcmalloc.cc:333] Attempt to free invalid pointer 0x7faf20d05b00
zsh: abort ./build/examples/openpose/openpose.bin --video input/test_video.mp4
or
% ./build/examples/openpose/openpose.bin -camera_resolution 640x480 -net_resolution 128x96
Starting OpenPose demo...
Configuring OpenPose...
Starting thread(s)...
src/tcmalloc.cc:333] Attempt to free invalid pointer 0x7fd98950b7b0
zsh: abort ./build/examples/openpose/openpose.bin -camera_resolution 640x480 128x96
or
./build/examples/openpose/openpose.bin --image_dir=input --write_images=output
Starting OpenPose demo...
Configuring OpenPose...
Starting thread(s)...
---------------------------------- WARNING ----------------------------------
We have introduced an additional boost in accuracy in the CUDA version of about 0.2% with respect to the CPU/OpenCL versions. We will not port this to CPU given the considerable slow down in speed it would add to it. Nevertheless, this accuracy boost is almost insignificant so the CPU/OpenCL versions can be safely used.
-------------------------------- END WARNING --------------------------------
src/tcmalloc.cc:333] Attempt to free invalid pointer 0x7fda70d163e0
zsh: abort ./build/examples/openpose/openpose.bin --image_dir=input --write_images=outpu
I wonder what could go wrong.
If you have any way to help I would really appreciate it :-)
Cheers
I am facing the same problem
I am facing the same problem
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Same error here on OS 12.1
After brute forcing, I came across this SO post: https://stackoverflow.com/questions/53203644/caffe-is-conflicted-with-python-cv2/53386302#53386302
This is because caffe and opencv use different memory allocator. Caffe uses tcmalloc but opencv uses the default one. leveldb is dependent on gperftools, which contains tcmalloc.
I first uninstalled caffe in brew: brew uninstall --force caffe
. Then, I editted the brew formula of caffe by: brew edit caffe
, and the caffe.rb
ruby file was opened in my IDE, VS code. Next, I changed -DUSE_LEVELDB=ON
to -DUSE_LEVELDB=OFF
. Finally, I installed caffe with the flag --build-from-source
on: brew install --build-from-source caffe
.
After caffe was installed, I redo the standard procedures to build openpose. Run the demo scripts...
Wala! It worked!!
After brute forcing, I came across this SO post: https://stackoverflow.com/questions/53203644/caffe-is-conflicted-with-python-cv2/53386302#53386302
This is because caffe and opencv use different memory allocator. Caffe uses tcmalloc but opencv uses the default one. leveldb is dependent on gperftools, which contains tcmalloc.
I first uninstalled caffe in brew:
brew uninstall --force caffe
. Then, I editted the brew formula of caffe by:brew edit caffe
, and thecaffe.rb
ruby file was opened in my IDE, VS code. Next, I changed-DUSE_LEVELDB=ON
to-DUSE_LEVELDB=OFF
. Finally, I installed caffe with the flag--build-from-source
on:brew install --build-from-source caffe
.After caffe was installed, I redo the standard procedures to build openpose. Run the demo scripts... Wala! It worked!!
Thanks for posting this solution! But running the brew install --build-from-source caffe
command gives me the following error. Have you seen something like this when working with the caffe library? Thanks! :)
Last 15 lines from /Users/shanmy/Library/Logs/Homebrew/caffe/01.cmake:
-- Found LMDB: /opt/homebrew/include
-- Found lmdb (include: /opt/homebrew/include, library: /opt/homebrew/lib/liblmdb.dylib)
-- -- CUDA is disabled. Building without it...
-- OpenCV found (/opt/homebrew/Cellar/opencv/4.5.5_2/lib/cmake/opencv4)
CMake Error at /opt/homebrew/Cellar/cmake/3.23.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find vecLib (missing: vecLib_INCLUDE_DIR)
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.23.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindvecLib.cmake:23 (find_package_handle_standard_args)
cmake/Dependencies.cmake:127 (find_package)
CMakeLists.txt:46 (include)
-- Configuring incomplete, errors occurred! See also "/tmp/caffe-20220714-37124-13rvfev/caffe-1.0/CMakeFiles/CMakeOutput.log".
Do not report this issue to Homebrew/brew or Homebrew/core!
[SOLVED] by installing Xcode!
After brute forcing, I came across this SO post: https://stackoverflow.com/questions/53203644/caffe-is-conflicted-with-python-cv2/53386302#53386302
This is because caffe and opencv use different memory allocator. Caffe uses tcmalloc but opencv uses the default one. leveldb is dependent on gperftools, which contains tcmalloc.
I first uninstalled caffe in brew:
brew uninstall --force caffe
. Then, I editted the brew formula of caffe by:brew edit caffe
, and thecaffe.rb
ruby file was opened in my IDE, VS code. Next, I changed-DUSE_LEVELDB=ON
to-DUSE_LEVELDB=OFF
. Finally, I installed caffe with the flag--build-from-source
on:brew install --build-from-source caffe
.After caffe was installed, I redo the standard procedures to build openpose. Run the demo scripts... Wala! It worked!!
![]()
![]()
I followed these instructions but as I installed caffe with brew install --build-from-source caffe
I got an error
Error: An exception occurred within a child process: Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/salmz/Library/Caches/Homebrew/downloads/f880b121f7635358e6d231875c17c87e54e723a43adedc5157334ce899f25481--0a04cc2ccd37ba36843c18fea2d5cbae6e7dd2b5.patch
Has anyone else come across this? I'm not sure how to fix it