Reply to topic

checkSanity() fails despite DISABLE_UNALIGNED_ARRAY_ASSERT

rvjr
Registered Member
Posts
2
Karma
0
Hi Everybody,

we're experiencing a little problem here (with Eigen 3.0.3 and 3.0.6):

Using Ubuntu 12.04 (32-bit !) we are compiling our application using Eigen3 and in the Debug configuration we're always getting assertion failures like this one:

Eigen/src/Core/MapBase.h:172: void Eigen::MapBase<Derived, 0>::checkSanity() const [with Derived = Eigen::Map<const Eigen::Array<float, 4, 1, 0, 4, 1>, 1, Eigen::Stride<0, 0> >]: Assertion `(!(internal::traits<Derived>::Flags&AlignedBit) || ((size_t(m_data) % (sizeof(Scalar)*internal::packet_traits<Scalar>::size)) == 0)) && "data is not aligned"' failed.

although we defined the following macros project wide (and checked that the definitions are effective where the assert fails):

#define EIGEN_DONT_VECTORIZE
#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT

The code actually works well in the release build, but it prevents debugging the 32-bit build. Interestingly this doesn't happen on 64bit.

I also found some people on the net having the same problem, but I couldn't find any solution to this. Can somebody suggest what we should try to resolve the problem?

Best Regards
Rainer
User avatar ggael
Moderator
Posts
2194
Karma
15
OS
are you sure you tried with Eigen 3.0.6? This should definitely work fine, and if an error you get, then it must be different.
User avatar ggael
Moderator
Posts
2194
Karma
15
OS
for the record, here is the related fix pushed in 3.0.4: https://bitbucket.org/eigen/eigen/commi ... dee89bf3d5
rvjr
Registered Member
Posts
2
Karma
0
Hi Gael,

thanks for your suggestions and sorry for my late reply!

I definitely checked that this is Eigen 3.0.6, and the assert looks as in the change you mentioned. But somehow the Aligned flag is set anyways.

I could reproduce this now even in Visual Studio, which makes me think that I'm doing something wrong. I attached two screenshots for you. One containing the project-wide preprocessor defines, and one showing the state in the debugger right at the point where the assertion failed. Is this of any help for you? How could I track this down further? Maybe you see something in the stack trace?

http://dl.voigt-home.net/temporary/eigen3_assertion_failure/AssertionFailure.png
http://dl.voigt-home.net/temporary/eigen3_assertion_failure/PreprocessorDefines.png

Regards,
Rainer

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], bcooksley, Bing [Bot], brand, capslock, djarvie, Exabot [Bot], Google [Bot], GreatEmerald, jensreuterberg, jgrulich, jitseniesen, korakios, koriun, Kver, lazyit, lueck, Majestic-12 [Bot], MiceAreVeryNice, NickElliott, TheraHedwig, Tuukka, Yahoo [Bot]