-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Fixing crash when Editor Application is quitting in Runtime Mode #6267
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
base: develop
Are you sure you want to change the base?
Conversation
Dispose was not called when editor was quitting resulting in a crash in the Job system when CPU Workers were disposed in finalizers by the garbage collector on the wrong thread.
15981ae to
a4a6009
Compare
maryamziaa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the failing yamato jobs. Other than that it looks good to me.
8473f99 to
6280dd5
Compare
| @@ -0,0 +1,178 @@ | |||
| # CLAUDE.md | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder to remove this file before landing the PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch! thanks
Dispose was not called in Academy when editor was quitting resulting in a crash in the Job system when CPU Workers were disposed in finalizers called from background threads (they need to be called on the Main thread)
By calling Dispose before tearing down the job system, CPU Workers are disposed properly the same way they are when you leave play mode.
Proposed change(s)
Added a Dispose action in Academy when Editor Application is quitting
Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)
SENTIS-1216
UUM-128777
https://unity.slack.com/archives/C03F2JZVC80/p1764831602079699
Types of change(s)
Checklist
Other comments
Tested manually that the crash no longer occurs with the project IN-125845_crash with no adverse effect