AgoraIO-Extensions / Agora-Flutter-SDK

Flutter plugin of Agora RTC SDK for Android/iOS/macOS/Windows

Home Page:https://pub.dev/packages/agora_rtc_engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RtcEngine enableVideo function causes IllegalStateException(sending message to a Handler on a dead thread) on Android

Ilgz opened this issue · comments

My logs
W/MessageQueue( 4240): java.lang.IllegalStateException: Handler (android.os.Handler) {e6d39c5} sending message to a Handler on a dead thread
W/MessageQueue( 4240): at android.os.MessageQueue.enqueueMessage(MessageQueue.java:563)
W/MessageQueue( 4240): at android.os.Handler.enqueueMessage(Handler.java:778)
W/MessageQueue( 4240): at android.os.Handler.sendMessageAtTime(Handler.java:727)
W/MessageQueue( 4240): at android.os.Handler.sendMessageDelayed(Handler.java:697)
W/MessageQueue( 4240): at android.os.Handler.post(Handler.java:427)
W/MessageQueue( 4240): at android.hardware.camera2.impl.CameraDeviceImpl$CameraHandlerExecutor.execute(CameraDeviceImpl.java:2252)
W/MessageQueue( 4240): at android.hardware.camera2.impl.CallbackProxies$SessionStateCallbackProxy.onClosed(CallbackProxies.java:104)
W/MessageQueue( 4240): at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:588)
W/MessageQueue( 4240): at android.hardware.camera2.impl.CameraCaptureSessionImpl.finalize(CameraCaptureSessionImpl.java:879)
W/MessageQueue( 4240): at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291)
W/MessageQueue( 4240): at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278)
W/MessageQueue( 4240): at java.lang.Daemons$Daemon.run(Daemons.java:139)
W/MessageQueue( 4240): at java.lang.Thread.run(Thread.java:923)

To Reproduce
Steps to reproduce the behavior:

  1. Copy code await engine.initialize( RtcEngineContext( appId: appIdAgora, audioScenario: AudioScenarioType.audioScenarioChatroom, ), ); await engine.enableVideo(); await engine.joinChannel( token: token, channelId: channel!, uid: 0, options: const ChannelMediaOptions( clientRoleType: ClientRoleType.clientRoleBroadcaster, channelProfile: ChannelProfileType.channelProfileCommunication, ), );
  2. Run
  3. See an exception in logs

My device
Xiaomi redmi note 8. Android version: 11

I'm so sorry that we are on holiday until 02/17, it's better to raise a new ticket to Agora Support if you face an urgent issue.

Ok, i'll wait for you

May I ask if is there a crash or other issues for your case, it is most likely the log is not related to our SDK.

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.