aws-samples / amazon-ivs-broadcast-android-sample

MIT No Attribution
9 stars 8 forks source link

SDK crashed with one of our users #25

Open qwaskhaled opened 2 years ago

qwaskhaled commented 2 years ago

Fatal Exception: com.amazonaws.ivs.broadcast.BroadcastException [ERR] [SurfaceSource] ERROR (0): Failed to get preview view com.amazonaws.ivs.broadcast.SurfaceSource.getPreviewView (SurfaceSource.java:65) com.xxx.ui.broadcasting.BroadcastingViewModel.displayCameraOutput (BroadcastingViewModel.kt:393) com.xxx.ui.broadcasting.BroadcastingViewModel.createSession$lambda-5 (BroadcastingViewModel.kt:190)

Why doesn't return preview view?

qwaskhaled commented 2 years ago

The device of the user is Y3II with Android 5.1

caleighm commented 2 years ago

Hi @qwaskhaled , do you know if your user experiences this crash repeatedly? That is, do they ever successfully get the image preview (without a crash)? Also, if you have access to the logs, can you check if an error log like this shows up: Shader compilation failed

We are aware of one device type (also on Android 5.1) that has a non-standard OpenGL implementation, which causes the shaders to fail to compile. When that happens, previews can't be rendered (and in fact you would not be able to broadcast at all). It's possible that this Y3II on Android 5.1 has the same issue. At this time we do not have a workaround for this; however, you can catch the BroadcastException to make this a better user experience and avoid the crash.

However, if the user is sometimes able to successfully get the image preview, then that means the above explanation is not the problem. If so, we will need additional logs to debug this. To help investigate this further, could you also please reach out to AWS Support (https://console.aws.amazon.com/support/home) and let them know that you would like escalate this behavior to the IVS Mobile Broadcast team? That way you can provide us with logs privately and we can ask more questions about your application outside of this public forum.