namespace Eigen { /** \page UnalignedArrayAssert Troubleshooting - Explanation of the assertion on unaligned arrays Hello! You are seeing this webpage because your program terminated on an assertion failure like this one:
my_program: path/to/eigen2/Eigen/src/Core/MatrixStorage.h:44: Eigen::ei_matrix_arrayThere are 4 known causes for this issue. Please read on to understand them and learn how to fix them. \b Table \b of \b contents - \ref where - \ref c1 - \ref c2 - \ref c3 - \ref c4 - \ref explanation \section where Where in my own code is the cause of the problem? First of all, you need to find out where in your own code this assertion was triggered from. At first glance, the error message doesn't look helpful, as it refers to a file inside Eigen! However, since your program crashed, if you can reproduce the crash, you can get a backtrace using any debugger. For example, if you're using GCC, you can use the GDB debugger as follows: \code $ gdb ./my_program # Start GDB on your program > run # Start running your program ... # Now reproduce the crash! > bt # Obtain the backtrace \endcode Now that you know precisely where in your own code the problem is happening, read on to understand what you need to change. \section c1 Cause 1: Structures having Eigen objects as members If you have code like this, \code class Foo { //... Eigen::Vector2d v; //... }; //... Foo *foo = new Foo; \endcode then you need to read this separate page: \ref StructHavingEigenMembers "Structures Having Eigen Members". Note that here, Eigen::Vector2d is only used as an example, more generally the issue arises for all \ref FixedSizeVectorizable "fixed-size vectorizable Eigen types". \section c2 Cause 2: STL Containers If you use STL Containers such as std::vector, std::map, ..., with Eigen objects, like this, \code std::vector::ei_matrix_array() [with T = double, int Size = 2, int MatrixOptions = 2, bool Align = true]: Assertion `(reinterpret_cast (array) & 0xf) == 0 && "this assertion is explained here: http://eigen.tuxfamily.org/dox/UnalignedArrayAssert.html **** READ THIS WEB PAGE !!! ****"' failed.