Search Unity

Bug Objects are trying to be loaded during a domain backup

Discussion in 'Localization Tools' started by jRocket, Jul 17, 2023.

  1. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    I am getting this error that appears to come from the Localization package. It happens every time code is changed and domain reloads. The full stack trace is as follows.

    Objects are trying to be loaded during a domain backup. This is not allowed as it will lead to undefined behaviour!

    0x00007ff640f58e4d (Unity) StackWalker::GetCurrentCallstack
    0x00007ff640f5ddf9 (Unity) StackWalker::ShowCallstack
    0x00007ff641f2b121 (Unity) GetStacktrace
    0x00007ff6425ed922 (Unity) DebugStringToFile
    0x00007ff640f00c83 (Unity) PersistentManager::CheckIfDomainBackupIsHappening
    0x00007ff640f0c015 (Unity) PersistentManager::ReadObject
    0x00007ff64005ae4b (Unity) PPtr<Object>::eek:perator Object * __ptr64
    0x00007ff64057d021 (Unity) EditorBuildSettings_CUSTOM_GetConfigObject
    0x0000014af6ce9b0a (Mono JIT Code) (wrapper managed-to-native) UnityEditor.EditorBuildSettings:GetConfigObject (string)
    0x0000014af6ce999b (Mono JIT Code) UnityEditor.EditorBuildSettings:TryGetConfigObject<T_REF> (string,T_REF&)
    0x0000014bb76f1e3b (Mono JIT Code) UnityEngine.Localization.Settings.LocalizationSettings:GetInstanceDontCreateDefault () (at ./Library/PackageCache/com.unity.localization@1.4.4/Runtime/Settings/LocalizationSettings.cs:690)
    0x0000014bb76f1d4b (Mono JIT Code) UnityEngine.Localization.Settings.LocalizationSettings:get_HasSettings () (at ./Library/PackageCache/com.unity.localization@1.4.4/Runtime/Settings/LocalizationSettings.cs:96)
    0x0000014bb76f146b (Mono JIT Code) UnityEngine.Localization.Tables.TableReference:get_SharedTableData () (at ./Library/PackageCache/com.unity.localization@1.4.4/Runtime/Tables/TableReference.cs:74)
    0x0000014bb76f132b (Mono JIT Code) UnityEngine.Localization.Tables.TableReference:get_TableCollectionName () (at ./Library/PackageCache/com.unity.localization@1.4.4/Runtime/Tables/TableReference.cs:66)
    0x0000014bb76f12ab (Mono JIT Code) UnityEngine.Localization.Tables.TableReference:GetSerializedString () (at ./Library/PackageCache/com.unity.localization@1.4.4/Runtime/Tables/TableReference.cs:188)
    0x0000014bb76f11a3 (Mono JIT Code) UnityEngine.Localization.Tables.TableReference:OnBeforeSerialize () (at ./Library/PackageCache/com.unity.localization@1.4.4/Runtime/Tables/TableReference.cs:310)
    0x0000014bd4e32cc8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (intptr&,intptr,intptr,intptr)
    0x00007ffb98fae0d4 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
    0x00007ffb98eeeb74 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)
    0x00007ffb98eeed0c (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)
    0x00007ff640e77bc4 (Unity) scripting_method_invoke
    0x00007ff640e56844 (Unity) ScriptingInvocation::Invoke
    0x00007ff640e8dbe4 (Unity) InvokeMethod<YAMLWrite>
    0x00007ff640e20066 (Unity) ExecuteSerializationCommands<ConfigSettingsRead>
    0x00007ff640ecb282 (Unity) Transfer_ManagedObject<StreamedBinaryWrite,0>
    0x00007ff640e20066 (Unity) ExecuteSerializationCommands<ConfigSettingsRead>
    0x00007ff640ecb282 (Unity) Transfer_ManagedObject<StreamedBinaryWrite,0>
    0x00007ff640e20066 (Unity) ExecuteSerializationCommands<ConfigSettingsRead>
    0x00007ff640ecb282 (Unity) Transfer_ManagedObject<StreamedBinaryWrite,0>
    0x00007ff640e20186 (Unity) ExecuteSerializationCommands<JSONRead>
    0x00007ff640e3a408 (Unity) <lambda_23502d5cf47c99f01792cd87488ce116>::eek:perator()
    0x00007ff640e34a03 (Unity) TransferScriptingObject<StreamedBinaryWrite>
    0x00007ff640e3feea (Unity) SerializableManagedRefBackupGenerator::ExtractBackupFromInstance
    0x00007ff640e3cb61 (Unity) MonoBehaviour::BackupAndDeflateManagedReferences
    0x00007ff640ef201c (Unity) SerializableManagedRefsUtilities::BackupAndDeflateAll
    0x00007ff640e3d034 (Unity) MonoManager::BeginReloadAssembly
    0x00007ff640e48138 (Unity) MonoManager::ReloadAssembly
    0x00007ff641dd4e3d (Unity) Internal_ADB_Only_ReloadAllUsedAssemblies
    0x00007ff64228a94a (Unity) DomainReloadIfAllowed
    0x00007ff642288abb (Unity) CompileAndDomainReload
    0x00007ff6422a7642 (Unity) RefreshInternalV2
    0x00007ff6422af7ef (Unity) StopAssetImportingV2Internal
    0x00007ff641abd1a1 (Unity) Application::TickTimer
    0x00007ff641f3180a (Unity) MainMessageLoop
    0x00007ff641f36910 (Unity) WinMain
    0x00007ff64332133e (Unity) __scrt_common_main_seh
    0x00007ffc69cd26ad (KERNEL32) BaseThreadInitThunk
    0x00007ffc6accaa68 (ntdll) RtlUserThreadStart
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Could you please file a bug report?
    We have had a few users report it but so far don't have any reproduction that we can test against.
     
  3. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    I have submitted a bug report for this issue. IN-48138

    The error happens even after deleting the library folder, so I'm hoping it is reproducable

    Hope that helps.
     
    karl_jones likes this.
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    We have a fix for this on the way in 1.5. It was a bug in how we serialized a reference when it's empty.
     
    jRocket likes this.