Page 1 of 1

bullet crashes at getOpenGLSubMatrix when using NEON

Posted: Wed Jun 10, 2015 1:54 pm
by ed_welch
I found a "bad access" crash at the following line:
vm[0] = v0;
in btMatrix3x3::getOpenGLSubMatrix

I disabled NEON by commenting out this lines in btScalar:
//#define BT_USE_NEON 1
//#define BT_USE_SIMD_VECTOR3
and then it works fine, so it seems to be the NEON code that's causing the problem

Re: bullet crashes at getOpenGLSubMatrix when using NEON

Posted: Mon Jun 15, 2015 7:17 pm
by Erwin Coumans
The matrix data needs to be 16-byte aligned. You can use the ATTRIBUTE_ALIGN16 macro:

Code: Select all

ATTRIBUTE_ALIGNED16(float matrix[16]);

Re: bullet crashes at getOpenGLSubMatrix when using NEON

Posted: Thu Jun 18, 2015 1:14 pm
by ed_welch
Thanks! That works, but I'm a bit worried about the stability of the neon code. I mean, call me old fashioned, but I don't think a library should crash when you enter a wrong parameter.