Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash upon startRemoteVideo() #246

Closed
Doko-Demo-Doa opened this issue Mar 3, 2021 · 15 comments
Closed

Crash upon startRemoteVideo() #246

Doko-Demo-Doa opened this issue Mar 3, 2021 · 15 comments
Labels
crash There is a crash

Comments

@Doko-Demo-Doa
Copy link

Doko-Demo-Doa commented Mar 3, 2021

Describe the bug

I'm using the example here (React Native, with modifications to work with latest Chime library (0.11.1)):

To Reproduce

Run the app and whenever I enable it.audioVideo.startRemoteVideo(), the app crashes. Commenting that line will make it works, but no video of course. So far I only need:

  • Audio call.
  • Display remote video.

NativeMobileSDKBridge.kt

package vn.edu.dora.app.modules.chime.v2

import android.Manifest
import android.content.Context
import android.content.pm.PackageManager
import android.media.AudioAttributes
import android.media.AudioFocusRequest
import android.media.AudioManager
import android.os.Build
import androidx.core.content.ContextCompat
import com.amazonaws.services.chime.sdk.meetings.audiovideo.video.gl.DefaultEglCoreFactory
import com.amazonaws.services.chime.sdk.meetings.audiovideo.video.gl.EglCoreFactory
import com.amazonaws.services.chime.sdk.meetings.session.*
import com.amazonaws.services.chime.sdk.meetings.utils.logger.ConsoleLogger
import com.amazonaws.services.chime.sdk.meetings.utils.logger.LogLevel
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactContextBaseJavaModule
import com.facebook.react.bridge.ReactMethod
import com.facebook.react.bridge.ReadableMap
import com.facebook.react.modules.core.PermissionAwareActivity
import com.facebook.react.modules.core.PermissionListener
import vn.edu.dora.app.BuildConfig.CHIME_DEFAULT_REGION
import vn.edu.dora.app.modules.chime.v2.RNEventEmitter.Companion.RN_EVENT_ERROR
import vn.edu.dora.app.modules.chime.v2.RNEventEmitter.Companion.RN_EVENT_MEETING_END

class NativeMobileSDKBridge(
  reactContext: ReactApplicationContext,
  private val eventEmitter: RNEventEmitter,
  private val meetingObservers: MeetingObservers) : ReactContextBaseJavaModule(reactContext), PermissionListener {

  companion object {
    private const val WEBRTC_PERMISSION_REQUEST_CODE = 1
    private const val TAG = "ChimeReactNativeSDKManager"
    private const val KEY_MEETING_ID = "MeetingId"
    private const val KEY_EXTERNAL_MEETING_ID = "ExternalMeetingId"
    private const val KEY_ATTENDEE_ID = "AttendeeId"
    private const val KEY_JOIN_TOKEN = "JoinToken"
    private const val KEY_EXTERNAL_ID = "ExternalUserId"
    private const val KEY_MEDIA_PLACEMENT = "MediaPlacement"
    private const val KEY_AUDIO_FALLBACK_URL = "AudioFallbackUrl"
    private const val KEY_AUDIO_HOST_URL = "AudioHostUrl"
    private const val KEY_TURN_CONTROL_URL = "TurnControlUrl"
    private const val KEY_SIGNALING_URL = "SignalingUrl"

    var meetingSession: MeetingSession? = null
    var audioManager: AudioManager? = null
    val eglCoreFactory: EglCoreFactory = DefaultEglCoreFactory()
  }

  private var audioFocusChangeListener =
    AudioManager.OnAudioFocusChangeListener { focusChange ->
      {
      }
    }

  private var audioFocusRequest: AudioFocusRequest? =
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
      AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN).run {
        setAudioAttributes(AudioAttributes.Builder().run {
            setUsage(AudioAttributes.USAGE_VOICE_COMMUNICATION_SIGNALLING)
            setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
            build()
        })
        setAcceptsDelayedFocusGain(true)
        setOnAudioFocusChangeListener(audioFocusChangeListener)
        build()
      }
    } else {
      null
    }

  private val logger = ConsoleLogger(LogLevel.DEBUG)

  private val webRtcPermissionPermission = arrayOf(
    Manifest.permission.MODIFY_AUDIO_SETTINGS,
    Manifest.permission.RECORD_AUDIO,
    Manifest.permission.CAMERA
  )

  override fun getName(): String {
    return "NativeMobileSDKBridge"
  }

  @ReactMethod
  fun startMeeting(meetingInfo: ReadableMap, attendeeInfo: ReadableMap) {
    logger.info(TAG, "Called startMeeting")

    currentActivity?.let { activity ->
      if (meetingSession != null) {
        meetingSession?.audioVideo?.stop()
        meetingSession = null
      }

      try {
        val sessionConfig = createSessionConfiguration(meetingInfo, attendeeInfo)
        val meetingSession = sessionConfig?.let {
          DefaultMeetingSession(
            sessionConfig,
            logger,
            activity.applicationContext,
            eglCoreFactory
          )
        }

        if (meetingSession != null) {
          NativeMobileSDKBridge.meetingSession = meetingSession

          if (!hasPermissionsAlready()) {
            val permissionAwareActivity = activity as PermissionAwareActivity
            permissionAwareActivity.requestPermissions(webRtcPermissionPermission, WEBRTC_PERMISSION_REQUEST_CODE, this)
            return
          }

          startAudioVideo()
        } else {
          logger.error(TAG, "Failed to create meeting session")
          eventEmitter.sendReactNativeEvent(RN_EVENT_ERROR, "Failed to create meeting session")
        }
      } catch (exception: Exception) {
        logger.error(TAG, "Error starting the meeting session: ${exception.localizedMessage}")
        eventEmitter.sendReactNativeEvent(RN_EVENT_ERROR, "Error starting the meeting session: ${exception.localizedMessage}")
        return
      }
    }
  }

  @ReactMethod
  fun requestAudioFocus(): Boolean {
    audioManager = reactApplicationContext.getSystemService(Context.AUDIO_SERVICE) as? AudioManager
    var res: Int?
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
      audioFocusRequest?.let { res = audioManager?.requestAudioFocus(it) }
    }

    res = audioManager?.requestAudioFocus(
      audioFocusChangeListener,
      AudioManager.STREAM_VOICE_CALL,
      AudioManager.AUDIOFOCUS_GAIN
    )

    return res == AudioManager.AUDIOFOCUS_GAIN
  }

  @ReactMethod
  fun abandonAudioFocus() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
      audioFocusRequest?.let { audioManager?.abandonAudioFocusRequest(it) }
    } else {
      audioManager?.abandonAudioFocus(null)
    }
  }

  private fun hasPermissionsAlready(): Boolean {
    return currentActivity?.let { activity ->
      webRtcPermissionPermission.all {
        ContextCompat.checkSelfPermission(activity, it) == PackageManager.PERMISSION_GRANTED
      }
    } ?: false
  }

  private fun startAudioVideo() {
    meetingSession?.let {
      it.audioVideo.addRealtimeObserver(meetingObservers)
      it.audioVideo.addVideoTileObserver(meetingObservers)
      it.audioVideo.addAudioVideoObserver(meetingObservers)
      it.audioVideo.start()
      it.audioVideo.startRemoteVideo()
    }
  }

  private fun createSessionConfiguration(meetingInfo: ReadableMap, attendeeInfo: ReadableMap): MeetingSessionConfiguration? {
    return try {
      val meetingId = meetingInfo.getString(KEY_MEETING_ID) ?: ""
      val externalMeetingId = meetingInfo.getString(KEY_EXTERNAL_MEETING_ID) ?: ""
      val attendeeId = attendeeInfo.getString(KEY_ATTENDEE_ID) ?: ""
      val joinToken = attendeeInfo.getString(KEY_JOIN_TOKEN) ?: ""
      val externalUserId = attendeeInfo.getString(KEY_EXTERNAL_ID) ?: ""
      var audioFallbackUrl = ""
      var audioHostUrl = ""
      var turnControlUrl = ""
      var signalingUrl = ""

      meetingInfo.getMap(KEY_MEDIA_PLACEMENT)?.let {
        logger.info(TAG, it.toString())
        audioFallbackUrl = it.getString(KEY_AUDIO_FALLBACK_URL) ?: ""
        audioHostUrl = it.getString(KEY_AUDIO_HOST_URL) ?: ""
        turnControlUrl = it.getString(KEY_TURN_CONTROL_URL) ?: ""
        signalingUrl = it.getString(KEY_SIGNALING_URL) ?: ""
      }

      val meetingElement = Meeting(
        externalMeetingId,
        MediaPlacement(audioFallbackUrl, audioHostUrl, signalingUrl, turnControlUrl),
        CHIME_DEFAULT_REGION,
        meetingId
      )
      val attendeeElement = Attendee(attendeeId, externalUserId, joinToken)

      MeetingSessionConfiguration(
        CreateMeetingResponse(meetingElement),
        CreateAttendeeResponse(attendeeElement), ::defaultUrlRewriter
      )
    } catch (exception: Exception) {
      logger.error(TAG, "Error creating session configuration: ${exception.localizedMessage}")
      eventEmitter.sendReactNativeEvent(RN_EVENT_ERROR, "Error creating session configuration: ${exception.localizedMessage}")
      null
    }
  }

  @ReactMethod
  fun stopMeeting() {
    logger.info(TAG, "Called stopMeeting")

    meetingSession?.audioVideo?.let {
      it.removeRealtimeObserver(meetingObservers)
      it.removeVideoTileObserver(meetingObservers)
      it.removeAudioVideoObserver(meetingObservers)
      it.stop();
      it.stopRemoteVideo();
    }
    eventEmitter.sendReactNativeEvent(RN_EVENT_MEETING_END, null)
  }

  @ReactMethod
  fun setMute(isMute: Boolean) {
    logger.info(TAG, "Called setMute: $isMute")

    if (isMute) {
      meetingSession?.audioVideo?.realtimeLocalMute()
    } else {
      meetingSession?.audioVideo?.realtimeLocalUnmute()
    }
  }

  @ReactMethod
  fun setCameraOn(enabled: Boolean) {
    logger.info(TAG, "Called setCameraOn: $enabled")

    if (enabled) {
      meetingSession?.audioVideo?.startLocalVideo()
    } else {
      meetingSession?.audioVideo?.stopLocalVideo()
    }
  }

  @ReactMethod
  fun bindVideoView(viewIdentifier: Int, tileId: Int) {
    logger.info(TAG, "Called bindVideoView for tileId: $tileId with identifier: $viewIdentifier")
  }

  @ReactMethod
  fun unbindVideoView(tileId: Int) {
    logger.info(TAG, "Called unbindVideoView for tileId: $tileId")

    meetingSession?.run {
      audioVideo.unbindVideoView(tileId)
    }
  }

  override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>?, grantResults: IntArray?): Boolean {
    return when (requestCode) {
        WEBRTC_PERMISSION_REQUEST_CODE -> {
            val isMissingPermission: Boolean =
              grantResults?.isEmpty() ?: false || grantResults?.any { PackageManager.PERMISSION_GRANTED != it } ?: false

            if (isMissingPermission) {
                eventEmitter.sendReactNativeEvent(RN_EVENT_ERROR, "Unable to start meeting as permissions are not granted")
                false
            } else {
                startAudioVideo()
                true
            }
        }
      else -> false
    }
  }
}

RNVideoViewManager.kt

package vn.edu.dora.app.modules.chime.v2;

import com.amazonaws.services.chime.sdk.meetings.audiovideo.video.DefaultVideoRenderView
import com.amazonaws.services.chime.sdk.meetings.utils.logger.ConsoleLogger
import com.amazonaws.services.chime.sdk.meetings.utils.logger.LogLevel
import com.facebook.react.uimanager.SimpleViewManager
import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.uimanager.annotations.ReactProp

class RNVideoViewManager : SimpleViewManager<DefaultVideoRenderView>() {
  private val logger = ConsoleLogger(LogLevel.DEBUG)

  companion object {
    private const val REACT_CLASS = "RNVideoView"
    private const val TAG = "RNVideoViewManager"
  }

  override fun getName(): String {
    return REACT_CLASS
  }

  override fun createViewInstance(reactContext: ThemedReactContext): DefaultVideoRenderView {
    logger.info(TAG, "Creating view instance")
    return DefaultVideoRenderView(reactContext)
  }

  @ReactProp(name = "tileId")
  fun setTileId(renderView: DefaultVideoRenderView, tileId: Int) {
    logger.info(TAG, "Setting tileId: $tileId")
    NativeMobileSDKBridge.meetingSession?.run {
      audioVideo.bindVideoView(renderView, tileId)
    }
  }
}

Expected behavior
App does not crash, or at least give me a more meaningful crash log.

Logs

03-03 15:59:58.339  1008  1111 E storaged: getDiskStats failed with result NOT_SUPPORTED and size 0
03-03 15:59:58.861 21173 21253 E libc    : Access denied finding property "vendor.camera.aux.packagelist"
03-03 15:59:58.861 21173 21253 E libc    : Access denied finding property "vendor.camera.aux.packagelist"
03-03 15:59:58.861 21173 21253 E libc    : Access denied finding property "vendor.camera.aux.packagelist"
03-03 15:59:58.861 21173 21253 E libc    : Access denied finding property "vendor.camera.aux.packagelist"
03-03 15:59:58.861 21173 21187 E libc    : Access denied finding property "vendor.camera.aux.packagelist"
03-03 15:59:58.862 21173 21187 E libc    : Access denied finding property "vendor.camera.aux.packagelist"
03-03 15:59:58.862 21173 21187 E libc    : Access denied finding property "vendor.camera.aux.packagelist"
03-03 15:59:59.123   728 12724 E soundtrigger: audio_extn_sound_trigger_update_stream_status: invalid input device 0x0, for event 2
03-03 15:59:59.127   728 12724 E soundtrigger: audio_extn_sound_trigger_update_stream_status: invalid input device 0x0, for event 3
03-03 15:59:59.130   728 12724 E ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
03-03 15:59:59.130   728 12724 E ACDB-LOADER: Error: ACDB AFE returned = -19
03-03 15:59:59.230   728 12724 E qcreverb: 	[vendor/qcom/proprietary/mm-audio-noship/audio-effects/safx/android-adapter/qcreverb/qcreverb.c:474] Assertion fail: pConfig->inputCfg.format == AUDIO_FORMAT_PCM_16_BIT
03-03 15:59:59.231   728 12724 E qcreverb: 	[vendor/qcom/proprietary/mm-audio-noship/audio-effects/safx/android-adapter/qcreverb/qcreverb.c:474] Assertion fail: pConfig->inputCfg.format == AUDIO_FORMAT_PCM_16_BIT
03-03 15:59:59.245   728 12724 E audio_hw_primary: adev_open_output_stream: Primary output is already opened
03-03 15:59:59.258 21173 21443 E videoclient_jni: video client DNS: dns1 2402:800:20ff:6666::1, dns2 2402:800:20ff:8888::1
03-03 15:59:59.270 21173 21443 E videoclient_jni: video client DNS: dns1 2402:800:20ff:6666::1, dns2 2402:800:20ff:8888::1
03-03 15:59:59.300   728  2553 E msm8916_platform: platform_check_backends_match: Invalid snd_device =
03-03 15:59:59.300   728  2553 E soundtrigger: audio_extn_sound_trigger_update_stream_status: invalid input device 0x0, for event 3
03-03 15:59:59.302   728  2553 E ACDB-LOADER: Error: ACDB AudProc vol returned = -19
03-03 15:59:59.302   728  2553 E ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
03-03 15:59:59.302   728  2553 E ACDB-LOADER: Error: ACDB AFE returned = -19
03-03 15:59:59.336   728 21458 E ACDB-LOADER: Error: ACDB AudProc vol returned = -19
03-03 15:59:59.336   728 21458 E ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
03-03 15:59:59.336   728 21458 E ACDB-LOADER: Error: ACDB AFE returned = -19
03-03 15:59:59.436   728  1186 E ACDB-LOADER: Error: ACDB AudProc vol returned = -19
03-03 16:00:01.030 21173 21454 E DefaultAudioClientObserver: audio client/auth: Auth read timeout
03-03 16:00:01.090 21173 21253 E vn.edu.dora.ap: Trace stop requested, but no trace currently running
03-03 16:00:01.107 21173 21253 E vn.edu.dora.ap: Trace stop requested, but no trace currently running
03-03 16:00:01.125 21173 21253 E vn.edu.dora.ap: Trace stop requested, but no trace currently running
03-03 16:00:01.222 21173 21445 E libc++abi: terminating with uncaught exception of type std::bad_cast: std::bad_cast
03-03 16:00:01.793 21464 21464 E libc    : Access denied finding property "ro.vendor.at_library"
03-03 16:00:01.971   758  4028 E LocSvc_libulp: ulp_brain_transition_all_providers, no QUIPC/GNSS transition logic run due to both engines are OFF
03-03 16:00:04.048 21474 21474 E libc    : Access denied finding property "ro.vendor.at_library"
03-03 16:00:04.247 21173 21445 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 21445 (Thread-191 - 21), pid 21173 (vn.edu.dora.app)
03-03 16:00:04.520 21486 21486 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-03 16:00:04.521 21486 21486 F DEBUG   : Build fingerprint: 'Nokia/Dragon_00CN/DRG:9/PPR1.180610.011/00CN_3_47I:user/release-keys'
03-03 16:00:04.521 21486 21486 F DEBUG   : Revision: '0'
03-03 16:00:04.521 21486 21486 F DEBUG   : ABI: 'arm64'
03-03 16:00:04.521 21486 21486 F DEBUG   : pid: 21173, tid: 21445, name: Thread-191 - 21  >>> vn.edu.dora.app <<<
03-03 16:00:04.521 21486 21486 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
03-03 16:00:04.521 21486 21486 F DEBUG   : Abort message: 'terminating with uncaught exception of type std::bad_cast: std::bad_cast'
03-03 16:00:04.521 21486 21486 F DEBUG   :     x0  0000000000000000  x1  00000000000053c5  x2  0000000000000006  x3  0000000000000008
03-03 16:00:04.521 21486 21486 F DEBUG   :     x4  fefefefefefefeff  x5  fefefefefefefeff  x6  fefefefefefefeff  x7  7f7f7f7f7f7f7f7f
03-03 16:00:04.521 21486 21486 F DEBUG   :     x8  0000000000000083  x9  e98194df79a041ff  x10 0000000000000000  x11 fffffffc7ffffbdf
03-03 16:00:04.521 21486 21486 F DEBUG   :     x12 0000000000000001  x13 00000000603f5011  x14 000cc29568125e25  x15 000085bbd6ff24e4
03-03 16:00:04.521 21486 21486 F DEBUG   :     x16 00000072c98712c8  x17 00000072c97af0d0  x18 0000000000000001  x19 00000000000052b5
03-03 16:00:04.521 21486 21486 F DEBUG   :     x20 00000000000053c5  x21 0000007214afe118  x22 ffffff80ffffffc8  x23 0000007214afe1d0
03-03 16:00:04.521 21486 21486 F DEBUG   :     x24 0000007214afe0b0  x25 0000007214afe0f0  x26 0000007205125890  x27 000000720d3cc228
03-03 16:00:04.521 21486 21486 F DEBUG   :     x28 0000000000000000  x29 0000007214afe020
03-03 16:00:04.521 21486 21486 F DEBUG   :     sp  0000007214afdfe0  lr  00000072c97a3bfc  pc  00000072c97a3c24
03-03 16:00:04.525 21486 21486 F DEBUG   :
03-03 16:00:04.525 21486 21486 F DEBUG   : backtrace:
03-03 16:00:04.525 21486 21486 F DEBUG   :     #00 pc 0000000000021c24  /system/lib64/libc.so (abort+116)
03-03 16:00:04.525 21486 21486 F DEBUG   :     #01 pc 00000000000bb268  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libfbjni.so
03-03 16:00:04.525 21486 21486 F DEBUG   :     #02 pc 00000000000a45a4  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libfbjni.so
03-03 16:00:04.525 21486 21486 F DEBUG   :     #03 pc 00000000000b83fc  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libfbjni.so
03-03 16:00:04.525 21486 21486 F DEBUG   :     #04 pc 00000000000b7b00  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libfbjni.so
03-03 16:00:04.525 21486 21486 F DEBUG   :     #05 pc 00000000000b7a80  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libfbjni.so (__cxa_throw+120)
03-03 16:00:04.526 21486 21486 F DEBUG   :     #06 pc 0000000000068b94  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libc++_shared.so (std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const+212)
03-03 16:00:04.526 21486 21486 F DEBUG   :     #07 pc 0000000000433b5c  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #08 pc 0000000000433acc  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #09 pc 0000000000432dec  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #10 pc 0000000000444dc8  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #11 pc 0000000000444d7c  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #12 pc 000000000043aae8  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #13 pc 0000000000430434  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #14 pc 000000000042e7e8  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #15 pc 000000000042f830  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #16 pc 00000000001024e0  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #17 pc 00000000000fa870  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #18 pc 0000000000106784  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #19 pc 00000000003cec0c  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #20 pc 00000000003ce968  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #21 pc 00000000001cf788  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #22 pc 00000000001d03d4  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #23 pc 000000000015737c  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #24 pc 0000000000214990  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #25 pc 000000000021387c  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #26 pc 0000000000212fc8  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #27 pc 0000000000211f34  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #28 pc 0000000000213484  /data/app/vn.edu.dora.app-PSO5WbPN7uaOde4jYRGh0A==/lib/arm64/libamazon_chime_media_client.so
03-03 16:00:04.526 21486 21486 F DEBUG   :     #29 pc 0000000000081938  /system/lib64/libc.so (__pthread_start(void*)+36)
03-03 16:00:04.526 21486 21486 F DEBUG   :     #30 pc 0000000000023478  /system/lib64/libc.so (__start_thread+68)
03-03 16:00:05.538 21173 21173 E         : getParent() returning Null
03-03 16:00:06.078  1098  1098 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_00
03-03 16:00:06.118   780   780 E lowmemorykiller: Error writing /proc/21173/oom_score_adj; errno=2

Test environment Info:

  • Device: Nokia X6, Pixel 3, basically every Android devices.
  • OS: Android 6+
  • Version amazon-chime-sdk: 0.11.1
  • Version amazon-chime-sdk-media: 0.11.1

Additional context
It works with SDK ver 0.7.6 and below. Not sure what happened.

@Doko-Demo-Doa
Copy link
Author

Doko-Demo-Doa commented Mar 3, 2021

More info: In the observer, video events seem to stop at:

  override fun onVideoSessionStarted(sessionStatus: MeetingSessionStatus) {
    logger.info(TAG, "Video session started")
  }

and no further.

@dylonChime
Copy link
Contributor

Thanks for your patience @Doko-Demo-Doa. We are looking into this issue.

@alnlau
Copy link
Contributor

alnlau commented Mar 11, 2021

Hello @Doko-Demo-Doa ,

If you are able to reproduce the crash reliably, could you share more logs of the crash? We are trying to determine if the crash is at the same place but cannot reproduce the crash.

@alnlau alnlau added Needs More Information Further information is requested and removed needs investigation labels Mar 11, 2021
@deepesh-kn
Copy link

Facing the same issue. Crashes every time when startRemoteVideo is called.
@dylonChime @alnlau, could it be possible to update the demo repository with the latest SDKs
https://github.com/aws-samples/amazon-chime-react-native-demo

@Doko-Demo-Doa
Copy link
Author

Doko-Demo-Doa commented Mar 24, 2021

@alnlau I think it can be reproducible with React Native demo. Android side is enough. Above log is what I got from the very start of joining call process.

@Doko-Demo-Doa
Copy link
Author

Okay I think I figured out something else: I'm using CometChat (which also includes a video call module, but I don't use it). CometChat video call module is based on Jitsi, and Jitsi also has native compiled binary, which may conflict with Chime's.

I'm still investigating.

@e-nouri
Copy link

e-nouri commented Mar 30, 2021

I have the same problem, with the last SDK version 0.11.1:
libc++abi: terminating with uncaught exception of type std::bad_cast: std::bad_cast

@hokyungh
Copy link
Contributor

@e-nouri and @Doko-Demo-Doa what React-Native version do you use? I am trying to find out if this is related to issue in facebook/react-native#29377

@Doko-Demo-Doa
Copy link
Author

I met the problem with 0.63.x and even 0.64.x . Same problem.

@hokyungh
Copy link
Contributor

hokyungh commented Mar 31, 2021

@Doko-Demo-Doa do you also meet issue with 0.61.x? Also could you clean project before running

@Doko-Demo-Doa
Copy link
Author

I haven't tried it with 0.61.x, but downgrading RN should not be the solution.

@Doko-Demo-Doa
Copy link
Author

@hokyungh Alright, I did the test. It does not crash with 0.61.x at all, and always crash with 0.62.x and above.

@zhinang-amazon zhinang-amazon removed the Needs More Information Further information is requested label Apr 7, 2021
@Doko-Demo-Doa
Copy link
Author

Is there any update on this one?

@e-nouri
Copy link

e-nouri commented Apr 17, 2021

@hokyungh Sorry for the late answer. Right now 0.63, on iOS I have the last Chime version for SDK and media SDK. On Android, I downgraded to 0.9.1 for the SDK, 0.9.0 for the Media SDK. I am not using the video though only audio in my case.

@Doko-Demo-Doa
Copy link
Author

After upgrading another library (comet-chat) to new version, the app doesn't crash anymore (with Chime SDK on latest version - 0.11.4 as of now). I guess it's just a conflict between libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash There is a crash
Projects
None yet
Development

No branches or pull requests

7 participants