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

segmentation fault #1

Closed
GallonDeng opened this issue Apr 12, 2018 · 3 comments
Closed

segmentation fault #1

GallonDeng opened this issue Apr 12, 2018 · 3 comments

Comments

@GallonDeng
Copy link

I compiled it in my Ubuntu 14.04 system(OpenCV 3.1). When it runs, it shows segmentation fault. The message is
...norm_pwp_search_area.width 150 norm_pwp_search_area.height 148
Segmentation fault (core dumped)
Any suggestion for the error? Thanks

@GallonDeng
Copy link
Author

I found there is a problem in Line 40 in the fhog.cpp. It works fine when the line changes into
"for(y=0; y<h; y++){
volatile float temp=(*In++-*Ip++)*r;
*Gx++=temp; }"
a little strange...

@xuduo35
Copy link
Owner

xuduo35 commented Apr 14, 2018

fhog.cpp is from 'https://github.com/ppaanngggg/fhog/blob/master/pdollar/fhog.cpp'. I run my code in ubuntu15 and macOS, no crash problem.

@xuduo35
Copy link
Owner

xuduo35 commented Apr 14, 2018

from your fix method, maybe the difference is from compiler. you can try change -O3 to -O2.

IF (UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3") #c++11
ENDIF (UNIX)

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

2 participants