You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I build the codes with cmake (build type release), a segmentation fault occured, which will disappear when the "release" flag is removed. I tried to locate the codes where the segmentation fault occured but failed. Here is the only modification of the codes:
cmake_minimum_required(VERSION 3.0.2)
project(ikdtree)
add_compile_options(-std=c++17)
set(CMAKE_BUILD_TYPE "Release") // if I remove this line, the segmentation fault will disappear
include_directories(
include
)
add_executable(ikdtree_demo
src/ikd_Tree_demo.cpp
src/ikd_Tree.cpp
)
target_link_libraries(ikdtree_demo pthread)
The output is as follows:
Multi thread started
0
Rebuild thread terminated normally
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
[1] 150531 segmentation fault (core dumped)
It seems that the segmentation fault occured in pthread_join(), which makes me confused. Could you please help me to solve the problem?
The text was updated successfully, but these errors were encountered:
When I build the codes with cmake (build type release), a segmentation fault occured, which will disappear when the "release" flag is removed. I tried to locate the codes where the segmentation fault occured but failed. Here is the only modification of the codes:
And my CMakeLists.txt:
The output is as follows:
It seems that the segmentation fault occured in
pthread_join()
, which makes me confused. Could you please help me to solve the problem?The text was updated successfully, but these errors were encountered: