Crashes when running KudanCV-Android-Demo


#1

Hi all. I’ve got a crashes when running KudanCV-Android-Demo (https://github.com/kudan-eu/KudanCV-Android-Demo) on my devices:

  • Asus Zenfone Go ZC500TG
  • Sony Xpreria ZR - C5502
  • Sony Xperia M - C1905
  • OPPO A51
    Please help me fix it.
    This is a log:
    1 05-31 17:35:25.234 2150-2150/? I/art: Late-enabling - Xcheck:jni
    2 05-31 17:35:25.407 2150-2150/eu.kudan.ar V/Monotype: SetAppTypeFace- try to flip, app = eu.kudan.ar
    3 05-31 17:35:25.410 2150-2150/eu.kudan.ar V/Monotype: Typeface getFontPathFlipFont - systemFont = default# default
    4 05-31 17:35:25.421 2150-2150/eu.kudan.ar V/Monotype: SetAppTypeFace- try to flip, app = eu.kudan.ar
    5 05-31 17:35:25.421 2150-2150/eu.kudan.ar V/Monotype: Typeface getFontPathFlipFont - systemFont = default# default
    6 05-31 17:35:25.459 2150-2150/eu.kudan.ar w/linker: libnative-lib.so: unused DT entry: type 0x6ffffffe arg 0x67e8
    7 05-31 17:35:25.459 2150-2150/eu.kudan.ar w/linker: libnative-lib.so: unused DT entry: type 0x6fffffff arg 0x1
    8 05-31 17:35:25.459 2150-2150/eu.kudan.ar w/linker: libKudanCV.so: unused DT entry: type 0x6ffffffe arg 0x67944
    9 05-31 17:35:25.459 2150-2150/eu.kudan.ar w/linker: libKudanCV.so: unused DT entry: type 0x6fffffff arg 0x3
    10 05-31 17:35:25.515 2150-2150/eu.kudan.ar E/SensorManager: sensor or listener is null
    11 05-31 17:35:25.522 2150-2196/eu.kudan.ar D/OpenGLRenderer : Use EGL_SWAP_BEHAVIOR_PRESERVED: true
    05-31 17:35:25.588 2150-2196/eu.kudan.ar I/Adreno-EGL: < qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1.2_RB1.05.01.00.016.
    02 9_msm8 610_LA.BF.1.1.2_RB1 release_AU 0
    OpenGL ES Shader Compiler Version: E031.25.03.06
    Local Branch:
    Remote Branch: quic/LA.BF.1.1.2 rbl.21
    Local Patches: NONE
    Reconstruct Branch: AU_LINUX_ANDROID_LA.BF.1.1.2_RB1.05.01 .00.016.029 + 6151bel + NOTHING 19 05-31 17:35:25.589 2150-2196/eu.kudan.ar I/OpenGLRenderer

20 05-31 17:35:25.612 2150-2196/eu.kudan.ar D/OpenGLRenderer : Enabling debug mode 0
21 05-31 17:35:25.644 2150-2150/eu.kudan.ar I/ CameraManagerGlobal: getCameraService: Reconnecting to camera service
22 05-31 17:35:25.682 2150-2150/eu.kudan.ar I/CameraManager: Using legacy camera HAL.
23 05-31 17:35:26.007 2150-2195/eu.kudan.ar I/CameraDevice: CameraDevice Opened.
24 05-31 17:35:26.081 2150-2150/eu.kudan.ar I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy0 12047032 time:2406799
25 05-31 17:35:29.745 2150-2195/eu.kudan.ar I/ CameraDeviceState: Legacy camera service transitioning to state CONFIGURING
26 05-31 17:35:29.746 2150-2243/eu.kudan.ar I/RequestThread-0 : Configure outputs: 1 surfaces configured.
27 05-31 17:35:29.748 2150-2243/eu.kudan.ar D/Camera: app passed NULL surface
28 05-31 17:35:29.809 2150-2195/eu.kudan.ar I/ CameraDeviceState: Legacy camera service transitioning to state IDLE
29 05-31 17:35:29.814 2150-2195/eu.kudan.ar I/RequestQueue: Repeating capture request set.
30 05-31 17:35:29.821 2150-2243/eu.kudan.ar w/ LegacyRequestMapper: convertRequestMetadata - control. awbRegions setting is not supported, ignoring value
31 05-31 17:35:29.821 2150-2243/eu.kudan.ar w/ LegacyRequestMapper: Only received metering rectangles with weight 0.
32 05-31 17:35:29.821 2150-2243/eu.kudan.ar w/ LegacyRequestMapper: Only received metering rectangles with weight 0.
33 05-31 17:35:30.221 2150-2339/eu.kudan.ar I/ CameraDeviceState: Legacy camera service transitioning to state CAPTURING
34 05-31 17:35:30.298 2150-2195/eu.kudan.ar E/AndroidRuntime : FATAL EXCEPTION: BackgroundCameraThread
Process: eu.kudan.ar, PID: 2150
java.nio.BufferUnderflowException
at java.nio.Buffer.checkGetBounds(Buffer.java:171)
38 at java.nio.DirectByteBuffer.get(DirectByteBuffer. java:113)
39
at java.nio.ByteBuffer.get(ByteBuffer.java:376)
40
at eu.kudan.ar.CameraFragment$3.onImageAvaliable( CameraFragment.java:285)
41
at android.media.ImageReader$ListenerHandler. handleMessage(ImageReader.java:548)
42
at android.OS.Handler.dispatchMessage(Handler.java:
102)
43
at android.os.Looper.loop(Looper.java: 135)
44
at android.OS.HandlerThread.run(HandlerThread.java:61
)
39 05-31 17:35:30.342 2150-2150/eu.kudan.ar I/RequestQueue: Repeating capture request cancelled.
40 05-31 17:35:30.500 2150-2353/eu.kudan.ar W/MessageQueue:
Handler (android.graphics.SurfaceTexture$1) {Id55c3c4}
sending message to a Handler on a dead thread
47
java.lang.IllegalStateException: Handler (android.graphics .SurfaceTexture$l) {Id55c3c4} sending message to a Handler on a dead thread
48
at android.os.MessageQueue.enqueueMessage(MessageQueue. java:325)
49
at android.OS.Handler.enqueueMessage(Handler.java:631)
50
at android.os.Handler.sendMessageAtTime(Handler.java: 600)
51
at android.os.Handler.sendMessageDelayed(Handler.java: 570)
52
at android.os.Handler.sendEmptyMessageDelayed(Handler, java:534)
53
at android.os.Handler.sendEmptyMessage(Handler.java:519
)
at android.graphics.SurfaceTexture.postEventFromNative( SurfaceTexture.java:368)
55 05-31 17:35:30.601 2150-2168/eu.kudan.ar E/
BufferQueueProducer: [unnamed-2150-1] cancelBuffer:
BufferQueue has been abandoned
56 05-31 17:35:30.601 2150-2353/eu.kudan.ar E/
BufferQueueProducer: [unnamed-2150-1] cancelBuffer: BufferQueue has been abandoned
57 05-31 17:35:30.602 2150-2167/eu.kudan.ar E/
BufferQueueProducer: [unnamed-2150-1] cancelBuffer: BufferQueue has been abandoned
58 05-31 17:35:30.602 2150-2168/eu.kudan.ar E/
BufferQueueProducer: [unnamed-2150-1] cancelBuffer:
BufferQueue has been abandoned
59 05-31 17:35:30.602 2150-2353/eu.kudan.ar E/
BufferQueueProducer: [unnamed-2150-1] cancelBuffer: BufferQueue has been abandoned
60 05-31 17:35:30.603 2150-2167/eu.kudan.ar E/
BufferQueueProducer: [unnamed-2150-1] cancelBuffer:
BufferQueue has been abandoned
61 05-31 17:35:36.160 2150-2163/eu.kudan.ar W/ImageReader_JNI : ImageReader#close called before Image#close/ consider calling Image#close first