ant-media / LibRtmp-Client-for-Android

It is probably the smallest(~60KB, fat version ~300KB) rtmp client for android. It calls librtmp functions over JNI interface
http://antmedia.io
Apache License 2.0
674 stars 231 forks source link

Bad memory copy #18

Open dragantl opened 8 years ago

dragantl commented 8 years ago

Scenario:

I get the following error:

10-06 23:50:02.216 194-194/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-06 23:50:02.216 194-194/? A/DEBUG: Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/MOB31E/3142026:user/release-keys'
10-06 23:50:02.216 194-194/? A/DEBUG: Revision: '11'
10-06 23:50:02.216 194-194/? A/DEBUG: ABI: 'arm'
10-06 23:50:02.216 194-194/? A/DEBUG: pid: 8321, tid: 8730, name: Loader:Extracto  >>> com.test.player.debug <<<
10-06 23:50:02.216 194-194/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
10-06 23:50:02.243 194-194/? A/DEBUG:     r0 8e99a370  r1 00000000  r2 00000001  r3 00000010
10-06 23:50:02.243 194-194/? A/DEBUG:     r4 9b91b000  r5 00000001  r6 00000001  r7 9b91f188
10-06 23:50:02.243 194-194/? A/DEBUG:     r8 8e99a370  r9 00000001  sl 9a7129ab  fp 131432b0
10-06 23:50:02.243 194-194/? A/DEBUG:     ip 80000000  sp 8e99a338  lr 9a70db4d  pc b6ca86ae  cpsr 800f4430
10-06 23:50:02.248 194-194/? A/DEBUG: backtrace:
10-06 23:50:02.248 194-194/? A/DEBUG:     #00 pc 000176ae  /system/lib/libc.so (__memcpy_base+165)
10-06 23:50:02.249 194-194/? A/DEBUG:     #01 pc 00007b49  /data/app/com.test.player.debug-2/lib/arm/librtmp-jni.so
10-06 23:50:02.249 194-194/? A/DEBUG:     #02 pc 00007d87  /data/app/com.test.player.debug-2/lib/arm/librtmp-jni.so (RTMP_ReadPacket+66)
10-06 23:50:02.249 194-194/? A/DEBUG:     #03 pc 00009351  /data/app/com.test.player.debug-2/lib/arm/librtmp-jni.so (RTMP_ConnectStream+56)
10-06 23:50:02.249 194-194/? A/DEBUG:     #04 pc 0000a165  /data/app/com.test.player.debug-2/lib/arm/librtmp-jni.so (Java_net_butterflytv_rtmp_1client_RtmpClient_open+108)
10-06 23:50:02.249 194-194/? A/DEBUG:     #05 pc 000008e5  /data/data/com.test.player.debug/cache/slice-net.butterflytv.utils-rtmp-client-0.2.6.1_856a7238761ee0f3c629e21e465141e60bb4c661-classes.dex (offset 0x2000)
mekya commented 7 years ago

Hi,

Could you give a rtmp url to test this bug?

Bests, A. Oguz

dragantl commented 7 years ago

Sorry for the delay, @mekya. Here is a sample stream:

rtmp://streaming.unifiedvideo.com/live/116?token=1a3f0a2640d24fba92b3266be3f8c6eb

mekya commented 7 years ago

Hi,

do you still have this issue?

EHG613 commented 5 years ago

@mekya hello ,i have the same problem

2019-01-24 09:41:51.187 11034-11034/? A/DEBUG: Build fingerprint: 'HiSTBAndroidV6/Hi3798MV200/Hi3798MV200:7.0/NRD90M/mingri09111112:eng/release-keys'
2019-01-24 09:41:51.187 11034-11034/? A/DEBUG: Revision: '0'
2019-01-24 09:41:51.187 11034-11034/? A/DEBUG: ABI: 'arm'
2019-01-24 09:41:51.187 11034-11034/? A/DEBUG: pid: 10919, tid: 10919, name: .minrray.camera  >>> com.minrray.camera <<<
2019-01-24 09:41:51.187 11034-11034/? A/DEBUG: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x96be1000
2019-01-24 09:41:51.187 11034-11034/? A/DEBUG:     r0 96bdd010  r1 beaf6eac  r2 96bdd00c  r3 00003ff2
2019-01-24 09:41:51.187 11034-11034/? A/DEBUG:     r4 beaf6ea8  r5 96be0ffd  r6 00003ff1  r7 0000001f
2019-01-24 09:41:51.187 11034-11034/? A/DEBUG:     r8 12e68400  r9 aeb85400  sl 12c034e0  fp 00000004
2019-01-24 09:41:51.187 11034-11034/? A/DEBUG:     ip 95922d78  sp beaf6e3c  lr 9591c981  pc 9591ccf8  cpsr 800b0030
2019-01-24 09:41:51.189 11034-11034/? A/DEBUG: backtrace:
2019-01-24 09:41:51.189 11034-11034/? A/DEBUG:     #00 pc 0000ccf8  /data/app/com.minrray.camera-2/lib/arm/librtmp-jni.so
2019-01-24 09:41:51.189 11034-11034/? A/DEBUG:     #01 pc 0000c97d  /data/app/com.minrray.camera-2/lib/arm/librtmp-jni.so (rtmp_sender_write_video_frame+40)
2019-01-24 09:41:51.189 11034-11034/? A/DEBUG:     #02 pc 00004587  /data/app/com.minrray.camera-2/lib/arm/librtmp-jni.so (Java_net_butterflytv_rtmp_1client_RTMPMuxer_writeVideo+50)
2019-01-24 09:41:51.189 11034-11034/? A/DEBUG:     #03 pc 004df30f  /data/app/com.minrray.camera-2/oat/arm/base.odex (offset 0x4a8000)

An error occurred after writeVideo for a while