compose-multiplatform: java.lang.NullPointerException at androidx.compose.ui.node.DelegatableNodeKt.requireOwner(DelegatableNode.kt:308)
Hi. I’m playing with jetbrains compose and Decompose library https://github.com/arkivanov/Decompose using it’s navigation
On one of the page I’m using .fillMaxWidth() modifier and when navigates to this page I’m getting the next exception.
The same code works fine on desktop version
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.serhiy.connect, PID: 10207 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:1621) at androidx.compose.runtime.ComposerImpl$apply$operation$1.invoke(Composer.kt:1619) 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:585) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:503) 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:1228) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1238) at android.view.Choreographer.doCallbacks(Choreographer.java:898) at android.view.Choreographer.doFrame(Choreographer.java:826) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1213) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7892) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@bef7741, androidx.compose.ui.platform.MotionDurationScaleImpl@891c4e6, StandaloneCoroutine{Cancelling}@ff31a27, AndroidUiDispatcher@da434d4]
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (14 by maintainers)
@arkivanov @dima-avdeev-jb Thanks you
@dima-avdeev-jb I’ll try it on my side as well and will let you know
Oops, looks like I’m late with my results)) @dima-avdeev-jb do you mind adding your solution to the linked bug?
@serrg1994 I tried to reproduce again on my Pixel 6 Pro, as well as on emulators with API 30, 32 and 33. Also tried building on macOS and Linux. It just works for me 😃 Meantime, I noticed one possibly incorrect usage of Compose in Decompose animations, there is little chance it could fix the crash. I have assembled an APK with the fix, I will appreciate if someone checks if it still crashes. android-debug.apk.zip
Yes. I can do it. Also I asked Decompose author and he sent me a link with the same issue on Google issues tracker https://issuetracker.google.com/issues/258907850