Page 1 of 1

LibVLC Warning on release

Posted: 14 Apr 2017 14:05
by pecana
Hello, i noticed a lot of warning message when i relase LibVLC object :

Code: Select all

W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[53,tid=23862,Native,Thread*=0x96cbe700,peer=0x1302e1c0,"mediacodec_jni"] W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[57,tid=23864,Native,Thread*=0x949f3700,peer=0x131041c0,"VlcObject"] W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[55,tid=23863,Native,Thread*=0x96564300,peer=0x130f61c0,"android_audiotrack"] W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[58,tid=23869,Native,Thread*=0x96565700,peer=0x13105220,"android_audiotrack"] W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[52,tid=23846,Native,Thread*=0x93f71900,peer=0x1301ad60,"VlcObject"] W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[54,tid=23867,Native,Thread*=0x96562f00,peer=0x1302f220,"AWindowHandler"]
I just call mLibvlc.release() on my liblvcl object, am i doing it in the wrong way ?

Thank you

Re: LibVLC Warning on release

Posted: 14 Apr 2017 14:08
by Jean-Baptiste Kempf
You probably did not release the media or the media player.

Re: LibVLC Warning on release

Posted: 16 Apr 2017 08:22
by pecana
You probably did not release the media or the media player.
Hello, I am pretty sure I do it before releasing the player but I will double check it :-)
Thank you

Re: LibVLC Warning on release

Posted: 10 May 2017 11:54
by pecana
You probably did not release the media or the media player.
Hello, I looked again and again and I am sure to release the the Media, the MediaPlayer and the Libvlc istance but i still get this warning.
Who can I find what is going wrong?

Thank you

Re: LibVLC Warning on release

Posted: 11 May 2017 12:15
by pecana
Hello, I was wondering if I am doing things in the right orders:
We have:
- mLibvlc instance
- mMediaPlayer
- mMedia

what should I do?

mMediaPlayer.stop(); //if it is playing
mMedia.release();
mMediaPlayer.release();
mLibvlc.release();

Is this the correct order? or do I have first to release mediaplayer and then the media?

Re: LibVLC Warning on release

Posted: 12 May 2017 10:15
by Jean-Baptiste Kempf
You probably did not release the media or the media player.
Hello, I looked again and again and I am sure to release the the Media, the MediaPlayer and the Libvlc istance but i still get this warning.
Who can I find what is going wrong?
Probably gdb.

Re: LibVLC Warning on release

Posted: 26 May 2017 16:35
by pecana
You probably did not release the media or the media player.
Hello, I looked again and again and I am sure to release the the Media, the MediaPlayer and the Libvlc istance but i still get this warning.
Who can I find what is going wrong?
Probably gdb.
Hello I tried with VLC application and it gives me the same error message when closing the player.
Debbuging a bit my application it seems to occur when i call mMediaPlayer.stop(),
immediately after calling MediaPlayer.stop() i get this :

Code: Select all

05-26 16:33:31.933 18738-20471/com.test.vlc E/VLC-std: [h264 @ 0x8eee3c00] get_buffer() failed [h264 @ 0x8eee3c00] thread_get_buffer() failed [h264 @ 0x8eee3c00] decode_slice_header error [h264 @ 0x8eee3c00] get_buffer() failed [h264 @ 0x8eee3c00] thread_get_buffer() failed [h264 @ 0x8eee3c00] decode_slice_header error [h264 @ 0x8eee3c00] no frame! 05-26 16:33:31.933 18738-20471/com.test.vlc E/VLC-std: [h264 @ 0x8eee3800] get_buffer() failed [h264 @ 0x8eee3800] thread_get_buffer() failed [h264 @ 0x8eee3800] decode_slice_header error [h264 @ 0x8eee3800] get_buffer() failed [h264 @ 0x8eee3800] thread_get_buffer() failed [h264 @ 0x8eee3800] decode_slice_header error [h264 @ 0x8eee3800] no frame! 05-26 16:33:31.988 18738-20492/com.test.vlc W/art: Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[22,tid=20492,Native,Thread*=0x91217500,peer=0x1353b0a0,"mediacodec_jni"]

Any idea ?

Re: LibVLC Warning on release

Posted: 01 Jun 2017 10:20
by pecana
Hello?

Re: LibVLC Warning on release

Posted: 10 Mar 2019 14:37
by Nikolay
Faced with the same problem. Sometimes MediaPlayer.stop freezes for ~1.5 secs and all vlc threads are terminated abnormally. I use imem extension.

Code: Select all

03-10 16:18:04.020 10737 19338 I INJECTOR: [ 491.945] [-656396288] libvlcjni-mediaplayer.c:334 (Java_org_videolan_libvlc_MediaPlayer_nativeStop) MEDIA_PLAYER_STOP 03-10 16:18:04.110 1196 1196 I MiSysSrv: ^[[37m[INFO] Change to Voltage: 105 mv (0x26)^[[m 03-10 16:18:04.362 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:04.362 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:04.362 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:04.362 1234 1234 I sitatvservice: GetHdrStatus: bHdrEnable=0 03-10 16:18:04.778 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:04.778 1234 1234 I sitatvservice: GetHdrStatus: bHdrEnable=0 03-10 16:18:04.778 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:04.778 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:05.095 4310 4384 D BI_SDK __/null/0/null/Timer-0/bi.com.tcl.bi.net.NetWorkManager$MyTimerTask.run(L:94)3.0.1: Timer on Time 03-10 16:18:05.098 4310 4384 D BI_SDK __/null/0/null/Timer-0/bi.com.tcl.bi.net.NetWorkManager.sendMessageToVolley(L:107)3.0.1sendMessageToVolley() 03-10 16:18:05.285 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:05.285 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:05.285 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:05.285 1234 1234 I sitatvservice: GetHdrStatus: bHdrEnable=0 03-10 16:18:05.418 1732 2203 E WifiStateMachine: handleMessage: E msg.what=131143 03-10 16:18:05.419 1732 2203 E WifiStateMachine: processMsg: DisconnectedState 03-10 16:18:05.420 1732 2203 E WifiStateMachine: startDelayedScan send -> 9049 milli 10000 03-10 16:18:05.433 1732 2203 E WifiStateMachine: [1 552 223 885 433 ms] noteScanstart no scan source uid -2 03-10 16:18:05.446 1732 2203 E WifiStateMachine: handleMessage: X 03-10 16:18:05.656 10737 16712 W art : Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[53,tid=16712,Native,Thread*=0xd2ba7800,peer=0x1348a0a0,"android_audiotrack"] 03-10 16:18:05.667 10737 16527 D VLC : [db1a9430/408f] libvlc decoder: killing decoder fourcc `mp4a' 03-10 16:18:05.668 10737 16527 D VLC : [db1a9430/408f] libvlc decoder: removing module "avcodec" 03-10 16:18:05.680 10737 16527 D VLC : [d8de2b30/408f] libvlc audio resampler: removing module "ugly" 03-10 16:18:05.680 10737 16527 D VLC : [d8de2630/408f] libvlc audio filter: removing module "scaletempo" 03-10 16:18:05.680 10737 16527 D VLC : [d8de28b0/408f] libvlc audio converter: removing module "audio_format" 03-10 16:18:05.680 10737 16717 W art : Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[54,tid=16717,Native,Thread*=0xdb0ff800,peer=0x136210a0,"android_audiotrack"] 03-10 16:18:05.687 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:05.687 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:05.687 1196 1196 I MiSysSrv: Not support now! 42, change to mm_video!!! 03-10 16:18:05.687 1234 1234 I sitatvservice: GetHdrStatus: bHdrEnable=0 03-10 16:18:05.689 10737 16527 D VLC : [d27ebfb0/408f] libvlc volume: removing module "integer_mixer" 03-10 16:18:05.689 10737 16527 D VLC : [f41a9eb0/408f] libvlc generic: keeping audio output 03-10 16:18:05.689 10737 16527 D VLC : [db1a96b0/408f] libvlc packetizer: removing module "mpeg4audio" 03-10 16:18:05.694 10737 16527 D VLC : [d4803a50/408f] libvlc demux: removing module "ts" 03-10 16:18:05.698 10737 16527 D VLC : [ef0f8030/408f] libvlc input: Program doesn't contain anymore ES 03-10 16:18:05.699 10737 16527 D VLC : [d4aa7870/408f] libvlc stream: removing module "record" 03-10 16:18:05.702 10737 16527 D VLC : [d4aa77b0/408f] libvlc stream: removing module "prefetch" 03-10 16:18:05.704 10737 16527 D VLC : [d4aa76f0/408f] libvlc stream: removing module "imem_access" 03-10 16:18:05.708 10737 16527 I INJECTOR: [ 493.628] [-619029248] libvlcjni-media.c:138 (callback_close) CALLBACK_CLOSE 03-10 16:18:05.722 10737 16527 W art : Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[52,tid=16527,Native,Thread*=0xdb0f8400,peer=0x1339f2e0,"VlcObject"] 03-10 16:18:05.730 10737 19338 D VLC : [ef0f8030/4b8a] libvlc input: Destroying the input for 'imem://'

Re: LibVLC Warning on release

Posted: 11 Mar 2019 09:20
by tguillem
This warning is OK: "Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?)"
Like it said, its *is* going to be released via a pthread_key_create destructor.

Re: LibVLC Warning on release

Posted: 11 Mar 2019 11:14
by Nikolay
This warning is OK: "Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?)"
Like it said, its *is* going to be released via a pthread_key_create destructor.
I suppose the thread calls AttachCurrentThread and then finishes without calling DetachCurrentThread, without detaching from JVM. I think it is not the correct behaviour. I had the same bug, but JVM had crashed in my case and I had to fix it. But it this case it is just warning. I mostly interested in eliminating stuck ~1.5 secs.
03-10 16:18:04.020 10737 19338 I INJECTOR: [ 491.945] [-656396288] libvlcjni-mediaplayer.c:334 (Java_org_videolan_libvlc_MediaPlayer_nativeStop) MEDIA_PLAYER_STOP
03-10 16:18:05.704 10737 16527 D VLC : [d4aa76f0/408f] libvlc stream: removing module "imem_access"
03-10 16:18:05.708 10737 16527 I INJECTOR: [ 493.628] [-619029248] libvlcjni-media.c:138 (callback_close) CALLBACK_CLOSE
Callback close was called before callback read retuned 0(EOF). May be that is the thing.