Search Unity

[1.1.3] Player crashes when project contains Editor-only Resources

Discussion in 'Addressables' started by stefankohl, Jun 19, 2019.

  1. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
    Since 1.1.3 my build crashes immediately at startup during the initialization of the Addressable system. This is caused by assets within Resources folders which are serializations of types that use Editor-only assemblies. While this asset management technique is undoubtedly questionable, it is used by many third-party solutions. In my case, the "FMODStudioCache" asset of FMOD is the reason for the app to crash. Although it is never loaded during runtime, it is included in builds and now gets touched during initialization. I could only resolve this issue by deactivating the Resources folders from the Built-In group.
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Thanks for the info, we're working on a fix.
     
    stefankohl and David_GameDev like this.
  3. FKInno

    FKInno

    Joined:
    Dec 13, 2017
    Posts:
    7
    I still get an error with 1.1.4-preview for this problem

    FileNotFoundException: Could not load file or assembly 'Assembly-CSharp-Editor-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies
    System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, System.Boolean refonly) (at <00000000000000000000000000000000>:0)
    System.AppDomain.Load (System.String assemblyString) (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.Util.LRUCacheAllocationStrategy.Release (System.Int32 typeHash, System.Object obj) (at <00000000000000000000000000000000>:0)
    UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData.CreateLocator (System.String providerSuffix) (at <00000000000000000000000000000000>:0)
    UnityEngine.AddressableAssets.Initialization.InitializationOperation.OnCatalogDataLoaded (UnityEngine.AddressableAssets.AddressablesImpl addressables, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] op, System.String providerSuffix) (at <00000000000000000000000000000000>:0)
    UnityEngine.AddressableAssets.Initialization.InitializationOperation+<>c__DisplayClass10_0.<LoadContentCatalog>b__0 (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] res) (at <00000000000000000000000000000000>:0)
    System.Func`2[T,TResult].Invoke (T arg) (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.ChainOperation`2[TObject,TObjectDependency].Execute () (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].InvokeExecute () (at <00000000000000000000000000000000>:0)
    System.Action`1[T].Invoke (T obj) (at <00000000000000000000000000000000>:0)
    DelegateList`1[T].Invoke (T res) (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].InvokeCompletionEvent () (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].Complete (TObject result, System.Boolean success, System.String errorMsg) (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation`1[TObject].ProviderCompleted[T] (T result, System.Boolean status, System.Exception e) (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation`1[TObject].ProviderCompleted[T] (T result, System.Boolean status, System.Exception e) (at <00000000000000000000000000000000>:0)
    UnityEngine.AddressableAssets.ResourceProviders.ContentCatalogProvider+InternalOp.OnCatalogLoaded (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] op) (at <00000000000000000000000000000000>:0)
    System.Action`1[T].Invoke (T obj) (at <00000000000000000000000000000000>:0)
    DelegateList`1[T].Invoke (T res) (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].InvokeCompletionEvent () (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].Complete (TObject result, System.Boolean success, System.String errorMsg) (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation`1[TObject].ProviderCompleted[T] (T result, System.Boolean status, System.Exception e) (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation`1[TObject].ProviderCompleted[T] (T result, System.Boolean status, System.Exception e) (at <00000000000000000000000000000000>:0)
    UnityEngine.ResourceManagement.ResourceProviders.TextDataProvider+InternalOp.RequestOperation_completed (UnityEngine.AsyncOperation op) (at <00000000000000000000000000000000>:0)
    System.Action`1[T].Invoke (T obj) (at <00000000000000000000000000000000>:0)
    UnityEngine.AsyncOperation.InvokeCompletionEvent () (at <00000000000000000000000000000000>:0)
    System.Action`1:Invoke(T)
    DelegateList`1:Invoke(T)
    System.Action`1:Invoke(T)
    DelegateList`1:Invoke(T)
    UnityEngine.AsyncOperation:InvokeCompletionEvent()
     
  4. FKInno

    FKInno

    Joined:
    Dec 13, 2017
    Posts:
    7
    This is NOT fixed in 1.1.5
     
  5. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    I've been trying to reproduce this and can't with what info I have. Please file a bug against unity with a sample project, or post a link to a sample project here. This is definitely something I want to get resolved quickly, so if you can help us reproduce it, that would be great.
     
  6. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    never mind. i found the repro. got it cleaned up for the next release.
     
    FKInno likes this.
  7. granitrocky

    granitrocky

    Joined:
    Aug 26, 2017
    Posts:
    2
    You mention disabling the Resource folder from "Built In". How do you go about doing that? I can't find anything in the UI.
     
  8. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
    In the Addressables window, you will have to select the "Built In Data" group (first entry) to display its properties in the Inspector. You can then uncheck the "Include Resources Folders" option of the PlayerDataGroupSchema in the Inspector.
     
  9. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Exactly. Though that group could be called "Player Data" if you've been using Addressables for a while. That was the name we used once upon a time.