MarianoJT88 / Joint-VO-SF

Fast Odometry and Scene Flow from RGB-D Cameras based on Geometric Clustering
104 stars 54 forks source link

Problem when I compile with -O0 parameter #5

Open xianshunw opened 6 years ago

xianshunw commented 6 years ago

I want to debug this project and get some implementation details, so I modified the CMakeList.txt:

-SET(CMAKE_BUILD_TYPE "Release")
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -mtune=native -mavx")
+SET(CMAKE_BUILD_TYPE "Debug")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -mtune=native -mavx")

But in this situation,it always throw an assertion on unaligned arrays.

VO-SF-ImagePair: /usr/include/eigen3/Eigen/src/Core/DenseStorage.h:128: Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions, 32>::plain_array() [with T = float; int Size = 16; int MatrixOrArrayOptions = 0]: Assertion `(reinterpret_cast<size_t>(eigen_unaligned_array_assert_workaround_gcc47(array)) & (31)) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****"' failed.
Aborted (core dumped)

I follow the aboving link, but I still cant find where the problem is.

MarianoJT88 commented 6 years ago

Hi, I am sorry but I don't have time to debug that myself these days. Try to localize what's the declaration or the operation that's causing the exception. I don't have a good intuition right now about the problem but it's probably associated with some member variable (its constructor) or some subsequent assignment / other operation.