compose-multiplatform
compose-multiplatform copied to clipboard
NPE in UndecoratedWindowResizer.desktop.kt in java.awt.PointerInfo.getLocation()
Describe the bug
NullPointerException in UndecoratedWindowResizer.desktop.kt
Possibly similar issue as in #4179
Affected platforms
- Desktop (Windows)
Versions
- Libraries:
- Compose Multiplatform version: 1.6.10
- Kotlin version: 1.9.23
- OS version(s) (required for Desktop and iOS issues): Windows 11, 10.0.19045.4529
- OS architecture (x86 or arm64): amd64
- JDK (for desktop issues): Oracle Corporation 17.0.2
To Reproduce Could not reproduce manually, reported by a user when trying to drag a window. Consistently happening, cannot drag windows without crashing.
Expected behavior App does not crash
Additional context Stack trace:
java.lang.NullPointerException: Cannot invoke "java.awt.PointerInfo.getLocation()" because the return value of "java.awt.MouseInfo.getPointerInfo()" is null
at androidx.compose.ui.window.UndecoratedWindowResizer$resizeOnDrag$1$1.invokeSuspend(UndecoratedWindowResizer.desktop.kt:106)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:175)
at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:175)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:164)
at kotlinx.coroutines.CancellableContinuationImpl.cancelCompletedResult$kotlinx_coroutines_core(CancellableContinuationImpl.kt:470)
at kotlinx.coroutines.CancellableContinuationImpl.callCancelHandler(CancellableContinuationImpl.kt:470)
at kotlinx.coroutines.CancellableContinuationImpl.callSegmentOnCancellation(CancellableContinuationImpl.kt:470)
at kotlinx.coroutines.CancellableContinuationImpl.invokeOnCancellation(CancellableContinuationImpl.kt:470)
at kotlinx.coroutines.CancellableContinuationImpl.invokeOnCancellationImpl$5d527811(CancellableContinuationImpl.kt:470)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:470)
at kotlinx.coroutines.CancellableContinuationImpl.cancelCompletedResult$kotlinx_coroutines_core(CancellableContinuationImpl.kt:504)
at kotlinx.coroutines.CancellableContinuationImpl.callCancelHandler(CancellableContinuationImpl.kt:504)
at kotlinx.coroutines.CancellableContinuationImpl.callSegmentOnCancellation(CancellableContinuationImpl.kt:504)
at kotlinx.coroutines.CancellableContinuationImpl.invokeOnCancellation(CancellableContinuationImpl.kt:504)
at kotlinx.coroutines.CancellableContinuationImpl.invokeOnCancellationImpl$5d527811(CancellableContinuationImpl.kt:504)
at kotlinx.coroutines.CancellableContinuationImpl.resumedState(CancellableContinuationImpl.kt:504)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:504)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:493)
at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:364)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:672)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.dispatchPointerEvent(SuspendingPointerInputFilter.kt:549)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:571)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:326)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:312)
at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:187)
at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:106)
at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:114)
at androidx.compose.ui.node.RootNodeOwner.onPointerInput(RootNodeOwner.skiko.kt:212)
at androidx.compose.ui.scene.MultiLayerComposeSceneImpl.processPress(MultiLayerComposeScene.skiko.kt:315)
at androidx.compose.ui.scene.MultiLayerComposeSceneImpl.processPointerInputEvent(MultiLayerComposeScene.skiko.kt:235)
at androidx.compose.ui.scene.BaseComposeScene$inputHandler$2.invoke(BaseComposeScene.skiko.kt:62)
at androidx.compose.ui.scene.BaseComposeScene$inputHandler$2.invoke(BaseComposeScene.skiko.kt:62)
at androidx.compose.ui.scene.BaseComposeScene$inputHandler$2.invoke(BaseComposeScene.skiko.kt:62)
at androidx.compose.ui.scene.BaseComposeScene$inputHandler$2.invoke(BaseComposeScene.skiko.kt:62)
at androidx.compose.ui.input.pointer.SyntheticEventSender.sendInternal(SyntheticEventSender.skiko.kt:175)
at androidx.compose.ui.input.pointer.SyntheticEventSender.send(SyntheticEventSender.skiko.kt:79)
at androidx.compose.ui.scene.ComposeSceneInputHandler.onPointerEvent-WlEVilQ(ComposeSceneInputHandler.skiko.kt:123)
at androidx.compose.ui.scene.ComposeSceneInputHandler.onPointerEvent-BGSDPeU(ComposeSceneInputHandler.skiko.kt:89)
at androidx.compose.ui.scene.BaseComposeScene.sendPointerEvent-BGSDPeU(BaseComposeScene.skiko.kt:185)
at androidx.compose.ui.scene.ComposeScene.sendPointerEvent-BGSDPeU$default(ComposeScene.skiko.kt:186)
at androidx.compose.ui.scene.ComposeSceneMediator_desktopKt.onMouseEvent-d-4ec7I(ComposeSceneMediator.desktop.kt:709)
at androidx.compose.ui.scene.ComposeSceneMediator_desktopKt.access$onMouseEvent-d-4ec7I(ComposeSceneMediator.desktop.kt:1)
at androidx.compose.ui.scene.ComposeSceneMediator.onMouseEvent(ComposeSceneMediator.desktop.kt:403)
at androidx.compose.ui.scene.ComposeSceneMediator.access$onMouseEvent(ComposeSceneMediator.desktop.kt:102)
at androidx.compose.ui.scene.ComposeSceneMediator$mouseListener$1.mousePressed(ComposeSceneMediator.desktop.kt:233)
at java.awt.Component.processMouseEvent(Component.java:6623)
at java.awt.Component.processEvent(Component.java:6391)
at java.awt.Component.dispatchEventImpl(Component.java:5001)
at java.awt.Component.dispatchEvent(Component.java:4833)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.awt.EventQueue$4.run(EventQueue.java:722)
at java.awt.EventQueue$4.run(EventQueue.java:716)
at java.security.AccessController.doPrivileged(AccessController.java:399)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.awt.EventQueue$5.run(EventQueue.java:746)
at java.awt.EventQueue$5.run(EventQueue.java:744)
at java.security.AccessController.doPrivileged(AccessController.java:399)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)