Skip to content

[Crash] java.lang.ArrayIndexOutOfBoundsException at io.sentry.android.core.internal.util.SentryFrameMetricsCollector$WindowFrameMetricsManager.addOnFrameMetricsAvailableListener #4577

@kibotu

Description

@kibotu

Integration

sentry-android

Build System

Gradle

AGP Version

8.11.0

Proguard

Enabled

Version

8.16.0

Steps to Reproduce

io.sentry:sentry-android-gradle-plugin:5.8.0

[Samsung Galaxy A53 5G UW]
[Android 15 (SDK 35)]

Exception java.lang.ArrayIndexOutOfBoundsException: length=10; index=-1
  at java.util.ArrayList.add (ArrayList.java:491)
  at java.util.ArrayList.add (ArrayList.java:503)
  at android.view.View.addFrameMetricsListener (View.java:8333)
  at android.view.Window.addOnFrameMetricsAvailableListener (Window.java:1007)
  at io.sentry.android.core.internal.util.SentryFrameMetricsCollector$WindowFrameMetricsManager.addOnFrameMetricsAvailableListener (SentryFrameMetricsCollector.java:376)
  at io.sentry.android.core.internal.util.SentryFrameMetricsCollector.trackCurrentWindow (SentryFrameMetricsCollector.java:317)
  at io.sentry.android.core.internal.util.SentryFrameMetricsCollector.startCollection (SentryFrameMetricsCollector.java:266)
  at io.sentry.android.core.SpanFrameMetricsCollector.onSpanStarted (SpanFrameMetricsCollector.java:96)
  at io.sentry.DefaultCompositePerformanceCollector.start (DefaultCompositePerformanceCollector.java:65)
  at io.sentry.SentryTracer.<init> (SentryTracer.java:95)
  at io.sentry.DefaultSpanFactory.createTransaction (DefaultSpanFactory.java:15)
  at io.sentry.Scopes.createTransaction (Scopes.java:942)
  at io.sentry.Scopes.startTransaction (Scopes.java:886)
  at io.sentry.IScopes.startTransaction (IScopes.java:616)
  at io.sentry.IScopes.startTransaction (IScopes.java:599)
  at io.sentry.Sentry.startTransaction (Sentry.java:1113)
  at de.check24.profis.partner.core.services.network.interceptor.SentryTransactionInterceptor$intercept$1.invokeSuspend (SentryTransactionInterceptor.kt:21)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:100)
  at kotlinx.coroutines.EventLoopImplBase.processNextEvent (EventLoop.common.kt:263)
  at kotlinx.coroutines.BlockingCoroutine.joinBlocking (BlockingCoroutine.java:94)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking (BuildersKt__Builders.kt:70)
  at kotlinx.coroutines.BuildersKt.runBlocking (Builders.kt:1)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default (BuildersKt__Builders.kt:48)
  at kotlinx.coroutines.BuildersKt.runBlocking$default (Builders.kt:1)
  at de.check24.profis.partner.core.services.network.interceptor.SentryTransactionInterceptor.intercept (SentryTransactionInterceptor.kt:12)
  at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.kt:109)
  at de.check24.profis.partner.core.services.network.interceptor.CacheSanitizer.intercept (CacheSanitizer.kt:29)
  at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.kt:109)
  at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp (RealCall.kt:201)
  at okhttp3.internal.connection.RealCall$AsyncCall.run (RealCall.kt:517)
  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run (LimitedDispatcher.kt:124)
  at kotlinx.coroutines.scheduling.TaskImpl.run (Tasks.kt:89)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java:586)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:820)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:717)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:704)

Expected Result

not crashing :D

Actual Result

crashing

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions