-
Notifications
You must be signed in to change notification settings - Fork 46
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
Segmentation Fault on OS X #23
Comments
I don't think that the struct / class thing causes the segfault. Can you try to build it using |
Rebuilt with cmake -DCMAKE_BUILD_TYPE=Debug and run under lldb:
(lldb) br set -f contour.cpp -l 27
I've not debugged Python wrapper using lldb, nor gdb, before. Trying to set breakpoints directly in C++ files while running a Python wrapper didn't work. Could you advise on how to track this down in lldb? |
I think it added the breakpoints once lpo was loaded in python. See |
Thanks for pointing lldb msg. Here's the debug log & backtrace: $ lldb -- python train_lpo.py -f0 0.2 ../models/lpo_VOC_0.2.dat
So, it crashed when executing: The Python 2.7.10 reference shows: Does this mean there's a bug in the numpy/core/include/numpy/__multiarray_api.h? |
On 10.10.3, with Python 2.7.10 and boost and boost-python 1.58.0. Built using:
Saw some warnings only, such as:
In file included from /Users/peterwang/CPP_Resources/lpo-release/lib/crf/crf.cpp:31:
/Users/peterwang/CPP_Resources/lpo-release/external/ibfs/ibfs.h:161:2: warning: 'Node' defined as a class here but previously declared as a struct
[-Wmismatched-tags]
class Node
^
/Users/peterwang/CPP_Resources/lpo-release/external/ibfs/ibfs.h:150:2: note: did you mean class here?
struct Node;
^~~~~~
class
Tried:
Crash report contained:
...
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ??? 000000000000000000 0 + 0
1 org.python.python 0x0000000103d150dd PyEval_GetGlobals + 23
2 org.python.python 0x0000000103d2462b PyImport_Import + 137
3 org.python.python 0x0000000103d22d27 PyImport_ImportModule + 31
4 lpo.so 0x00000001033f45a3 init_numpy() + 19
5 lpo.so 0x00000001033f4779 defineUtil() + 25
6 lpo.so 0x00000001033f4499 init_module_lpo() + 9
7 libboost_python-mt.dylib 0x0000000103c36391 boost::python::handle_exception_impl(boost::function0) + 81
8 libboost_python-mt.dylib 0x0000000103c373b9 boost::python::detail::init_module(char const_, void (_)()) + 121
9 org.python.python 0x0000000101836327 _PyImport_LoadDynamicModule + 140
...
Saw the note in external/boost/readme.txt:
"In order to use a non-system boost library copy the "boost" and "libs" directory of a recent boost release (eg 1.57) here."
And in build/lib/python/CMakeFiles/lpo.dir/depend.make:
...
lib/python/CMakeFiles/lpo.dir/boost.cpp.o: /usr/local/include/boost/array.hpp
lib/python/CMakeFiles/lpo.dir/boost.cpp.o: /usr/local/include/boost/assert.hpp
lib/python/CMakeFiles/lpo.dir/boost.cpp.o: /usr/local/include/boost/bind.hpp
...
These seem to suggest the seg fault was due to boost version mismatch?
Is it sufficient to just do:
Or something else?
BTW, boost and boost-python were installed as part of setting up Caffe. The Caffe ImageNet model ran successfully when invoked from a Python test app.
Thanks for any light you could help shed.
The text was updated successfully, but these errors were encountered: