Skip to content

Uncaught Kotlin exception: kotlin.IndexOutOfBoundsException: #432

@frankois944

Description

@frankois944

Platform

Apple

Installed

None

Version

Sentry KMP : 0.17.1
Sentry iOS : 8.53.2
Kotlin : 2.1.21
iOS : 18.5

Steps to Reproduce

Hello,

I'm using Kermit as intermediate to send exception to Sentry with this method Sentry.captureException(throwable).

In some cases, the app currently crash from the Sentry library.

Expected Result

The stack must be correctly translated and not crash.

Actual Result

In some case, the stack can't be translated by sentry and throw this following error.

I can't give you a reproducer as it's my job's project.

Uncaught Kotlin exception: kotlin.IndexOutOfBoundsException: index: -1, size: 27
    at 0   Shared                              0x10a361aeb        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 99 
    at 1   Shared                              0x10a35b88f        kfun:kotlin.Exception#<init>(kotlin.String?){} + 95 
    at 2   Shared                              0x10a35ba5f        kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 95 
    at 3   Shared                              0x10a35c1bf        kfun:kotlin.IndexOutOfBoundsException#<init>(kotlin.String?){} + 95 
    at 4   Shared                              0x10a42d037        kfun:kotlin.collections.AbstractList.Companion#checkElementIndex(kotlin.Int;kotlin.Int){} + 515 
    at 5   Shared                              0x10a3bd51f        kfun:kotlin.collections.ArrayList#get(kotlin.Int){}1:0 + 191 
    at 6   Shared                              0x10a492f83        kfun:kotlin.collections.List#get(kotlin.Int){}1:0-trampoline + 107 
    at 7   Shared                              0x10a993fdb        kfun:io.sentry.kotlin.multiplatform.nsexception#dropCommonAddresses__at__kotlin.collections.List<kotlin.Long>(kotlin.collections.List<kotlin.Long>){}kotlin.collections.List<kotlin.Long> + 483 
    at 8   Shared                              0x10a9938fb        kfun:io.sentry.kotlin.multiplatform.nsexception#getFilteredStackTraceAddresses__at__kotlin.Throwable(kotlin.Boolean;kotlin.collections.List<kotlin.Long>){}kotlin.collections.List<kotlin.Long> + 567 
    at 9   Shared                              0x10a98e217        kfun:io.sentry.kotlin.multiplatform.nsexception#asNSException__at__kotlin.Throwable(kotlin.Boolean){}platform.Foundation.NSException + 1715 
    at 10  Shared                              0x10a97ef57        kfun:io.sentry.kotlin.multiplatform.SentryBridge#captureException(kotlin.Throwable){}io.sentry.kotlin.multiplatform.protocol.SentryId + 295 
    at 11  Shared                              0x10a99742b        kfun:io.sentry.kotlin.multiplatform.Sentry#captureException(kotlin.Throwable){}io.sentry.kotlin.multiplatform.protocol.SentryId + 175 
    at 12  Shared                              0x10a32fc07        kfun:fr.creditagricole.macarte.shared.utils.logger.SentryLogger#log(co.touchlab.kermit.Severity;kotlin.String;kotlin.String;kotlin.Throwable?){} + 1031 
    at 13  Shared                              0x10a86cd5b        kfun:co.touchlab.kermit.LogWriter#log(co.touchlab.kermit.Severity;kotlin.String;kotlin.String;kotlin.Throwable?){}-trampoline + 83 
    at 14  Shared                              0x10a86a3c7        kfun:co.touchlab.kermit.BaseLogger#processLog(co.touchlab.kermit.Severity;kotlin.String;kotlin.Throwable?;kotlin.String){} + 571 

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions