Skip to content

Conversation

@Codengineer
Copy link
Contributor

@Codengineer Codengineer commented Dec 10, 2025

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)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

Tested manually that the crash no longer occurs with the project IN-125845_crash with no adverse effect

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.
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