New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 4 users
Status: Assigned
Owner:
Cc:
Components:
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment
Android WebRTC native crash when disconnecting (statsobserver?)
Reported by rskvir...@thevideocafe.com, Oct 23 2014 Back to list
What steps will reproduce the problem?
1. Make audio call using WebRTC Android sample 
2. Add WebRTC Stats Observer (Java sample:

private class WebRtcStatsObserver implements StatsObserver {
        @Override
        public void onComplete(StatsReport[] statsReports) {
            lastStatsReports = ImmutableList.copyOf(statsReports);
            notifyObservers();
        }
    }

...
WebRtcStatsObserver webRtcStatsObserver = WebRtcStatsObserver();
...
peerConnection.getStats(webRtcStatsObserver, null)
...
)

3. Native crash during disconnection


What is the expected result?
Correct disconnection, no crash


What do you see instead?
Crash in native:
backtrace:
#00 pc 00000000 <unknown>
#01 pc 0003e9c7 /data/app-lib/com.gowiper.android-1/libjingle_peerconnection_so.so
#02 pc 0003fdad /data/app-lib/com.gowiper.android-1/libjingle_peerconnection_so.so (Java_org_webrtc_PeerConnection_nativeGetStats+224)
#03 pc 0002038c /system/lib/libdvm.so (dvmPlatformInvoke+112)
#04 pc 00050b87 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
#05 pc 00029820 /system/lib/libdvm.so
#06 pc 0002e1d8 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#07 pc 00062be1 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+292)
#08 pc 00062c0b /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
#09 pc 00057983 /system/lib/libdvm.so
#10 pc 0000cbe0 /system/lib/libc.so (__thread_entry+72)
#11 pc 0000cd58 /system/lib/libc.so (pthread_create+208)


What version of the product are you using? On what operating system?
Sony Xperia Z (C6603), Android 4.3

Please provide any additional information below.



 
Project Member Comment 1 by braveyao@webrtc.org, Oct 24 2014
Owner: braveyao@webrtc.org
If you don't do anything in the observer, would it crash too?
Please help to symbolize the backtrace, by "addr2line -C -f -e ./out/Debug/libjingle_peerconnection_so.so <address>". 
Project Member Comment 2 by braveyao@webrtc.org, Oct 24 2014
BTW: there is getStats() invoking in the AppRTCDemo. Would that work at your side?
https://code.google.com/p/webrtc/source/browse/trunk/talk/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java#333
OK, let's go:
Rev: 7178.

-------------

#01 pc 0003e9c7 /data/app-lib/com.gowiper.android-1/libjingle_peerconnection_so.so

ExtractNativePC(_JNIEnv*, _jobject*)
/home/roman/webrtc_back/webrtc-android/trunk/out_arm/Release/../../webrtc/base/scoped_ref_ptr.h:78

-------------

#02 pc 0003fdad /data/app-lib/com.gowiper.android-1/libjingle_peerconnection_so.so (Java_org_webrtc_PeerConnection_nativeGetStats+224)

Java_org_webrtc_PeerConnection_nativeGetStats
/home/roman/webrtc_back/webrtc-android/trunk/out_arm/Release/../../talk/app/webrtc/java/jni/peerconnection_jni.cc:2739




Regarding AppRTCDemo - I used modified version of AppRTCDemo that queries for stats every 5 sec. So this is "heisenbug"
Project Member Comment 5 by braveyao@webrtc.org, Oct 27 2014
OK. 
First, could you please try the latest trunk?
Then, would the getStats() invoking in original AppRTCDemo cause any problem? 
Then try to help us to reproduce it with miminum modification to the original AppRTCDemo.

BTW: Why "our_arm/Release". I suppose it should be the Debug building.
OK, trying latest trunk.
With AppRTC demo it is hard to reproduce. I see crashes in GPlay because of large number of users, but there are no tests for now to reproduce behaviour.

It is Release with map file.
Project Member Comment 7 by braveyao@webrtc.org, Oct 29 2014
OK. I would leave this issue open for a while and close it if there is no more update.
WebRTC revision 7524:

12-05 13:00:51.472 I/DEBUG   (  314): backtrace:
12-05 13:00:51.472 I/DEBUG   (  314):     #00  pc 00007c80  /system/lib/libicuuc.so
12-05 13:00:51.472 I/DEBUG   (  314):     #01  pc 000401d5  /data/app-lib/com.gowiper.android.debug-154/libjingle_peerconnection_so.so (Java_org_webrtc_PeerConnection_nativeGetStats+240)
12-05 13:00:51.472 I/DEBUG   (  314):     #02  pc 00020b8c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
12-05 13:00:51.472 I/DEBUG   (  314):     #03  pc 000516eb  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
12-05 13:00:51.472 I/DEBUG   (  314):     #04  pc 0002a020  /system/lib/libdvm.so
12-05 13:00:51.472 I/DEBUG   (  314):     #05  pc 0002e9e4  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
12-05 13:00:51.472 I/DEBUG   (  314):     #06  pc 0006387d  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+292)
12-05 13:00:51.472 I/DEBUG   (  314):     #07  pc 000638a7  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
12-05 13:00:51.472 I/DEBUG   (  314):     #08  pc 000585fb  /system/lib/libdvm.so
12-05 13:00:51.472 I/DEBUG   (  314):     #09  pc 0000cc60  /system/lib/libc.so (__thread_entry+72)
12-05 13:00:51.472 I/DEBUG   (  314):     #10  pc 0000cddc  /system/lib/libc.so (pthread_create+208)
12-05 13:00:51.472 I/DEBUG   (  314): 
12-05 13:00:51.472 I/DEBUG   (  314): stack:
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbbd8  400a0208  
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbbdc  40065cd7  /system/lib/libc.so (dlfree+50)
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbbe0  4009d000  /system/lib/libc.so
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbbe4  61990c48  
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbbe8  61990c48  
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbbec  66dbbc20  [stack:24776]
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbbf0  1d300001  
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbbf4  40062c69  /system/lib/libc.so (free+12)
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbbf8  40905ec0  /system/lib/libicuuc.so
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbbfc  408826ff  /system/lib/libicuuc.so (icu_50::UVector64::~UVector64()+18)
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbc00  637609c8  
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbc04  653ce845  /data/app-lib/com.gowiper.android.debug-154/libjingle_peerconnection_so.so
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbc08  614c9b90  
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbc0c  637609c8  
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbc10  df0027ad  
12-05 13:00:51.472 I/DEBUG   (  314):          66dbbc14  00000000  
12-05 13:00:51.472 I/DEBUG   (  314):     #00  66dbbc18  00000000  

Comment 9 by vrk@webrtc.org, Dec 17 2014
Labels: Area-PeerConnection
Project Member Comment 10 by pthatcher@webrtc.org, Jan 12 2015
Labels: IceBox EngTriaged
Owner: glaznev@webrtc.org
same issue
Project Member Comment 12 by pthatcher@webrtc.org, Nov 8 2016
Labels: Pri-3
Project Member Comment 13 by anatolid@chromium.org, Dec 5 2016
Status: Assigned
[bulk-edit] This issue appears to have been triaged (as evidenced by the presence of the EngTriaged label) and also has an Owner -- hence, changing its status to Assigned. If the currently set Owner is wrong, then please re-assign to a correct Owner, or remove Owner and set status to Available.
Sign in to add a comment