Skip to content

EXC_BAD_ACCESS: Missing debug symbols #2265

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

Open
1 of 5 tasks
Zazo032 opened this issue Apr 15, 2025 · 12 comments
Open
1 of 5 tasks

EXC_BAD_ACCESS: Missing debug symbols #2265

Zazo032 opened this issue Apr 15, 2025 · 12 comments
Assignees
Labels
bug Something isn't working crash

Comments

@Zazo032
Copy link

Zazo032 commented Apr 15, 2025

Version of the agora_rtc_engine

6.5.1

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows
  • Web

Steps to reproduce

Happens to a few users when starting screen sharing while in a video call

Expected results

App doesn't crash

Actual results

App crashes, crash log is symbolicated

Code sample

No response

Screenshots or Video

No response

Logs

Logs
OS Version: iOS 18.3.2 (22D82)
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: SEGV_NOOP at 0x000000000000007e
Crashed Thread: 0

Application Specific Information:
Exception 1, Code 1, Subcode 126 >
KERN_INVALID_ADDRESS at 0x7e.

Thread 0 Crashed:
0   libobjc.A.dylib                 0x3116f1ce8         objc_loadWeakRetained
1   agora_rtc_engine                0x100c25964         [inlined] <unknown> + 28
2   agora_rtc_engine                0x100c25964         <unknown> + 28
3   libdispatch.dylib               0x326774244         _dispatch_call_block_and_release
4   libdispatch.dylib               0x326775fa4         _dispatch_client_callout
5   libdispatch.dylib               0x326784a30         _dispatch_main_queue_drain
6   libdispatch.dylib               0x326784648         _dispatch_main_queue_callback_4CF
7   CoreFoundation                  0x316c6fbc8         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
8   CoreFoundation                  0x316c6c1bc         __CFRunLoopRun
9   CoreFoundation                  0x316cbe280         CFRunLoopRunSpecific
10  GraphicsServices                0x3b12654bc         GSEventRunModal
11  UIKitCore                       0x31c02a670         -[UIApplication _run]
12  UIKitCore                       0x31bc50e84         UIApplicationMain
13  UIKitCore                       0x31c38d158         keypath_get_selector_hoverStyle
14  Runner                          0x20078fe64         <redacted>
15  <unknown>                       0x1ba389de8         <redacted>

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.27.4, on macOS 15.4 24E248 darwin-arm64, locale
    en-US)
    • Flutter version 3.27.4 on channel stable at
      /Users/<redacted>/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d8a9f9a52e (2 months ago), 2025-01-31 16:07:18 -0500
    • Engine revision 82bd5b7209
    • Dart version 3.6.2
    • DevTools version 2.40.3

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
    • Android SDK at /Users/<redacted>/Library/Android/sdk
    • Platform android-36, build-tools 36.0.0
    • ANDROID_HOME = /Users/<redacted>/Library/Android/sdk
    • Java binary at:
      /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment Temurin-17.0.14+7 (build
      17.0.14+7)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16E140
    • CocoaPods version 1.16.2

[✓] Android Studio (version 2024.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.5+-13047016-b750.29)

[✓] VS Code (version 1.99.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.108.0

[✓] Connected device (2 available)
    • iPhone (mobile)             • 00008101-001E45441EC0001E • ios    • iOS
      18.4 22E240
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin •
      macOS 15.4 24E248 darwin-arm64

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@Zazo032
Copy link
Author

Zazo032 commented Apr 15, 2025

Image
Debug symbols for agora_rtc_engine are missing on iOS, which could help identify where this crash is coming from.

@peilinok
Copy link
Contributor

@Zazo032 Thank you for your feedback. We will investigate this issue.

@peilinok
Copy link
Contributor

@Zazo032 Would you please provide the stacktrace of aosl_main thread?

@Zazo032
Copy link
Author

Zazo032 commented Apr 15, 2025

Thread Tags
id: 27
name: aosl_main
was active: false
errored: no

Thread Stack Trace
  libsystem_kernel    0x1e57d4a44  kevent64
  aosl                0x10383f8f0  aosl_os_rename
  aosl                0x1038476a4  aosl_co_sleep_cancel
  aosl                0x103849b9c  aosl_mpq_loop
  aosl                0x103848e10  aosl_perf_set_callback
  aosl                0x10385b09c  aosl_err_to_errno
  libsystem_pthread   0x21ee227cc  _pthread_start

@Zazo032
Copy link
Author

Zazo032 commented Apr 15, 2025

In case it helps:

  • Most of the reports have <300mb free memory, wide range of devices (iPad 2019 to iPhone 15 Pro), mainly iOS 18 devices
  • We updated from 6.5.0 to 6.5.1 recently, I can't find any similar report from an app version that used 6.5.0, no other changes to the screenshare/videocall flow was done on our app for months

@peilinok
Copy link
Contributor

@Zazo032 Thank you very much for the information provided, it's very helpful. I have already analyzed this call stack, but there wasn't much useful information. I've also consulted with relevant colleagues, and we haven't received many crash reports. If possible, please send this crash file to [email protected]. If you have a sales representative or customer service contact, please reach out to them as well. This is to avoid any sensitive information being exposed here. We prefer to communicate about this issue through email and other channels.

@peilinok peilinok added bug Something isn't working crash labels Apr 16, 2025
@peilinok
Copy link
Contributor

@Zazo032 Hello, please note that agora_rtc_engine is the FFI plugin component of the Agora Flutter SDK, which requires manual building. Before distributing your app to the App Store, it's essential to preserve the symbol files for proper crash analysis and debugging purposes.

@peilinok
Copy link
Contributor

I will try to reproduce this crash with my local device, good luck with me....

@peilinok
Copy link
Contributor

@Zazo032

I sincerely apologize for your bad experience. This crash was introduced while attempting to fix a lifecycle issue(#2190). According to the call stack shown below, the root cause is that when TextureRender calls dispose, it immediately releases the internal RendererDelegate, which leads to a crash when the asynchronous task posted to the main queue tries to access this->render_.

invocation function for block in (anonymous namespace)::RendererDelegate::OnVideoFrameReceived(void const*, IrisRtcVideoFrameConfig const&, bool) (in agora_rtc_engine) (TextureRenderer.mm:96)
invocation function for block in (anonymous namespace)::RendererDelegate::OnVideoFrameReceived(void const*, IrisRtcVideoFrameConfig const&, bool) (in agora_rtc_engine) (TextureRenderer.mm:96)
Thread 4 name: io.flutter.1.raster
0   libsystem_kernel.dylib          0x3be82359c         __ulock_wait2
1   libsystem_platform.dylib        0x43137fd98         _os_unfair_lock_lock_slow
2   libobjc.A.dylib                 0x31646bd30         locker_mixin<T>::lockWith
3   libobjc.A.dylib                 0x31646b308         objc_storeWeak
4   IOGPU                           0x44f31f504         -[IOGPUMetalResource dealloc]
5   IOGPU                           0x44f31f04c         -[IOGPUMetalTexture dealloc]
6   AGXMetalG14                     0x49bb43ce0         -[AGXTexture dealloc]
7   AGXMetalG14                     0x49bb26c44         -[AGXG14FamilyTexture dealloc]
8   CoreVideo                       0x3613b71b8         CVMetalTextureBacking::finalize
...
21  Flutter                         0x1061f79f4         [inlined] flutter::IOSExternalTextureMetal::~IOSExternalTextureMetal (ios_external_texture_metal.mm:17)
22  Flutter                         0x1061f79f4         flutter::IOSExternalTextureMetal::~IOSExternalTextureMetal (ios_external_texture_metal.mm:17)
23  Flutter                         0x1061ba720         [inlined] std::_fl::__shared_count::__release_shared[abi:v15000] (shared_ptr.h:174)
24  Flutter                         0x1061ba720         [inlined] std::_fl::__shared_weak_count::__release_shared[abi:v15000] (shared_ptr.h:215)
25  Flutter                         0x1061ba720         std::_fl::shared_ptr<T>::~shared_ptr[abi:v15000] (shared_ptr.h:702)
26  Flutter                         0x106765b5c         [inlined] std::_fl::shared_ptr<T>::~shared_ptr[abi:v15000] (shared_ptr.h:700)
27  Flutter                         0x106765b5c         [inlined] std::_fl::pair<T>::~pair (pair.h:40)
28  Flutter                         0x106765b5c         [inlined] std::_fl::pair<T>::~pair (pair.h:40)
29  Flutter                         0x106765b5c         [inlined] std::_fl::allocator_traits<T>::destroy[abi:v15000]<T> (allocator_traits.h:319)
30  Flutter                         0x106765b5c         [inlined] std::_fl::__tree<T>::erase (__tree:2420)
31  Flutter                         0x106765b5c         [inlined] std::_fl::map<T>::erase[abi:v15000] (map:1374)
32  Flutter                         0x106765b5c         [inlined] flutter::TextureRegistry::UnregisterTexture (texture.cc:44)
33  Flutter                         0x106765b5c         [inlined] flutter::Shell::OnPlatformViewUnregisterTexture::lambda::operator() (shell.cc:1189)

@peilinok
Copy link
Contributor

@Zazo032 Thanks for your help, we will fix this as soon as possible.

@Zazo032
Copy link
Author

Zazo032 commented Apr 22, 2025

@peilinok thanks for the quick response and identifying the root cause! We reverted to agora_rtc_engine: 6.5.0 in the meantime

@peilinok
Copy link
Contributor

@Zazo032 We plan to release version 6.5.2 in the near future, which will include this fix. If possible, we would greatly appreciate it if you could help verify the fix when it's available. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash
Projects
None yet
Development

No branches or pull requests

2 participants