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

Attempt to free invalid pointer. Abort trap: 6 #100

Closed
shikha4444 opened this issue Mar 26, 2017 · 4 comments
Closed

Attempt to free invalid pointer. Abort trap: 6 #100

shikha4444 opened this issue Mar 26, 2017 · 4 comments

Comments

@shikha4444
Copy link

After setting up toolbox using the instructions in the end I am getting below error. Working on Mac OS x sierra 10.12.3 with CPU only.

I0326 18:17:51.248069 3768251328 net.cpp:804] Ignoring source layer data
I0326 18:17:51.290961 3768251328 net.cpp:804] Ignoring source layer loss
Running toolbox. Push h for help or q to quit.
src/tcmalloc.cc:283] Attempt to free invalid pointer 0x7fe6871717e0
Abort trap: 6

@yosinski
Copy link
Owner

If you're still getting this error, I would make sure you are compiling Caffe and OpenCV correctly. In particular, I'd recommend making sure you're using the same version of the library at run time (via your LD_LIBRARY_PATH) as at compile time.

Closing for now.

@dennyglee
Copy link

Apologies if I'm missing something but I've tried this install on a two of my Macs to no avail and still have the same issue. Note, I didn't set the LD_LIBRARY_PATH per the Caffe instructions and caffe works CPU only.

@dennyglee
Copy link

dennyglee commented Jul 3, 2017

Actually, I solved this as it appears there a few conflicts that could be resolved via:

  • Per the Caffe OSX Installation Instructions, when installing opencv you may want to install using the flag --without-numpy so it uses the numpy that is installed via pip instead of installing of having brew install another copy of numpy.
  • If you're using CPU-only, you may also want to use the flag --without-opencl when installing opencv.
  • Within the Deep Visualization Toolbox instructions, if you already have scipy installed via pip, you may want so skip the step to install scipy via brew.
  • Even after all of this, the order of the imports may still result in an Abort trap: 6 error. For example, running the imports in this order:
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
import caffe

resulted in the error:
>>> src/tcmalloc.cc:283] Attempt to free invalid pointer 0x7ff514a70e80 Abort trap: 6

But if you were to re-order them per below, then everything works.

import numpy as np
import caffe
import matplotlib.pyplot as plt
from PIL import Image

Thus, you may need to update the run_toolbox.py file so that the top of it has:

# added this to avoid "Abort Trap 6" error
import numpy as np
import caffe
import cv2
import scipy
import skimage
# added this to avoid "Abort Trap 6" error

@shikha4444
Copy link
Author

shikha4444 commented Jul 3, 2017 via email

dennyglee added a commit to dennyglee/caffe that referenced this issue Jul 3, 2017
dennyglee added a commit to dennyglee/deep-visualization-toolbox that referenced this issue Jul 3, 2017
…w with python 2.7.12

Related to the issue [Attempt to free invalid pointer. Abort trap: 6 yosinski#100](yosinski#100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants