aclassen / ComposeReorderable

Enables reordering by drag and drop in Jetpack Compose (Desktop) LazyList & LazyGrid.
Apache License 2.0
836 stars 89 forks source link

NullPointerException when dragging! #203

Open Monabr opened 1 year ago

Monabr commented 1 year ago

So here is a stack trace.

java.lang.NullPointerException
        at androidx.compose.ui.node.DelegatableNodeKt.requireOwner(DelegatableNode.kt:308)
        at androidx.compose.ui.node.SemanticsModifierNodeKt.invalidateSemantics(SemanticsModifierNode.kt:44)
        at androidx.compose.ui.node.NodeKindKt.autoInvalidateNode(NodeKind.kt:171)
        at androidx.compose.ui.node.NodeChain.updateNodeAndReplaceIfNeeded(NodeChain.kt:513)
        at androidx.compose.ui.node.NodeChain.updateFrom$ui_release(NodeChain.kt:130)
        at androidx.compose.ui.node.LayoutNode.setModifier(LayoutNode.kt:735)
        at androidx.compose.ui.node.ComposeUiNode$Companion$SetModifier$1.invoke(ComposeUiNode.kt:42)
        at androidx.compose.ui.node.ComposeUiNode$Companion$SetModifier$1.invoke(ComposeUiNode.kt:42)
        at androidx.compose.runtime.ComposerImpl$apply$operation$1.invoke(Composer.kt:1668)
        at androidx.compose.runtime.ComposerImpl$apply$operation$1.invoke(Composer.kt:1666)
        at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:808)
        at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:839)
        at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:587)
        at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:505)
        at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34)
        at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
        at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
        at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:973)
        at android.view.Choreographer.doCallbacks(Choreographer.java:799)
        at android.view.Choreographer.doFrame(Choreographer.java:730)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:960)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:236)
        at android.app.ActivityThread.main(ActivityThread.java:8057)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)
        Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@98d8918, androidx.compose.ui.platform.MotionDurationScaleImpl@198df71, StandaloneCoroutine{Cancelling}@491c156, AndroidUiDispatcher@97bb5d7]

I don't see how it could be like that at all.