aws / aws/amazon-chime-sdk-android

Crash when attempting to start video after accepting permissions

Open
#703 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
113
Forks
60
Avg merge
40m
Merged PRs (30d)
2

Description

**Describe the bug**
When attempting to start video, the user accepts permissions for "Record video", and Audio, the Chime SDK throws a crash right after. The crash seems to be intermittent

**Logs**

```
FATAL EXCEPTION: DefaultCameraCaptureSource
java.lang.NullPointerException: Surface must not be null
at com.android.internal.util.Preconditions.checkNotNull(Preconditions.java:174)
at android.hardware.camera2.params.OutputConfiguration.(OutputConfiguration.java:675)
at android.hardware.camera2.params.OutputConfiguration.(OutputConfiguration.java:354)
at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession(CameraDeviceImpl.java:756)
at com.amazonaws.services.chime.sdk.meetings.audiovideo.video.capture.DefaultCameraCaptureSource$cameraDeviceStateCallback$1.onOpened(DefaultCameraCaptureSource.kt:310)
at android.hardware.camera2.impl.CameraDeviceImpl$ClientStateCallback$4.run(CameraDeviceImpl.java:386)
at android.os.Handler.handleCallback(Handler.java:995)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:273)
at android.os.Looper.loop(Looper.java:363)
at android.os.HandlerThread.run(HandlerThread.java:85)
```

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Test environment Info (please complete the following information):**
- Device: Samsung s21
- OS: Android 16
- Version amazon-chime-sdk: 0.25.2
- Version amazon-chime-sdk-media: 0.25.2
- Can you reproduce this in the demo app? N/A
**If you are reporting a crash:**
- How often is this crash occurring? 25-50 percent of the time
- Are there metrics on CPU or memory use at the time of the crash? No
- Please provide full crash logs.

**Additional context**
Add any other context about the problem here.

*Note: GitHub issues are not a substitute for customer support. Please open a support case if the issue is important to you.*
https://docs.aws.amazon.com/awssupport/latest/user/case-management.html

Contributor guide

Open the contributing guide

Research direction

Start with DefaultCameraCaptureSource.kt at the cameraDeviceStateCallback onOpened path around line 310, where the crash occurs while creating the capture session. Reproduce video startup after accepting camera and audio permissions on a Samsung S21 running Android 16 with SDK version 0.25.2. Done means the intermittent Surface-null crash no longer occurs during video startup.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
audio-video-rtc, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.