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

App crashes when host end meeting for all attendees #270

Closed
k-zahid opened this issue Apr 11, 2021 · 15 comments
Closed

App crashes when host end meeting for all attendees #270

k-zahid opened this issue Apr 11, 2021 · 15 comments
Labels
crash There is a crash

Comments

@k-zahid
Copy link

k-zahid commented Apr 11, 2021

Describe the bug
When host leave the meeting and then attendee tries to leave meeting the application crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Create a meeting and invite another user
  2. Join the meeting with both users
  3. leave the meeting as host
  4. try to leave the meeting

Expected behavior
The application should not crash and leave meeting properly.

Logs
Fatal Exception: java.lang.IllegalStateException: release() called on an object with refcount < 1
at com.amazonaws.services.chime.sdk.meetings.utils.RefCountDelegate.release(RefCountDelegate.kt:20)
at com.amazonaws.services.chime.sdk.meetings.audiovideo.video.gl.DefaultEglCoreFactory.onEglCoreReleased(DefaultEglCoreFactory.kt:37)
at com.amazonaws.services.chime.sdk.meetings.audiovideo.video.gl.DefaultEglCoreFactory.access$onEglCoreReleased(DefaultEglCoreFactory.kt:16)
at com.amazonaws.services.chime.sdk.meetings.audiovideo.video.gl.DefaultEglCoreFactory$createEglCore$$inlined$synchronized$lambda$2.run(DefaultEglCoreFactory.kt:32)
at com.amazonaws.services.chime.sdk.meetings.audiovideo.video.gl.DefaultEglCore.release(DefaultEglCore.kt:79)
at com.amazonaws.services.chime.sdk.meetings.internal.video.DefaultVideoClientController$stopAndDestroy$1.invokeSuspend(DefaultVideoClientController.kt:88)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

@dylonChime
Copy link
Contributor

Hi @k-zahid, can you please provide the following information?:

  • Device: [e.g. Pixel3]
  • OS: [e.g. Android 10]
  • Version amazon-chime-sdk: [e.g. 0.4.0]
  • Version amazon-chime-sdk-media: [e.g. 0.4.0]
  • Did you use Bitcode enabled sdk binaries?
  • Full stack trace so we can symbolicate on our end

@dylonChime dylonChime added the Needs More Information Further information is requested label Apr 12, 2021
@k-zahid
Copy link
Author

k-zahid commented Apr 12, 2021

@dylonChime

  • Device : Samsung A51
  • OS : Android 10
  • Version amazon-chime-sdk: [0.11.2]
  • Version amazon-chime-sdk-media: [0.11.2]
  • Did you use Bitcode enabled sdk binaries? No
  • Full stack trace so we can symbolicate on our end : The stack trace attached is the bug is received via crashlytics

@dylonChime
Copy link
Contributor

@k-zahid

I assume you are not using our demo since the demo doesn't support ending a meeting for all.

Are you calling audioVideo.stop() multiple times? I will try that with our demo and see if I get a crash.

@dylonChime
Copy link
Contributor

dylonChime commented Apr 13, 2021

@k-zahid, I'm not able to reproduce the crash. Can you provide more specific details about how your application differs from the demo? Are you calling stop from a different thread? Are there any modifications you've made to the SDK?

@k-zahid k-zahid closed this as completed Apr 14, 2021
@k-zahid k-zahid reopened this Apr 14, 2021
@k-zahid
Copy link
Author

k-zahid commented Apr 14, 2021

@dylonChime the crash happens when the host end the meeting for all and the invitee remains in the meeting. The invitee tries to leave the meeting which is already ended by the host.

@ziyiz-amzn
Copy link
Contributor

ziyiz-amzn commented Apr 22, 2021

Hi @k-zahid

We still cannot reproduce this crash in the demo app.

What I have observed during reproduce:
In our demo app, when a user ends the meeting for all on the web demo app, the mobile demo app will:

  1. receive the call back onAudioSessionStopped after 30 seconds and quit the meeting.
  2. or the attendee is still able to tap the red hung up button and it will quit the meeting and back to joining view.

I have never observed a crash during tens of trials.

@k-zahid
Copy link
Author

k-zahid commented Apr 27, 2021

@ziyiz-amzn the issue seems in the reason of delay of 30 seconds. Can't the callback done immediately?

@ziyiz-amzn
Copy link
Contributor

@k-zahid Not for now, it has been in our enhancement backlog.
#15

@alnlau alnlau added crash There is a crash feature-request New feature or request and removed Needs More Information Further information is requested labels Jul 14, 2021
@chetangodiya-simformsolutions

Same issue happening for me also

@MohdIrfan12
Copy link

Cannot understand how a crash becomes a feature request

@hokyungh
Copy link
Contributor

Hi @chetangodiya-simformsolutions do you see a crash issue or delay issue?

@MohdIrfan12 I think our team added feature request for immediate callback on meetingEnded.

@zhinang-amazon
Copy link
Contributor

Removing the feature request label since there is already a separate issue to track the feature request. We will use this one to track the crash

@zhinang-amazon zhinang-amazon removed the feature-request New feature or request label Jun 7, 2022
@dingyishen-amazon
Copy link
Contributor

Hi, I think the reason is calling release() twice.
Tried to call eglCore?.release() twice., then got the same error:

E/AndroidRuntime: FATAL EXCEPTION: DemoCpuVideoProcessor
    Process: com.amazonaws.services.chime.sdkdemo, PID: 23367
    java.lang.IllegalStateException: release() called on an object with refcount < 1
        at com.amazonaws.services.chime.sdk.meetings.utils.RefCountDelegate.release(RefCountDelegate.kt:20)
        at com.amazonaws.services.chime.sdk.meetings.audiovideo.video.gl.DefaultEglCoreFactory.onEglCoreReleased(DefaultEglCoreFactory.kt:37)
        at com.amazonaws.services.chime.sdk.meetings.audiovideo.video.gl.DefaultEglCoreFactory.access$onEglCoreReleased(DefaultEglCoreFactory.kt:16)
        at com.amazonaws.services.chime.sdk.meetings.audiovideo.video.gl.DefaultEglCoreFactory$createEglCore$$inlined$synchronized$lambda$2.run(DefaultEglCoreFactory.kt:32)
        at com.amazonaws.services.chime.sdk.meetings.audiovideo.video.gl.DefaultEglCore.release(DefaultEglCore.kt:80)
        at com.amazonaws.services.chime.sdkdemo.utils.CpuVideoProcessor$release$1.run(CpuVideoProcessor.kt:145)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.os.HandlerThread.run(HandlerThread.java:67)

@dingyishen-amazon
Copy link
Contributor

The advice we could give is to find where you called DefaultVideoClientController.stopAndDestroy() twice.

@dingyishen-amazon
Copy link
Contributor

Close this issue for now, feel free to reopen if validating the suggestion not work.

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

9 participants