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.
@Codengineer Codengineer force-pushed the bobd/crash_quit_in_run_mode branch from 15981ae to a4a6009 Compare December 14, 2025 15:40
Copy link
Contributor

@maryamziaa maryamziaa left a 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.

@Codengineer Codengineer force-pushed the bobd/crash_quit_in_run_mode branch from 8473f99 to 6280dd5 Compare December 16, 2025 18:23
@Codengineer Codengineer removed the request for review from xdesilets December 16, 2025 18:49
@@ -0,0 +1,178 @@
# CLAUDE.md
Copy link
Contributor

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 :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! thanks

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.

3 participants