potential alignment error with btVector3
Posted: Tue May 19, 2015 4:28 pm
I'd like to store some objects in a vector. Each object is composed in turn of other objects, one of which has a btVector3 member.
On program start (probably somewhere in the constructor), line 674 of btvector3.h crashes with the following exception:
Unhandled exception at 0x01230C67 in application.exe: 0xC0000005: Access violation reading location 0xFFFFFFFF.
The line is:
mVec128 = (__m128)_mm_xor_ps(mVec128, mVec128);
This happens whether i'm using either of the following to store the objects:
std::vector<Entity, boost::alignment::aligned_allocator<Entity, 16> > entities;
btAlignedObjectArray<Entity> entities;
The crashes don't happen all the time, perhaps only half the time. currently running a debug build, application compiled with visual studio 2013 update 4. How can i fix this problem? I wonder if this is even a problem with things not being properly aligned, or a different issue entirely?
On program start (probably somewhere in the constructor), line 674 of btvector3.h crashes with the following exception:
Unhandled exception at 0x01230C67 in application.exe: 0xC0000005: Access violation reading location 0xFFFFFFFF.
The line is:
mVec128 = (__m128)_mm_xor_ps(mVec128, mVec128);
This happens whether i'm using either of the following to store the objects:
std::vector<Entity, boost::alignment::aligned_allocator<Entity, 16> > entities;
btAlignedObjectArray<Entity> entities;
The crashes don't happen all the time, perhaps only half the time. currently running a debug build, application compiled with visual studio 2013 update 4. How can i fix this problem? I wonder if this is even a problem with things not being properly aligned, or a different issue entirely?