Closed rodolfoBee closed 2 years ago
Let me take a quick look and see if we can reproduce this 👀
Added Gradle version: 7.3.3 Repro provided by the affected user: https://github.com/dejanadamovic/sentrycrash "I have been able to reproduce the crash on the Android emulator (API 25) by clicking the power button for approximately 8 minutes."
I have been able to reproduce this issue with disabled NDK integration in AndroidManifest.xml:
<application>
<meta-data android:name="io.sentry.ndk.enable" android:value="false" />
</application>
With disabled NDK integration, the issue is not sent to Sentry issues.
I have been able to reproduce this issue with disabled NDK integration in AndroidManifest.xml:
<application> <meta-data android:name="io.sentry.ndk.enable" android:value="false" /> </application>
With disabled NDK integration, the issue is not sent to Sentry issues.
What if you remove these 2 lines? https://github.com/dejanadamovic/sentrycrash/blob/fafbeddb29fc2c5aa16413fd4c2e65496eca9a2a/app/src/main/AndroidManifest.xml#L27-L28 Just trying to narrow down the problem if performance is disabled.
Thanks for reporting and providing a repro! I can confirm that the issue can be reproduced.
I have been able to reproduce this issue with disabled NDK integration in AndroidManifest.xml:
<application> <meta-data android:name="io.sentry.ndk.enable" android:value="false" /> </application>
With disabled NDK integration, the issue is not sent to Sentry issues.
What if you remove these 2 lines? https://github.com/dejanadamovic/sentrycrash/blob/fafbeddb29fc2c5aa16413fd4c2e65496eca9a2a/app/src/main/AndroidManifest.xml#L27-L28 Just trying to narrow down the problem if performance is disabled.
The issue persists also with disabled performance.
Digging deeper into this revealed that the FrameMetricsAggregator and the underlying Android View implementation seems to be the root cause. So far we've been unable to reproduce this with newer Android versions. Given that the FrameMetricsAggregator
already caused some issues in the past we'll add an option to opt-out from this feature. By opting out "Slow and frozen frames" won't be reported anymore, but the rest of the sentry performance features will still work.
See #2314 for more details.
Just to add that this can be reproduced in Flutter app on Android 7.1
@dejanadamovic can you try the latest version https://github.com/getsentry/sentry-java/releases/tag/6.4.4 ?
There was a fix related to FrameMetricsAggregator
, likely not your issue, but just to double-check, since you are using an older version than this.
Confirming that crash can be reproduced with version 6.4.4
@dejanadamovic we've merged the PR with a kill-switch for frames tracking and will release it as part of 6.6.0
, and subsequently update our flutter SDK so you can turn them off completely to avoid the crash. Thanks for assisting us with the reproducer and all the details.
I see that version 6.6.0 has been released, but I can't find this frames tracking switch in the documentation. Can you give me some more info?
yep, we haven't updated docs yet, were waiting for the release to be out. But you can either disable it through the manifest:
<application>
<meta-data android:name="io.sentry.traces.frames-tracking" android:value="false" />
</application>
or through manually initializing the SDK:
SentryAndroid.init(this) { options ->
options.isEnableFramesTracking = false
}
Tested - no crash. Thank you.
Integration
sentry-android
Build System
Gradle
AGP Version
7.3.3
Proguard
Disabled
Version
6.4.3
Steps to Reproduce
Expected Result
No crash. The same project was tested without the Sentry SDK and no crashes were sent.
Actual Result
The application aborts with tgkill: OS Version: Android 7.1.2 ( Report Version: 104
Exception Type: Unknown (SIGABRT)
Application Specific Information: Abort
Thread 0 Crashed: 0 libc.so 0xadaa2d78 tgkill 1 libc.so 0xadaa04f3 pthread_kill 2 libc.so 0xada76745 raise 3 libc.so 0xada72281 + 2913411713
4 libc.so 0xada702e8 abort
5 libart.so 0xad62cf69 art::Runtime::Abort
6 libart.so 0xad3c7285 art::LogMessage::~LogMessage
7 libart.so 0xad4ce4a3 art::IndirectReferenceTable::Add
8 libart.so 0xad5c6143 + 2908512579
9 boot.oat 0x71239829 oatexec
EOF