Crash only from Android 14 "[libinput.so] android::VelocityTracker::addMovement(long, int, int, float)"

90 Views Asked by At

The following crash occurs only on Android 14 devices according to the Google Play Console

[libinput.so] android::VelocityTracker::addMovement(long, int, int, float)
SIGSEGV
backtrace:
  #00  pc 0x000000000006fa64  /system/lib64/libinput.so (android::VelocityTracker::addMovement(long, int, int, float)+444)
  #01  pc 0x000000000007052c  /system/lib64/libinput.so (android::VelocityTracker::addMovement(android::MotionEvent const*)+1284)
  #02  pc 0x000000000020abd4  /system/framework/arm64/boot-framework.oat (art_jni_trampoline+132)
  #03  pc 0x0000000000715084  /system/framework/arm64/boot-framework.oat (android.view.VelocityTracker.addMovement+68)
  #04  pc 0x0000000000707754  /system/framework/arm64/boot-framework.oat (android.view.GestureDetector.onTouchEvent+660)

enter image description here

Could anyone offer a clue about the possible causes?

Update [2023-12-10]

The app uses ScaleGestureDetector. The following is relevant code. All code is in try-catch blocks that I omitted here fore brevity:

scaleGestureDetector = new ScaleGestureDetector(activity, new ScaleListener());


private class ScaleListener extends ScaleGestureDetector.SimpleOnScaleGestureListener {
    @Override
    public boolean onScale(@NonNull ScaleGestureDetector detector) {
        try {
            float fScaleCurrent = detector.getScaleFactor();
            if ((detector.getCurrentSpan() > (getResources().getDisplayMetrics().widthPixels + getResources().getDisplayMetrics().heightPixels))
                    && (Math.abs(fScaleCurrent - 1) < 0.03)) {

            } else {
                _fScaleFactor *= fScaleCurrent;
            }
        } catch (Exception ex) {
        }
        return true;
    }
}


_relativeLayoutCell.setOnTouchListener((v, event) -> {
MotionEvent eventCopy= MotionEvent.obtain(event);
gestureDetector.onTouchEvent(eventCopy);
                            return false;
                        });

Update 2024-01-01:

This crash remains the most frequent one even though Android 14 devices are not even among the top 5 APIs for app installations. All crashes are from Samsung devices: enter image description here

Update [2024-01-09]

I have finally seen this crash report from an OPPO model and a OnePlus model. However, the vast majority of the crashes are reported from Samsung devices. Again, only Android 14 devices have this crash. enter image description here

0

There are 0 best solutions below