Solved problem with the library import.
Eliminated concurrent exceptions while managing linAccHistory.
Changed linearAcceleration[] from a field to a local variable.
Application works fine now.