Skip to content

IndexOutOfBoundsException when removing account #1920

@rfc2822

Description

@rfc2822

I created three accounts for testing. Then I deleted one of them and DAVx5 crashed.

Sync pending(Account {[email protected], type=bitfire.at.davdroid}, com.android.calendar) = false
Sync pending(Account {[email protected], type=bitfire.at.davdroid}, at.techbee.jtx.provider) = false
Sync pending(Account {[email protected], type=bitfire.at.davdroid}, at.techbee.jtx.provider) = false
Sync pending(Account {name=card ([email protected]) #350, type=at.bitfire.davdroid.address_book}, com.android.contacts) = false
Cleared Reference was only reachable from finalizer (only reported once)
Background concurrent mark compact GC freed 10MB AllocSpace bytes, 20(680KB) LOS objects, 49% free, 12MB/24MB, paused 1.032ms,6.624ms total 70.300ms
Sync pending(Account {[email protected], type=bitfire.at.davdroid}, com.android.calendar) = false
Sync pending(Account {[email protected], type=bitfire.at.davdroid}, at.techbee.jtx.provider) = false
Sync pending(Account {name=card ([email protected]) #350, type=at.bitfire.davdroid.address_book}, com.android.contacts) = false
Sync pending(Account {[email protected], type=bitfire.at.davdroid}, at.techbee.jtx.provider) = false
Sync pending(Account {name=card ([email protected]) #350, type=at.bitfire.davdroid.address_book}, com.android.contacts) = false
Sync pending(Account {[email protected], type=bitfire.at.davdroid}, com.android.calendar) = false
Sync pending(Account {[email protected], type=bitfire.at.davdroid}, at.techbee.jtx.provider) = false
Sync pending(Account {name=card ([email protected]) #350, type=at.bitfire.davdroid.address_book}, com.android.contacts) = false
Sync pending(Account {[email protected], type=bitfire.at.davdroid}, com.android.calendar) = false
Shutting down VM
Sync pending(Account {[email protected], type=bitfire.at.davdroid}, com.android.calendar) = false
FATAL EXCEPTION: main
Process: at.bitfire.davdroid, PID: 3137
java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
	at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
	at java.util.Objects.checkIndex(Objects.java:385)
	at java.util.ArrayList.get(ArrayList.java:434)
	at androidx.compose.material3.TabIndicatorOffsetNode.measure-3p2s80s(TabRow.kt:704)
	at androidx.compose.ui.node.LayoutModifierNodeCoordinator$LookaheadDelegateForLayoutModifierNode.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:93)
	at androidx.compose.ui.node.LookaheadPassDelegate$performMeasureBlock$1.invoke(LookaheadPassDelegate.kt:442)
	at androidx.compose.ui.node.LookaheadPassDelegate$performMeasureBlock$1.invoke(LookaheadPassDelegate.kt:441)
	at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:699)
	at androidx.compose.ui.node.LookaheadPassDelegate.performMeasure-BRTryo0$ui(LookaheadPassDelegate.kt:951)
	at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performLookaheadMeasure-BRTryo0$ui(LayoutNodeLayoutDelegate.kt:333)
	at androidx.compose.ui.node.LookaheadPassDelegate.remeasure-BRTryo0(LookaheadPassDelegate.kt:492)
	at androidx.compose.ui.node.LookaheadPassDelegate.measure-BRTryo0(LookaheadPassDelegate.kt:402)
	at androidx.compose.material3.TabRowKt$TabRowImpl$1$2$1.measure-3p2s80s(TabRow.kt:484)
	at androidx.compose.ui.layout.MultiContentMeasurePolicyImpl.measure-3p2s80s(MultiContentMeasurePolicy.kt:206)
	at androidx.compose.ui.node.InnerNodeCoordinator$LookaheadDelegateImpl.measure-BRTryo0(InnerNodeCoordinator.kt:82)
	at androidx.compose.foundation.layout.FillNode.measure-3p2s80s(Size.kt:721)
	at androidx.compose.ui.node.LayoutModifierNodeCoordinator$LookaheadDelegateForLayoutModifierNode.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:93)
	at androidx.compose.ui.node.LookaheadPassDelegate$performMeasureBlock$1.invoke(LookaheadPassDelegate.kt:442)
	at androidx.compose.ui.node.LookaheadPassDelegate$performMeasureBlock$1.invoke(LookaheadPassDelegate.kt:441)
	at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:728)
	at androidx.compose.ui.node.LookaheadPassDelegate.performMeasure-BRTryo0$ui(LookaheadPassDelegate.kt:951)
	at androidx.compose.ui.node.LayoutNodeLayoutDelegate.performLookaheadMeasure-BRTryo0$ui(LayoutNodeLayoutDelegate.kt:333)
	at androidx.compose.ui.node.LookaheadPassDelegate.remeasure-BRTryo0(LookaheadPassDelegate.kt:492)
	at androidx.compose.ui.node.LayoutNode.lookaheadRemeasure-_Sx5XlM$ui(LayoutNode.kt:1267)
	at androidx.compose.ui.node.LayoutNode.lookaheadRemeasure-_Sx5XlM$ui$default(LayoutNode.kt:1261)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.doLookaheadRemeasure-sdFAvZA(MeasureAndLayoutDelegate.kt:359)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureAndRelayoutIfNeeded(MeasureAndLayoutDelegate.kt:583)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.onlyRemeasureIfPending(MeasureAndLayoutDelegate.kt:683)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.forceMeasureTheSubtreeInternal(MeasureAndLayoutDelegate.kt:710)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.forceMeasureTheSubtreeInternal(MeasureAndLayoutDelegate.kt:717)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.forceMeasureTheSubtreeInternal(MeasureAndLayoutDelegate.kt:717)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.forceMeasureTheSubtreeInternal(MeasureAndLayoutDelegate.kt:717)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.forceMeasureTheSubtree(MeasureAndLayoutDelegate.kt:674)
	at androidx.compose.ui.platform.AndroidComposeView.forceMeasureTheSubtree(AndroidComposeView.android.kt:1767)
	at androidx.compose.ui.node.LookaheadPassDelegate.remeasure-BRTryo0(LookaheadPassDelegate.kt:503)
	at androidx.compose.ui.node.LayoutNode.lookaheadRemeasure-_Sx5XlM$ui(LayoutNode.kt:1267)
	at androidx.compose.ui.node.LayoutNode.lookaheadRemeasure-_Sx5XlM$ui$default(LayoutNode.kt:1261)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.doLookaheadRemeasure-sdFAvZA(MeasureAndLayoutDelegate.kt:359)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureOnly(MeasureAndLayoutDelegate.kt:650)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureLookaheadRootsInSubtree(MeasureAndLayoutDelegate.kt:457)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureLookaheadRootsInSubtree(MeasureAndLayoutDelegate.kt:460)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureLookaheadRootsInSubtree(MeasureAndLayoutDelegate.kt:460)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureLookaheadRootsInSubtree(MeasureAndLayoutDelegate.kt:460)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureLookaheadRootsInSubtree(MeasureAndLayoutDelegate.kt:460)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureLookaheadRootsInSubtree(MeasureAndLayoutDelegate.kt:460)
	at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureOnly(MeasureAndLayoutDelegate.kt:443)
	at androidx.compose.ui.platform.AndroidComposeView.onMeasure(AndroidComposeView.android.kt:1847)
	at android.view.View.measure(View.java:28407)
	at androidx.compose.ui.platform.AbstractComposeView.internalOnMeasure$ui(ComposeView.android.kt:314)
	at androidx.compose.ui.platform.AbstractComposeView.onMeasure(ComposeView.android.kt:301)
	at android.view.View.measure(View.java:28407)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7028)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:141)
	at android.view.View.measure(View.java:28407)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7028)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:878)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
	at android.view.View.measure(View.java:28407)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7028)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at android.view.View.measure(View.java:28407)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7028)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:878)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
	at android.view.View.measure(View.java:28407)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7028)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at com.android.internal.policy.DecorView.onMeasure(DecorView.java:736)
	at android.view.View.measure(View.java:28407)
	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:4998)
	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:3391)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3699)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3076)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10643)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1570)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1579)
	at android.view.Choreographer.doCallbacks(Choreographer.java:1179)
	at android.view.Choreographer.doFrame(Choreographer.java:1108)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1553)
	at android.os.Handler.handleCallback(Handler.java:995)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loopOnce(Looper.java:248)
	at android.os.Looper.loop(Looper.java:338)
	at android.app.ActivityThread.main(ActivityThread.java:9067)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)
Sync pending(Account {[email protected], type=bitfire.at.davdroid}, at.techbee.jtx.provider) = false
Sync pending(Account {name=card ([email protected]) #350, type=at.bitfire.davdroid.address_book}, com.android.contacts) = false
Sending signal. PID: 3137 SIG: 9
---------------------------- PROCESS ENDED (3137) for package at.bitfire.davdroid ----------------------------
---------------------------- PROCESS STARTED (3843) for package at.bitfire.davdroid ----------------------------
Load libframework-connectivity-tiramisu-jni.so using APEX ns com_android_tethering for caller /apex/com.android.tethering/javalib/framework-connectivity-t.jar: ok

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions