Critical bug in EasyAR lib on Android

+1 vote
asked Jun 18 by zzhenia (260 points)
edited Jun 18 by zzhenia
The example project `HelloARVideo` from EasyAR_SDK_2.3.0_Basic_Samples_Android proves a critical bug in EasyAR library: attempt to scan the target named `idback` which should stream video results in the error:

W/IMediaDeathNotifier: media server died
E/MediaPlayerNative: error (100, 0)
E/MediaPlayer: Error (100,0)

...

E/MediaPlayerNative: pause called in state 0, mPlayer(0xc816f0a0)
    error (-38, 0)
E/MediaPlayer: Error (-38,0)

which probably means that the callback from VideoPlayer's `open` method is called before the player is ready. This is a critical issue.
The bug happens on Xiomi Mi5 (Android 8.0) or SAMSUNG Note 9 (Android 9.0). Happens when streaming URL is passed to VideoPlayer to open. Playing local videos is not affected.
Please fix as soon as possible.

All console logs after running the example project:

...

I/EasyAR: EasyAR SDK Basic Version 2.3.0
D/OpenGLRenderer: HWUI GL Pipeline
E/libc: Access denied finding property "camera.hal1.packagelist"
I/zygote: Do partial code cache collection, code=30KB, data=24KB
I/zygote: After code cache collection, code=30KB, data=24KB
    Increasing code cache capacity to 128KB
I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib/hw/gralloc.msm8996.so from the current namespace instead.
I/Adreno: QUALCOMM build                   : 33f3a03, I26dffed9a4
    Build Date                       : 04/17/18
    OpenGL ES Shader Compiler Version: EV031.22.00.01
    Local Branch                     :
    Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.6.5.R1.08.00.00.312.043
    Remote Branch                    : NONE
    Reconstruct Branch               : NOTHING
I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib/hw/gralloc.msm8996.so from the current namespace instead.
I/Adreno: PFP: 0x005ff087, ME: 0x005ff063
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 2
I/HelloAR: load target (true): argame (1)
I/HelloAR: load target (true): idback (2)
I/HelloAR: load target (true): namecard (3)
I/HelloAR: video: video.mp4 (0)
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/MediaPlayerNative: info/warning (3, 0)
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
I/zygote: Do partial code cache collection, code=62KB, data=47KB
I/zygote: After code cache collection, code=58KB, data=46KB
    Increasing code cache capacity to 256KB
V/MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
    cleanDrmObj: mDrmObj=null mDrmSessionId=null
W/MediaPlayer: Couldn't open https://sightpvideo-cdn.sightp.com/sdkvideo/EasyARSDKShow201520.mp4: java.io.FileNotFoundException: No content provider: https://sightpvideo-cdn.sightp.com/sdkvideo/EasyARSDKShow201520.mp4
V/MediaHTTPService: MediaHTTPService(android.media.MediaHTTPService@d5756f5): Cookies: null
V/MediaHTTPService: makeHTTPConnection: CookieManager created: java.net.CookieManager@12472e2
    makeHTTPConnection(android.media.MediaHTTPService@d5756f5): cookieManager: java.net.CookieManager@12472e2 Cookies: null
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
W/MediaPlayer-JNI: MediaPlayer finalized without being released
W/MediaPlayer-JNI: MediaPlayer finalized without being released
E/MediaPlayerNative: stop called in state 4, mPlayer(0xc8135fe0)
    error (-38, 0)
V/MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
    cleanDrmObj: mDrmObj=null mDrmSessionId=null
W/MediaPlayer: mediaplayer went away with unhandled events
I/HelloAR: video: transparentvideo.mp4 (0)
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/MediaPlayerNative: info/warning (3, 0)
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/MediaPlayer-JNI: MediaPlayer finalized without being released
V/MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
    cleanDrmObj: mDrmObj=null mDrmSessionId=null
W/zygote: Got a deoptimization request on un-deoptimizable method int android.media.MediaPlayer.getCurrentPosition()
W/zygote: Got a deoptimization request on un-deoptimizable method int android.media.MediaPlayer.getCurrentPosition()
W/MediaPlayer: Couldn't open https://sightpvideo-cdn.sightp.com/sdkvideo/EasyARSDKShow201520.mp4: java.io.FileNotFoundException: No content provider: https://sightpvideo-cdn.sightp.com/sdkvideo/EasyARSDKShow201520.mp4
V/MediaHTTPService: MediaHTTPService(android.media.MediaHTTPService@ddb756a): Cookies: null
V/MediaHTTPService: makeHTTPConnection: CookieManager(java.net.CookieManager@12472e2) exists.
V/MediaHTTPService: makeHTTPConnection(android.media.MediaHTTPService@ddb756a): cookieManager: java.net.CookieManager@12472e2 Cookies: null
I/zygote: Do full code cache collection, code=125KB, data=100KB
I/zygote: After code cache collection, code=93KB, data=66KB
W/MediaPlayer-JNI: MediaPlayer finalized without being released
I/HelloAR: video: https://sightpvideo-cdn.sightp.com/sdkvideo/EasyARSDKShow201520.mp4 (0)
W/MediaPlayerNative: info/warning (703, 0)
W/MediaPlayerNative: info/warning (701, 0)
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
I/chatty: uid=10305(u0_a305) Binder:9753_1 identical 4 lines
W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
W/IMediaDeathNotifier: media server died
E/MediaPlayerNative: error (100, 0)
E/MediaPlayer: Error (100,0)
I/HelloAR: video: https://sightpvideo-cdn.sightp.com/sdkvideo/EasyARSDKShow201520.mp4 (-1)
E/MediaPlayerNative: pause called in state 0, mPlayer(0xc8138cc0)
E/MediaPlayerNative: error (-38, 0)
E/MediaPlayer: Error (-38,0)
I/HelloAR: video: https://sightpvideo-cdn.sightp.com/sdkvideo/EasyARSDKShow201520.mp4 (-1)
E/MediaPlayerNative: start called in state 0, mPlayer(0xc8138cc0)
E/MediaPlayerNative: error (-38, 0)
E/MediaPlayer: Error (-38,0)

1 Answer

0 votes
answered Jun 19 by zhnagjian (9,340 points)
Hello,

Is it normal to test with other types of mobile phones?
commented Jun 19 by zzhenia (260 points)
edited Jun 19 by zzhenia
I've tested on the following phones and the same example code works fine on them:
- Pixel with latest Android
- Samsung Galaxy J5 with Android 5.1.1
- HUAWEI P20 Lite with Android 8.0

 But as mentioned in the question, it fails to stream video on
- Samsung Note 9 (not sure which Android, could be 8 or 9)
- Xiomi Mi 5 (Android 8.0 OPR1.170623.032)

Could it be that the issue with Android 8?

UPD:
One more important detail:
the streaming was working fine on my Mi 5 earlier. Update to Android 8.0.0 OPR1.170623.032 broke streaming. So the issue could be connected to Xiomi's Android version.
commented Jun 19 by zzhenia (260 points)
I'm happy to have a call to provide more details about the issue. It is critical for me to fix it within the next 3 days. Please e-mail me if you'd like to have the call.
commented Jun 19 by zzhenia (260 points)
edited Jun 19 by zzhenia
I've just tested streaming on HUAWEI P20 Lite with Android 8.0 and it works. This means it  could be connected to Samsung and Xiomi Android 8 versions only. This is only a suggestion, has to be tested.
commented Jun 19 by zzhenia (260 points)
One more important detail:
the streaming was working fine on my Mi 5 earlier. Update to Android 8.0.0 OPR1.170623.032 broke streaming. So the issue must be connected to Xiomi's Android version.
commented Jun 20 by zzhenia (260 points)
And one more detail:
the first error in the console of Android Studio is 'E/libc: Access denied finding property "camera.hal1.packagelist" ' which happens the moment  `camera.open(CameraDeviceType.Default);` is called, though the example project asks all the necessary permissions at app start. Could this be the origin of the bug with streaming?
commented Jun 25 by derrickscank (110 points)
I have the same issue, Android 8.1.0
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...