Desktop -> 창을 다른 모니터로 이동시 죽는 케이스 수정#486
Merged
workspace merged 1 commit intoJun 4, 2025
Merged
Conversation
taehwandev
approved these changes
Jun 4, 2025
workspace
approved these changes
Jun 4, 2025
workspace
left a comment
Contributor
There was a problem hiding this comment.
@easternkite 좋은 발견과 멋진 해결 감사합니다! 👍
f36e2c1
into
droidknights:2025/compose-multiplatform
8 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Overview (Required)
해당 pr은 Desktop 창을 다른 모니터, 정확히는 다른 해상도를 가진 모니터로 이동하면 내부적으로 KoinContext를 불러올 수 없는 이슈를 수정합니다. 결론적으로 recomposition에 의한 side-effect이며,
knightsAppDeclaration()을 전역 멤버로 선언하여 해결했습니다.Issue Summary
발생 원인
koinAppDeclaration) 재실행onAbandoned호출 → Koin 종료간단 분석
knightsAppDeclaration()이 다시 생성되며, 이를 key값으로 기억하고있는 koin 래퍼 클래스 또한 재생성됩니다.CompositionKoinApplicationLoader는RememberObserver를 상속받고있으며, 기존 wrapper가 버려지고 재생성될 때onAbandoned를 호출하여 koin context를 null로 초기화합니다.wrapper.koin이 null을 반환하게 되어 앱에서 Exception이 발생하게됩니다.