This forum has been archived. All content is frozen. Please use KDE Discuss instead.

std::stack<Eigen::Affine3f> Does not work in release mode

Tags: None
(comma "," separated)
kingpotter1990
Registered Member
Posts
1
Karma
0
Code: Select all
typedef std::stack<Eigen::Affine3f> MatrixStack;
MatrixStack m_transformation_stack;

Eigen::Affine3f m_transformation;

..//did something to m_transformation;

m_transformation_stack.push(m_transformation);


My code breaks at the last line when I am pushing a matrix into the stack.

Also, it only breaks in release mode, not debug mode, I am using vs2010

The exact error message is:
Microsoft Visual Studio C Runtime Library has detected a fatal error in Millipede2012_version2.exe

Any one have any idea?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
probably an alignment issue. You should use our aligned allocator:
std::stack<Eigen::Affine3f, Eigne::aligned_allocator<Eigen::Affine3f> >

or use non-aligned Affine3f:

typedef Eigen::Transform<float,3,Eigen::Affine, Eigen::DontAlign> UnalignedAffine3f;
Asido
Registered Member
Posts
1
Karma
0
std::stack does not build for me on VS2012 with specified allocator, therefore a solution is to simply use std::vector push_back, pop_back, back()...


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]