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 update execute while app exit #17543

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jiangheng90
Copy link

@jiangheng90 jiangheng90 commented Jan 26, 2025

Objective

Fixes #17533 #16066

update execute while app is exit, if we query object in update, it will cause panic becuse these object has been recycle

this problem is caused from #14155, by fix App hanging in example window_settings. when windows all destroyed to be zero the all_invisible will be true, then cause update execute after app exit.

Solution

before update check app state is exit. if exit no execute.

another choice is to see the number of windows if it goes to zero, just make all_invisible to be false

but I think check app state is more reliable, because maybe in some case we need app to run background with no window.

for now, I just check if app is exit.

@BenjaminBrienen BenjaminBrienen added S-Needs-Review Needs reviewer attention (from anyone!) to move forward C-Bug An unexpected or incorrect behavior A-ECS Entities, components, systems, and events D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Jan 26, 2025
@mockersf
Copy link
Member

we want to be able to run update when the app is exiting, so this is not a good fix

@mockersf mockersf added the X-Controversial There is active debate or serious implications around merging this PR label Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward X-Controversial There is active debate or serious implications around merging this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants