chatrealm / DctvAndroid

Android app for http://diamondclub.tv
5 stars 5 forks source link

libstlport_shared.so not found on Nexus 6p #16

Open Excape opened 7 years ago

Excape commented 7 years ago

When I click on a stream on my Nexus 6p (except via chromecast), the app crashes with the following exception:

11-15 19:26:40.432 29746-29746/com.tinnvec.dctvandroid E/Vitamio[Player]: Error loading libs
                                                                          java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/user/0/com.tinnvec.dctvandroid/lib/libstlport_shared.so" not found
                                                                              at java.lang.Runtime.load0(Runtime.java:908)
                                                                              at java.lang.System.load(System.java:1505)
                                                                              at io.vov.vitamio.MediaPlayer.load_lib(MediaPlayer.java:261)
                                                                              at io.vov.vitamio.MediaPlayer.<clinit>(MediaPlayer.java:320)
                                                                              at io.vov.vitamio.widget.VideoView.openVideo(VideoView.java:427)
                                                                              at io.vov.vitamio.widget.VideoView.access$1400(VideoView.java:70)
                                                                              at io.vov.vitamio.widget.VideoView$3.surfaceCreated(VideoView.java:158)
                                                                              at android.view.SurfaceView.updateWindow(SurfaceView.java:618)
                                                                              at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:161)
                                                                              at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
                                                                              at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2205)
                                                                              at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
                                                                              at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)
                                                                              at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
                                                                              at android.view.Choreographer.doCallbacks(Choreographer.java:686)
                                                                              at android.view.Choreographer.doFrame(Choreographer.java:621)
                                                                              at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
                                                                              at android.os.Handler.handleCallback(Handler.java:751)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                              at android.os.Looper.loop(Looper.java:154)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:6119)
                                                                              at java.lang.reflect.Method.invoke(Native Method)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

I couldn't replicate this with any Nexus 6p emulator, no matter what Android version. It just occurs on my physical device. It's a Nexus 6p with Android 7.0.1, original Google image.

My guess is some hardware thing, maybe the cpu architecture is not supported?

RenAigu commented 7 years ago

Previously fixed the same or similar issue on my device (Oneplus One then running 7.0) in this commit: https://github.com/chatrealm/DctvAndroid/pull/10/commits/d705719e270631025ac8e540fd8c26ed3e074a77

Reverting to original code gives me the error again on CM 14.1 (7.1)

Excape commented 7 years ago

@RenAigu I tried reverting d705719 too, but I get the same error

kevbob1 commented 7 years ago

https://www.vitamio.org/en/docs/FAQ/2013/0509/14.html

Most likely hardware or could be incorrect install of Vitamio library. I also got a report that the latest DCTV version crashes on 'Google Pixel running Android 7.1'. Which seems to have a similar CPU to Nexus 6P.

kevbob1 commented 7 years ago

I can reproduce in android emulator, here is my virtual device image used:

Nougat , arm64-v8a, Android 7.0 (with Google APIs)

takes forever to start, but eventually i get identical error message launching video.

RenAigu commented 7 years ago

Found a possible solution, based on https://github.com/yixia/VitamioBundle/issues/305

@Excape can you try the latest commit? (6f07908ab88e0484f374fad4d4710e0f8d3d7b94)

Excape commented 7 years ago

@RenAigu YES! It works! :tada:

Although I'm not sure what this line does: android.useDeprecatedNdk=true

It works on my phone without this line..

This seems to be a general fix for 64bit devices. Would be great to test it on a Google Pixel.

What does this mean for #17 then? When this works correctly, I see no point in switching libraries

kevbob1 commented 7 years ago

My vote is we keep #17 but maybe don't implement right away. Since Vitamio support is near non-existent, I fear this won't be the last problem we will see where we won't get any upstream support. also, what happens when android tools drops support for depercated ndk?

Excape commented 7 years ago

Good point, ijkplayer is in active development

In my tests useDeprecatedNdk is not necessary, but I don't know how @RenAigu sees this

RenAigu commented 7 years ago

@kevbob1 Agree. However Ijkplayer doesn't really seem as easy to implement as I thought earlier, or at least I can't figure out how to do it easily with the limited documentation. It seems for instance that you need to build a VideoView implementation yourself, or build it from a git clone in as a convoluted way a I imagine Vitamio is to get it to work.

@Excape I also don;t know how I see this ;) Based it on this comment: https://github.com/yixia/VitamioBundle/issues/305#issuecomment-138062182

From what I understand it's just a setting for the gradle builder and doesn't seem to affect the eventual app. I'd it can be removed then

Excape commented 7 years ago

The usDeprecatedNdk seems to come from a comment from this answer and applies to an older version of ndk / gradle plugin. But yeah, probably no impact on the APK itself

RenAigu commented 7 years ago

well I'll push out my first build to the store then, before any more disappointed reviews come in. 😎

kevbob1 commented 7 years ago

I've been chatting w/ that top 1-star reviewer via Twitter. He's the one w/ the Google Pixel. I will do my best to persuade him to bump it to 5-star. ;)


Kevin

On Wed, Nov 16, 2016 at 2:16 PM, RenAigu notifications@github.com wrote:

well I'll push out my first build to the store then, before any more disappointed reviews come in. 😎

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chatrealm/DctvAndroid/issues/16#issuecomment-261074533, or mute the thread https://github.com/notifications/unsubscribe-auth/AATovQuXGc8eY5JzVl9GTvAqG6mJTQmbks5q-3KrgaJpZM4Ky5vg .