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

Flutter app crashes on Samsung devices (S20, S21, S22) with Agora RTC Engine #1786

Closed
1 of 5 tasks
azazadev opened this issue May 24, 2024 · 3 comments
Closed
1 of 5 tasks

Comments

@azazadev
Copy link

azazadev commented May 24, 2024

Version of the agora_rtc_engine

6.3.0

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows
  • Web

Steps to reproduce

run on Android Samsung S20, S21, S22 ...

Expected results

no crash

Actual results

We are experiencing crashes in our Flutter application when using the Agora RTC Engine on specific Samsung devices (S20, S21, S22) running Android 13. This issue does not occur on other devices such as iPhones and Huawei P Smart Z. Below are the details of the crash logs from Google Play Console:

Stack trace 1
Sample attributes:

    samsung x1s (Galaxy S20 5G)

Android 13 (SDK 33)

    Version: 254 (2.0.54)Occurred: 3 hours ago

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 21500 >>> com.xxx.yyy <<<

backtrace:
  #00  pc 0x000000000004d854  /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy+292)
  #01  pc 0x000000000001a784  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libiris_method_channel.so (DartMessageHandler::Post(EventParam*)+228) (BuildId: 7c9a1516ca21c97b072eea6a01889c37db7a878a)
  #02  pc 0x000000000001aca4  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libiris_method_channel.so (DartMessageHandlerManager::Post(EventParam*)+68) (BuildId: 7c9a1516ca21c97b072eea6a01889c37db7a878a)
  #03  pc 0x000000000029fe00  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libAgoraRtcWrapper.so (agora::iris::rtc::IVideoFrameObserverWrapper::onCaptureVideoFrame(agora::rtc::VIDEO_SOURCE_TYPE, agora::media::base::VideoFrame&)+224) (BuildId: def50262337bdb0bb65f7bc4ab73697f7eabc7c3)
  #04  pc 0x0000000001311910  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libagora-rtc-sdk.so (BuildId: c34dc83d49babb1fa4fcbd4463b9804fd8025c05)
  #05  pc 0x0000000001312880  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libagora-rtc-sdk.so (BuildId: c34dc83d49babb1fa4fcbd4463b9804fd8025c05)
  #06  pc 0x0000000000c53464  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libagora-rtc-sdk.so (BuildId: c34dc83d49babb1fa4fcbd4463b9804fd8025c05)
  #07  pc 0x00000000000219f4  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libaosl.so (BuildId: 5285960aef86b1f9ce45c5340affdc182d1991a2)
  #08  pc 0x00000000000225c8  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libaosl.so (BuildId: 5285960aef86b1f9ce45c5340affdc182d1991a2)
  #09  pc 0x000000000001a3b8  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libaosl.so (BuildId: 5285960aef86b1f9ce45c5340affdc182d1991a2)
  #10  pc 0x000000000001d05c  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libaosl.so (BuildId: 5285960aef86b1f9ce45c5340affdc182d1991a2)
  #11  pc 0x000000000001b9cc  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libaosl.so (BuildId: 5285960aef86b1f9ce45c5340affdc182d1991a2)
  #12  pc 0x000000000001b614  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libaosl.so (BuildId: 5285960aef86b1f9ce45c5340affdc182d1991a2)
  #13  pc 0x000000000001a60c  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libaosl.so (BuildId: 5285960aef86b1f9ce45c5340affdc182d1991a2)
  #14  pc 0x000000000002c460  /data/app/~~6FwoGSsEKpXfAoUW9vozJw==/com.xxx.yyy-tHXV9yMbeOlnvkyfJw5YLQ==/split_config.arm64_v8a.apk!libaosl.so (BuildId: 5285960aef86b1f9ce45c5340affdc182d1991a2)
  #15  pc 0x00000000000b67a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)
  #16  pc 0x000000000005340c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)






Additional Information:

We are using agora_rtc_engine version 6.3.0.
This issue might be related to GitHub Issue #1659.
The crash does not occur on other devices such as iPhone and Huawei P Smart Z.

Code sample


<details open><summary>Code sample</summary>

  void initAgora() async {
    WakelockPlus.enable();
    _engine = createAgoraRtcEngine();
    await _engine.initialize(const RtcEngineContext(
      appId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
      channelProfile: ChannelProfileType.channelProfileCloudGaming,
    ));
    VideoFrameObserver videoFrameObserver = VideoFrameObserver(
        onCaptureVideoFrame: (VideoSourceType sourceType, VideoFrame videoFrame) async {
          _imageIndex++;
          // my domain
        },
        onRenderVideoFrame: (String channelId, int remoteUid, VideoFrame videoFrame) {});
    _engine.getMediaEngine().registerVideoFrameObserver(videoFrameObserver);
    _engine.registerEventHandler(RtcEngineEventHandler(
      onExtensionError: (String provider, String extName, int error, String msg) {
        log('[onExtensionErrored] provider: $provider, extName: $extName, error: $error, msg: $msg');
      },
      onExtensionStarted: (String provider, String extName) {
        log('[onExtensionStarted] provider: $provider, extName: $extName');
      },
      onExtensionEvent: (String provider, String extName, String key, String value) {
        log('[onExtensionEvent] provider: $provider, extName: $extName');
      },
      onExtensionStopped: (String provider, String extName) {
        log('[onExtensionStopped] provider: $provider, extName: $extName');
      },
      onFirstLocalVideoFrame: (VideoSourceType source, int width, int height, int elapsed) {
        setState(() {
          _enableVirtualBackground();
          _engine.setBeautyEffectOptions(
            enabled: _filterEnable,
            options: BeautyOptions(
              lighteningContrastLevel: _selectedLighteningContrastLevel,
              lighteningLevel: 1,
              smoothnessLevel: 1,
              rednessLevel: 1,
              sharpnessLevel: 1,
            ),
          );
        });
      },
    ));

    await _engine.enableExtension(provider: "agora_video_filters_clear_vision", extension: "clear_vision");
    await _engine.enableVideo();
  }

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.0, on macOS 14.4.1 23E224 darwin-arm64, locale en-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] Android Studio (version 4.0)
[✓] Android Studio (version 2021.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.1)
[✓] VS Code (version 1.89.0)
[✓] Connected device (6 available)
[✓] Network resources

• No issues found!

@littleGnAl
Copy link
Collaborator

I can't find the same device as the one you provided (Samsung S2x Android 13). I found a Samsung S23 Android 14 but couldn't reproduce your problem. I remember that the Android native SDK fixed a problem with the video frame uStride/vStride error in the onCaptureVideoFrame callback. I'm not sure if it is related to this but I think you can try to upgrade to 6.3.1 to see if it works or not.

@littleGnAl littleGnAl added waiting for customer response waiting for customer response, or closed by no-reponse bot labels May 27, 2024
@azazadev
Copy link
Author

The issue has been resolved after upgrading to the latest package version. It is likely due to updates in the Android native SDK. The app is now working fine on Samsung Galaxy S20, S21, and S22. We are closing this ticket

@github-actions github-actions bot removed the waiting for customer response waiting for customer response, or closed by no-reponse bot label May 28, 2024
Copy link
Contributor

github-actions bot commented Jun 4, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants