Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalStateException when close window on Compose Multiplatform for Desktop #476

Open
Nyayurin opened this issue Aug 21, 2024 · 0 comments

Comments

@Nyayurin
Copy link

image

Exception in thread "main" java.lang.IllegalStateException: State must be at least CREATED to move to DESTROYED, but was INITIALIZED in component cafe.adriel.voyager.jetpack.VoyagerLifecycleKMPOwner@25ea87c6
	at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.jvm.kt:131)
	at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.jvm.kt:124)
	at cafe.adriel.voyager.jetpack.VoyagerLifecycleKMPOwner.safeHandleLifecycleEvent(VoyagerLifecycleKMPOwner.kt:195)
	at cafe.adriel.voyager.jetpack.VoyagerLifecycleKMPOwner.onDispose(VoyagerLifecycleKMPOwner.kt:111)
	at cafe.adriel.voyager.jetpack.NavigatorLifecycleKMPOwner.onDispose(NavigatorLifecycleKMPOwner.kt:28)
	at cafe.adriel.voyager.navigator.lifecycle.NavigatorLifecycleStore.remove(NavigatorLifecycleStore.kt:41)
	at cafe.adriel.voyager.navigator.internal.NavigatorDisposableKt.disposeNavigator(NavigatorDisposable.kt:80)
	at cafe.adriel.voyager.navigator.internal.NavigatorDisposableKt$NavigatorDisposableEffect$1$invoke$$inlined$onDispose$1.dispose(Effects.kt:491)
	at cafe.adriel.voyager.core.lifecycle.DisposableEffectIgnoringConfigurationImpl.onForgotten(DisposableEffect.kt:71)
	at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:1345)
	at androidx.compose.runtime.CompositionImpl.dispose(Composition.kt:787)
	at androidx.compose.ui.scene.BaseComposeScene.close(BaseComposeScene.skiko.kt:125)
	at androidx.compose.ui.scene.CanvasLayersComposeSceneImpl.close(CanvasLayersComposeScene.skiko.kt:194)
	at androidx.compose.ui.scene.ComposeSceneMediator.dispose(ComposeSceneMediator.desktop.kt:466)
	at androidx.compose.ui.scene.ComposeContainer.dispose(ComposeContainer.desktop.kt:199)
	at androidx.compose.ui.awt.ComposeWindowPanel.dispose(ComposeWindowPanel.desktop.kt:152)
	at androidx.compose.ui.awt.ComposeWindow.dispose(ComposeWindow.desktop.kt:164)
	at androidx.compose.ui.window.Window_desktopKt$Window$4$1.invoke(Window.desktop.kt:225)
	at androidx.compose.ui.window.Window_desktopKt$Window$4$1.invoke(Window.desktop.kt:221)
	at androidx.compose.ui.window.Window_desktopKt$Window$11$1.invoke(Window.desktop.kt:417)
	at androidx.compose.ui.window.Window_desktopKt$Window$11$1.invoke(Window.desktop.kt:416)
	at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$2$1$invoke$$inlined$onDispose$1.dispose(Effects.kt:491)
	at androidx.compose.runtime.DisposableEffectImpl.onForgotten(Effects.kt:86)
	at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:1345)
	at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:992)
	at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:1013)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:678)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:578)
	at androidx.compose.ui.window.YieldFrameClock.withFrameNanos(Application.desktop.kt:268)
	at androidx.compose.ui.window.YieldFrameClock$withFrameNanos$1.invokeSuspend(Application.desktop.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:102)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

dependencies:
image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant