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

Fix UI close crash #43

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Fix UI close crash #43

merged 1 commit into from
Dec 11, 2023

Conversation

serenibyss
Copy link
Member

MUI schedules UIs for opening 1 tick later (I'm not 100% sure on the reason for this, but I figure its important).

However, closing UIs 1 tick later causes the MUI panel state to be set as inactive/invalid before the window closes (in some cases, I'll explain below). Now we immediately close the UI, or pop the queued UI off the queue if there is one.

This seemed like a race condition or similar with the UI close animation because if that animation caused the panel to cross over into another tick (i.e., the esc input is inputted in tick 50, but the animation ends in tick 51) then the crash would not occur.

@brachy84
Copy link
Member

Im not really happy with how it is right now and the solution. Itll work as a temporary fix, but this needs to be reworked.

@brachy84 brachy84 merged commit 35104c3 into master Dec 11, 2023
@brachy84 brachy84 deleted the sb-fix-ui-close-crash branch December 11, 2023 09:55
miozune pushed a commit to GTNewHorizons/ModularUI2 that referenced this pull request Jan 31, 2024
(cherry picked from commit 35104c3)
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

Successfully merging this pull request may close these issues.

2 participants