EricssonResearch / EricssonResearch/openwebrtc-examples
Android NativeCall crashes on Join
- Dominant language
- Objective-C
- Stars
- 336
- Forks
- 209
- PR merge metrics
- No merged PRs in 30d
Description
I have cloned and built the NativeCall example application for Android. When I try to run it on my Samsung Galaxy S7 Edge running Android 6.0.1, I can get the application to launch, but as soon as I try to join a room, the application gets a `SIGABRT`. The log in adb shows nothing, but if I run it in the debugger I can get a call stack for the exception, which looks like this:
thread #12: tid = 7719, 0xf7035538 libc.so`tgkill + 12, name = 'Thread-579', stop reason = signal SIGABRT
frame #0: 0xf7035538 libc.so`tgkill + 12
frame #1: 0xf703313c libc.so`pthread_kill + 36
frame #2: 0xf700f786 libc.so`raise + 14
frame #3: 0xf700c9f4 libc.so`__libc_android_abort + 38
frame #4: 0xf700a5b0 libc.so`abort + 8
frame #5: 0xf4250c48 libart.so`art::Runtime::Abort() + 216
frame #6: 0xf4022d20 libart.so`art::LogMessage::~LogMessage() + 2216
frame #7: 0xf417ecf2 libart.so`art::JavaVMExt::JniAbort(char const*, char const*) + 1530
frame #8: 0xf417f092 libart.so`art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list) + 58
frame #9: 0xf402b10e libart.so`art::ScopedCheck::AbortF(char const*, ...) + 34
frame #10: 0xf402ffea libart.so`art::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::JniValueType*) (.constprop.95) + 5058
frame #11: 0xf403e12a libart.so`art::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::__va_list, art::Primitive::Type, art::InvokeType) + 642
frame #12: 0xf403ec00 libart.so`art::CheckJNI::CallStaticIntMethod(_JNIEnv*, _jclass*, _jmethodID*, ...) + 40
frame #13: 0xdf18347e libopenwebrtc_jni.so`VCD_getNumberOfCameras + 90 at android_video_capture_device.c:1470
frame #14: 0xdf185006 libopenwebrtc_jni.so`VCD_open(logInterval=2000000) + 162 at android_video_capture_device.c:790
frame #15: 0xdf17f82a libopenwebrtc_jni.so`gst_android_video_source_change_state(p_element=0xdec380e0, transition=GST_STATE_CHANGE_NULL_TO_READY) + 146 at gst_android_video_source.c:207
frame #16: 0xdf4b4678 libopenwebrtc_jni.so`gst_element_change_state(element=0xdec380e0, transition=) + 20 at gstelement.c:2604
frame #17: 0xdf4b4a06 libopenwebrtc_jni.so`gst_element_set_state_func(element=0xdec380e0, state=) + 338 at gstelement.c:2560
frame #18: 0xdf4a0a6a libopenwebrtc_jni.so`gst_bin_change_state_func + 128 at gstbin.c:2328
frame #19: 0xdf4a09ea libopenwebrtc_jni.so`gst_bin_change_state_func(element=0xdbd6cbc0, transition=GST_STATE_CHANGE_NULL_TO_READY) + 1858 at gstbin.c:2676
frame #20: 0xdf4cb4e4 libopenwebrtc_jni.so`gst_pipeline_change_state(element=0xdbd6cbc0, transition=GST_STATE_CHANGE_NULL_TO_READY) + 268 at gstpipeline.c:474
frame #21: 0xdf4b4678 libopenwebrtc_jni.so`gst_element_change_state(element=0xdbd6cbc0, transition=) + 20 at gstelement.c:2604
frame #22: 0xdf4b4a06 libopenwebrtc_jni.so`gst_element_set_state_func(element=0xdbd6cbc0, state=) + 338 at gstelement.c:2560
frame #23: 0xdf28d7be libopenwebrtc_jni.so`owr_local_media_source_request_source(media_source=0xf31071e0, caps=0xe99ac768) + 1258 at owr_local_media_source.c:661
frame #24: 0xdf27e63a libopenwebrtc_jni.so`_owr_media_source_request_source(media_source=0xf31071e0, caps=0xe99ac768) + 74 at owr_media_source.c:562
frame #25: 0xdf28e7a0 libopenwebrtc_jni.so`maybe_start_renderer(renderer=0xf2e42508) + 92 at owr_media_renderer.c:307
frame #26: 0xdf28ec58 libopenwebrtc_jni.so`set_source(args=0xe9c036f0) + 220 at owr_media_renderer.c:367
frame #27: 0xdf5d6e38 libopenwebrtc_jni.so`g_main_context_dispatch + 112 at gmain.c:3210
frame #28: 0xdf5d6dc8 libopenwebrtc_jni.so`g_main_context_dispatch(context=0xf3148d20) + 96 at gmain.c:3874
frame #29: 0xdf5d6fe0 libopenwebrtc_jni.so`g_main_context_iterate(context=0xf3148d20, block=, dispatch=1, self=0x00000012) + 252 at gmain.c:3945
frame #30: 0xdf5d7288 libopenwebrtc_jni.so`g_main_loop_run(loop=0xee2d5560) + 208 at gmain.c:4139
frame #31: 0xdf27ce42 libopenwebrtc_jni.so`owr_run + 58 at owr.c:350
frame #32: 0xdf27ceb0 libopenwebrtc_jni.so`owr_run_thread_func(msg_queue=) + 80 at owr.c:332
frame #33: 0xdf5ebe0a libopenwebrtc_jni.so`g_thread_proxy(data=0xf317d980) + 82 at gthread.c:764
frame #34: 0xf7032a3c libc.so`__pthread_start(void*) + 32
* frame #35: 0xf700d086 libc.so`__start_thread + 8
best I can tell, it's related to the `VCD_getNumberOfCameras` method. Is there something special I need to do here?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the NativeCall Android example and inspect VCD_getNumberOfCameras and VCD_open in android_video_capture_device.c, especially the lines shown in the stack trace. Reproduce a room join on Android 6.0.1 under the debugger, identify the JNI failure, and verify that joining no longer ends in SIGABRT.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100