Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug INCORRECT HASH: Failed to create the catalog file / How to solve this?

Discussion in 'Addressables' started by rab, Jul 29, 2022.

  1. rab

    rab

    Joined:
    Nov 13, 2009
    Posts:
    98
    Hello,

    while exporting Addressables I get this new error message in my project:
    INCORRECT HASH: the same hash (-1474147694) for different dependency lists:

    INCORRECT HASH: the same hash (-1474147694) for different dependency lists:
    source 1: System.Collections.Generic.HashSet`1[System.Object]
    source 2: System.Collections.Generic.HashSet`1[System.Object]
    0x00007ff6de3010cd (Unity) StackWalker::GetCurrentCallstack
    0x00007ff6de307da9 (Unity) StackWalker::ShowCallstack
    0x00007ff6df274e73 (Unity) GetStacktrace
    0x00007ff6df90a1cd (Unity) DebugStringToFile
    0x00007ff6dd46d372 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    0x0000023f942ea663 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    0x0000023f942ea57b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    0x0000023f942ea2c0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    0x0000023f942ea185 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    0x0000023ff9c7abf3 (Mono JIT Code) [BuildScriptBase.cs:100] UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase:BuildData<TResult_REF> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput)
    0x0000023ff9c79e2a (Mono JIT Code) [AddressableAssetSettings.cs:2583] UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContentImpl ()
    0x0000023ff9c79a8b (Mono JIT Code) [AddressableAssetSettings.cs:2554] UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent (UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult&)
    0x0000023ff9c7994b (Mono JIT Code) [AddressableAssetSettings.cs:2338] UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent ()
    0x0000023ff9c798db (Mono JIT Code) [AddressableAssetsSettingsGroupEditor.cs:365] UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildPlayerData ()
    0x0000023ff9c79693 (Mono JIT Code) [AddressableAssetsSettingsGroupEditor.cs:360] UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildScript (object)
    0x0000023ff9c6c543 (Mono JIT Code) UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    0x0000023ff9c6c42e (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object_object_int (object,intptr,intptr,intptr)
    0x00007ff8d17ae4b4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    0x00007ff8d16ee764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    0x00007ff8d16ee8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    0x00007ff6de2258c4 (Unity) scripting_method_invoke
    0x00007ff6de2204e4 (Unity) ScriptingInvocation::Invoke
    0x00007ff6dec99622 (Unity) CustomPopupMenuInterface::Execute
    0x00007ff6dec63ac0 (Unity) MenuController::ExecuteMenuItem
    0x00007ff6df294822 (Unity) ShowDelayedContextMenu
    0x00007ff6df2a5476 (Unity) GUIView::OnInputEvent
    0x00007ff6ded5da5a (Unity) GUIView::processInputEvent
    0x00007ff6df29e2ee (Unity) GUIView::DoPaint
    0x00007ff6df2a770d (Unity) GUIView::RepaintAll
    0x00007ff6dee2f9d7 (Unity) Application::TickTimer
    0x00007ff6df27b00a (Unity) MainMessageLoop
    0x00007ff6df27f8bb (Unity) WinMain
    0x00007ff6e05b28be (Unity) __scrt_common_main_seh
    0x00007ff932617034 (KERNEL32) BaseThreadInitThunk
    0x00007ff9330c2651 (ntdll) RtlUserThreadStart

    INCORRECT HASH: the same hash (-1474147694) for different dependency lists:
    source 1: System.Collections.Generic.HashSet`1[System.Object]
    source 2: System.Collections.Generic.HashSet`1[System.Object]
    0x00007ff6de3010cd (Unity) StackWalker::GetCurrentCallstack
    0x00007ff6de307da9 (Unity) StackWalker::ShowCallstack
    0x00007ff6df274e73 (Unity) GetStacktrace
    0x00007ff6df90a1cd (Unity) DebugStringToFile
    0x00007ff6dd46d372 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    0x0000023f942ea663 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    0x0000023f942ea57b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    0x0000023f942ea2c0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    0x0000023f942ea185 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    0x0000023ff9c79e9b (Mono JIT Code) [AddressableAssetSettings.cs:2587] UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContentImpl ()
    0x0000023ff9c79a8b (Mono JIT Code) [AddressableAssetSettings.cs:2554] UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent (UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult&)
    0x0000023ff9c7994b (Mono JIT Code) [AddressableAssetSettings.cs:2338] UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent ()
    0x0000023ff9c798db (Mono JIT Code) [AddressableAssetsSettingsGroupEditor.cs:365] UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildPlayerData ()
    0x0000023ff9c79693 (Mono JIT Code) [AddressableAssetsSettingsGroupEditor.cs:360] UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildScript (object)
    0x0000023ff9c6c543 (Mono JIT Code) UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    0x0000023ff9c6c42e (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object_object_int (object,intptr,intptr,intptr)
    0x00007ff8d17ae4b4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    0x00007ff8d16ee764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    0x00007ff8d16ee8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    0x00007ff6de2258c4 (Unity) scripting_method_invoke
    0x00007ff6de2204e4 (Unity) ScriptingInvocation::Invoke
    0x00007ff6dec99622 (Unity) CustomPopupMenuInterface::Execute
    0x00007ff6dec63ac0 (Unity) MenuController::ExecuteMenuItem
    0x00007ff6df294822 (Unity) ShowDelayedContextMenu
    0x00007ff6df2a5476 (Unity) GUIView::OnInputEvent
    0x00007ff6ded5da5a (Unity) GUIView::processInputEvent
    0x00007ff6df29e2ee (Unity) GUIView::DoPaint
    0x00007ff6df2a770d (Unity) GUIView::RepaintAll
    0x00007ff6dee2f9d7 (Unity) Application::TickTimer
    0x00007ff6df27b00a (Unity) MainMessageLoop
    0x00007ff6df27f8bb (Unity) WinMain
    0x00007ff6e05b28be (Unity) __scrt_common_main_seh
    0x00007ff932617034 (KERNEL32) BaseThreadInitThunk
    0x00007ff9330c2651 (ntdll) RtlUserThreadStart

    Addressable content build failure (duration : 0:00:00)
    0x00007ff6de3010cd (Unity) StackWalker::GetCurrentCallstack
    0x00007ff6de307da9 (Unity) StackWalker::ShowCallstack
    0x00007ff6df274e73 (Unity) GetStacktrace
    0x00007ff6df90a1cd (Unity) DebugStringToFile
    0x00007ff6dd46d372 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    0x0000023f942ea663 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    0x0000023f942ea57b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    0x0000023f942ea2c0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    0x0000023f942ea185 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    0x0000023ff9c79f3b (Mono JIT Code) [AddressableAssetSettings.cs:2587] UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContentImpl ()
    0x0000023ff9c79a8b (Mono JIT Code) [AddressableAssetSettings.cs:2554] UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent (UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult&)
    0x0000023ff9c7994b (Mono JIT Code) [AddressableAssetSettings.cs:2338] UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent ()
    0x0000023ff9c798db (Mono JIT Code) [AddressableAssetsSettingsGroupEditor.cs:365] UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildPlayerData ()
    0x0000023ff9c79693 (Mono JIT Code) [AddressableAssetsSettingsGroupEditor.cs:360] UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildScript (object)
    0x0000023ff9c6c543 (Mono JIT Code) UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    0x0000023ff9c6c42e (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object_object_int (object,intptr,intptr,intptr)
    0x00007ff8d17ae4b4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    0x00007ff8d16ee764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    0x00007ff8d16ee8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    0x00007ff6de2258c4 (Unity) scripting_method_invoke
    0x00007ff6de2204e4 (Unity) ScriptingInvocation::Invoke
    0x00007ff6dec99622 (Unity) CustomPopupMenuInterface::Execute
    0x00007ff6dec63ac0 (Unity) MenuController::ExecuteMenuItem
    0x00007ff6df294822 (Unity) ShowDelayedContextMenu
    0x00007ff6df2a5476 (Unity) GUIView::OnInputEvent
    0x00007ff6ded5da5a (Unity) GUIView::processInputEvent
    0x00007ff6df29e2ee (Unity) GUIView::DoPaint
    0x00007ff6df2a770d (Unity) GUIView::RepaintAll
    0x00007ff6dee2f9d7 (Unity) Application::TickTimer
    0x00007ff6df27b00a (Unity) MainMessageLoop
    0x00007ff6df27f8bb (Unity) WinMain
    0x00007ff6e05b28be (Unity) __scrt_common_main_seh
    0x00007ff932617034 (KERNEL32) BaseThreadInitThunk
    0x00007ff9330c2651 (ntdll) RtlUserThreadStart

    The project has a very high number of Addressables. The build process is working until the creation of the catalog.json file. All files are created (23.019 with 87,6 GB of data).

    The project has been succesfully building Addressables for iOS and Android. For OSX I tried to double the texture resolutions:
    - Color Textures: 512->1024
    - Normal Maps: 1024->2048

    The project will build all Addressables without the error with the lower texture resolution ( Normal Maps back to 1024 = 40,5 GB), so it looks like that the problem is dependent on the file sizes?

    Is there any idea how to solve the problem?

    Kind regards.
     
  2. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    349
  3. rab

    rab

    Joined:
    Nov 13, 2009
    Posts:
    98
    Hi Alan-Liu,

    thank you for the hint. Will try that and report back.

    Kind regards.
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hey all, I know this doesn't help much but I wanted to say I've actually requested some more information from our QA but I think this is actually going to be a bug in the build pipeline. Having threads like this definitely boosts the priority of the ticket, so I'll update accordingly.

    For what it's worth, I think that workaround sounds fine if it works for you.
     
  5. rab

    rab

    Joined:
    Nov 13, 2009
    Posts:
    98
    Hi davidla_unity,

    thanks for your post. I will try to use the workaround. My first problem is time - changing all assets will start a reimport which will take aprox. 4 hours. Building all addressables will also take 9-10 hours.

    So I decided to stay at the lower resolution and will try the higher res when the OSX version is out. The update of the addressables can be done if I get a correct hash.

    By the way: I hope to start the hash generation after the failed addressable build. The files are all created. Only the catalog file is not created. Is there a way to only start the catalog generation without building all addressables again (and wait for 9 hours)?

    Kind regards.
     
  6. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Ah, unfortunately no. The data in the catalog relies heavily on the data provided from the build. The only thing I can offer is that subsequent builds should be faster since they'll be able to take advantage of scriptable build pipelines build cache, but there's not much we can control there.
     
  7. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    349
    Hi, @davidla_unity

    I think my experiences about this issue may be helpful for dev team.

    After I encountered this issue, I changed GetHashCodeForEnumerable a few times:
    Code (CSharp):
    1. int hash = 5381;
    2. foreach (object o in set)
    3.     hash = hash * 5 + o.GetHashCode();
    4. return hash;
    Code (CSharp):
    1. int hash = 5381;
    2. foreach (object o in set)
    3.     hash = (hash << 5 + hash) + o.GetHashCode();
    4. return hash;
    5.  
    Code (CSharp):
    1. int hash = 5381;
    2. foreach (object o in set)
    3.     hash = (hash << 5 + hash) ^ o.GetHashCode();
    4. return hash;
    all these methods cannot work for our project.

    Currently, we're using HashCode:
    Code (CSharp):
    1. var hashCode = new HashCode();
    2. foreach (object o in set)
    3.     hashCode.Add(o.GetHashCode());
    4.  
    5. return hashCode.ToHashCode();
    Except it fails once in my local build, it works for our daily builds.

    Maybe a more robust method need to be implemented, rather than just being dependent on that hash method dosen't produce conflict results.
     
    davidla_unity likes this.
  8. einWikinger

    einWikinger

    Joined:
    Jul 30, 2013
    Posts:
    93
    Was there any progress on this issue? We've been suddenly struck by this problem as well (1.21.9).
     
    HoneyButterAlmond likes this.
  9. rab

    rab

    Joined:
    Nov 13, 2009
    Posts:
    98
    Hello einWikinger,

    I'm just dividing my project into one main project (containing logic, UI stuff) and some data projects holding the data. This seems to be the solution which will work with addressables - see hints here.

    Kind regards.
     
    einWikinger likes this.