Skip to content

In Unity 2018.2 you cannot call GetBool() during System.AppDomain.CurrentDomain.DomainUnload #167

@nickludlam

Description

@nickludlam

I'm seeing this error in the logs when closing Unity (both batch mode and editor mode)

[Package Manager] Server::Kill -- Server was shutdown
Cleanup mono
GetBool is not allowed to be called while application is terminating.
 
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Scripting/ScriptingThreadAndSerializationSafeCheck.cpp Line: 85)


Unhandled Exception: UnityEngine.UnityException: GetBool is not allowed to be called while application is terminating.
  at <0x00000> <unknown method>
  at <0x00000> <unknown method>
  at <0x00000> <unknown method>
  at <0x00000> <unknown method>

This comes from hooking into System.AppDomain.CurrentDomain.DomainUnload in order to act upon RevertExternalScriptEditorOnExit preference setting. When the callback is triggered, the Enabled property is queried, which results in this issue.

I don't know what the solution is, but this needs to be reworked to allow Unity to exit cleanly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions