VlcXamarin icon indicating copy to clipboard operation
VlcXamarin copied to clipboard

[linker] libvlcjni.so has text relocations - app crashes

Open RogerSchmidlin opened this issue 9 years ago • 8 comments

Hello there First, thanks for putting together this great wrapper for vlc. I am trying to write an xamarin forms app for playing videos. I tried to use your library on the android part but got following error:

"[linker] libvlcjni.so has text relocations. This is wasting memory and prevents security hardening. Please fix."

It seems to work ok, if I only create a xamarin android solution. Thanks for your help, Roger

RogerSchmidlin avatar Dec 14 '15 08:12 RogerSchmidlin

Do you have any plans to provide this wrapper for iOS? Or even better a video player view for Xamarin Forms :)

RogerSchmidlin avatar Dec 14 '15 08:12 RogerSchmidlin

I didn't have any plans for iOS or Forms yet, but that would be a good idea. I'll see if i can look into it.

martijn00 avatar Dec 14 '15 09:12 martijn00

Could the above problem be solved with this link? [http://stackoverflow.com/questions/20141538/mylib-so-has-text-relocations-this-is-wasting-memory-and-is-a-security-risk-pl]

RogerSchmidlin avatar Dec 14 '15 09:12 RogerSchmidlin

I get very weird things happening at my side. Could you try my simple version of your modified sample code and set a breakpoint where suggested. Step over and it should crash. At least at my end. Do you have a working sample to play a video through your lib? ' LibVLCLibVLC mLibVLC = null; MediaPlayer mMediaPlayer = null; MediaLibVLC mMediaLib = null;

    protected override void OnCreate (Bundle bundle)
    {
        base.OnCreate (bundle);

        // Set our view from the "main" layout resource
        SetContentView (Resource.Layout.Main);

        // try a breakpoint here and step over it. I get crashes right there
        mLibVLC = new LibVLCLibVLC ();
        mMediaPlayer = new MediaPlayer (mLibVLC);

        AssetFileDescriptor afd = Assets.OpenFd ("video.mp4");
        if (afd != null) {
            mMediaLib = new MediaLibVLC (mLibVLC, afd.FileDescriptor);
            Console.WriteLine ("--- open video file successful");
            mMediaPlayer.Media = mMediaLib;
            mMediaPlayer.Play ();
        } else {
            Console.WriteLine ("--- couldn't open video file");
        }
    }

'

RogerSchmidlin avatar Dec 14 '15 13:12 RogerSchmidlin

Can you check this again with the latest update?

martijn00 avatar Jan 12 '16 09:01 martijn00

Sorry for my late reply. If I set a breakpoint it still crashes when I step over it. This time with no error message in the application output window. I can run it without breakpoints, but no video nor sound comes out. Your example works with just audio.

RogerSchmidlin avatar Jan 22 '16 03:01 RogerSchmidlin

Hi, i have the same issue, did you fix it ?

mfrisby avatar Feb 12 '16 16:02 mfrisby

I'm sorry that I met the same problem. How can I solve it?

erwoooo avatar Feb 12 '19 05:02 erwoooo