Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Callback buffer was too small #47

@malloth

Description

@malloth

In Google Play Services 8.3, when I start CameraSource built with CameraSource.Builder.setRequestedPreviewSize(640, 480) I get the following exception:

E/Camera-JNI: Callback buffer was too small! Expected 1382400 bytes, but got 460801 bytes!
11-06 12:23:35.560 151-151/? E/: Qvoid android::disable_msg_type(camera_device_, int32_t): E
11-06 12:23:35.560 151-151/? E/: disableMsgType: E
11-06 12:23:35.560 151-151/? E/: disableMsgType: X, msgType =0x10, mMsgEnabled=0xd
11-06 12:23:35.580 151-28672/? V/: newFrame =0x40850b2c, frm_type = 1
11-06 12:23:35.580 151-28672/? V/: int android::QCameraHardwareInterface::cache_ops(int, ion_flush_data_, int): Cache OPs type(1082438032) success
com.mayer.esale E/AndroidRuntime: FATAL EXCEPTION: Thread-328
com.mayer.esale E/AndroidRuntime: java.lang.IllegalArgumentException: Null image data supplied.
com.mayer.esale E/AndroidRuntime: at com.google.android.gms.vision.Frame$Builder.setImageData(Unknown Source)
com.mayer.esale E/AndroidRuntime: at com.google.android.gms.vision.CameraSource$zzb.run(Unknown Source)
com.mayer.esale E/AndroidRuntime: at java.lang.Thread.run(Thread.java:856)

This happens only on one of my devices: Kruger & Matz MOVE.
Some other preview sizes are working (like: 1024x768, 1600x1200).

It was working correctly in Google Play Services 8.1.

My guess is that you use Camera.addCallbackBuffer() with byte array of an invalid length. Previous buffer size computing method was correct - at least for this particular device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions