bullet crashes at getOpenGLSubMatrix when using NEON

Post Reply
ed_welch
Posts: 43
Joined: Wed Mar 04, 2015 6:16 pm

bullet crashes at getOpenGLSubMatrix when using NEON

Post 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
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: bullet crashes at getOpenGLSubMatrix when using NEON

Post 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]);
ed_welch
Posts: 43
Joined: Wed Mar 04, 2015 6:16 pm

Re: bullet crashes at getOpenGLSubMatrix when using NEON

Post 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.
Post Reply