Search Unity

Building fails - Copying assembly [..] TextMeshPro.dll failed

Discussion in 'Editor & General Support' started by DerWoDaSo, Jun 3, 2020.

  1. DerWoDaSo

    DerWoDaSo

    Joined:
    May 25, 2009
    Posts:
    131
    Hi everbody,

    When creating AssetBundles via script we often get the following error message:
    ultimately leading to: Build Failed - Errors during build process, check logs for details.

    When does it happen:
    Building the bundles via script, triggered from a custom menu but also via CLI (more or less same script):
    This seems to be not related to the target (happens for Windows builds, but also all consoles).

    Which Unity version:
    It happened back on Unity 2018.2.??, but currently we are at Unity 2018.4.14f1. Upgrading to 2019 is unfortunately not an immediate option.

    How often does it happen:
    Seems random, about 30% of our builds fail because of that.

    What platform does this occur on:
    We only made builds from Windows so far, but here it happened on a wide range of computers, virtual systems on a build server as well as our regular workstations - our own and also at the porting studio we worked with.

    As this issue (or a similar one) seems to happen to other people too, we obviously looked at the suggested solutions. In most cases its either "disable your antivirus" or "check for malware". We unsuccessfully tried both but as mentioned before it also happens on a wide range of machines, so its rather unlikely that they are all affected by the same software/malware. Even disabling the Windows own virus scanner didn't help...

    Any help is highly appreachated!

    Jan


    A bit more context from the log files:
     
  2. DerWoDaSo

    DerWoDaSo

    Joined:
    May 25, 2009
    Posts:
    131
    A small update on this:

    I added PostProcessing from the PackageManager and now the error message is replaced with:

    Copying assembly from 'Temp/Unity.Postprocessing.Runtime.dll' to 'Library/ScriptAssemblies/Unity.Postprocessing.Runtime.dll' failed


    So it's definitely not connected to TMPro but a more generic problem.
     
  3. DerWoDaSo

    DerWoDaSo

    Joined:
    May 25, 2009
    Posts:
    131
    Ok another small update... seems like I was wrong above. I now get both error messages. The whole build process is the following:
    1. Preparing data (custom atlas maps & more)
    2. Building AssetBundles with BuildPipeline.BuildAssetBundles()
    3. Copy AssetBundles to StreamingAssets folder
    4. Save AssetDatabase
    5. Check assetBundles and some other resources
    6. UnloadUnusedAssetsImmediate to free up memory from previous steps
    7. Build player with BuildPipeline.BuildPlayer(buildPlayerOptions);
      -> Error building Player because scripts have compile errors in the editor

    Below a part of the log file with some commends:


    // Step 1
    [..]
    // During step 2:

    - Starting compile Library/ScriptAssemblies/Megagon.Framework.Security.dll
    - Starting compile Library/ScriptAssemblies/UnityStandardAssets.dll
    - Finished compile Library/ScriptAssemblies/Unity.Postprocessing.Runtime.dll
    Symbols will be read from Temp\Unity.Postprocessing.Runtime.pdb
    Script Module: Unity.Postprocessing.Runtime.dll
    Pass: 0 took 48 milliseconds
    Pass: 1 took 2 milliseconds
    - Finished compile Library/ScriptAssemblies/Unity.TextMeshPro.dll
    Symbols will be read from Temp\Unity.TextMeshPro.pdb
    Script Module: Unity.TextMeshPro.dll
    Pass: 0 took 163 milliseconds
    Pass: 1 took 77 milliseconds
    Copying assembly from 'Temp/Unity.Postprocessing.Runtime.dll' to 'Library/ScriptAssemblies/Unity.Postprocessing.Runtime.dll' failed
    (Filename: Library/ScriptAssemblies/Unity.Postprocessing.Runtime.dll Line: -1)
    Copying assembly from 'Temp/Unity.TextMeshPro.dll' to 'Library/ScriptAssemblies/Unity.TextMeshPro.dll' failed
    (Filename: Library/ScriptAssemblies/Unity.TextMeshPro.dll Line: -1)

    DisplayProgressbar: Building AssetBundle
    ***Player size statistics***
    Total compressed size 3.1 KB. Total uncompressed size 7.1 KB.
    Unloading 47 Unused Serialized files (Serialized files now loaded: 0)
    System memory in use before: 448.0 MB.
    System memory in use after: 449.0 MB.
    Unloading 47 unused Assets to reduce memory usage. Loaded Objects now: 12647.
    Total: 71.984170 ms (FindLiveObjects: 3.672490 ms CreateObjectMapping: 1.026320 ms MarkObjects: 67.138810 ms DeleteObjects: 0.115020 ms)
    -------------------------------------------------------------------------------
    Bundle Name: ui
    Compressed Size:19.5 mb
    Uncompressed usage by category (Percentages based on user generated assets only):
    // here follows a list of all the asset bundles with size statistics...

    [..]

    // Step 3-6
    Copy AssetBundles to StreamingAssets folder...
    Saving AssetDatabase...
    DisplayProgressbar: Pre-Build Check...
    Pre-Build: Checking AssetBundles...
    Pre-Build: Checking Terrain assets...

    [..]

    // Step 7:
    Building target 'XboxOne' to C:/Jenkins/LMD_Workspace/Build/X1/LMD_XboxOne-MasterBuild_XboxOne...
    Development Build: False
    Hashing assets (1 files)... 0.032 seconds
    file read: 0.008 seconds (12.149 MB)
    wait for write: 0.000 seconds (I/O thread blocked by consumer, aka CPU bound)
    wait for read: 0.017 seconds (CPUT thread waiting for I/O thread, aka disk bound)
    hash: 0.014 seconds

    Updating Assets/ResourceLibrary/Audio/fmod/alps.bytes - GUID: 63ab222f38073c945a5b1bd3a805f6d4...
    done. [Time: 89.363580 ms]
    Script Compilation Pipeline Post Process Assets time: 0.000185s
    Assembly Updater Post Process Assets time: 0.000220s
    Refreshing native plugins compatible for Editor in 3.99 ms, found 9 plugins.
    Preloading 1 native plugins for Editor in 0.43 ms.
    Hashing assets (1 files)... 0.041 seconds
    file read: 0.011 seconds (15.460 MB)
    wait for write: 0.004 seconds (I/O thread blocked by consumer, aka CPU bound)
    wait for read: 0.016 seconds (CPUT thread waiting for I/O thread, aka disk bound)
    hash: 0.023 seconds
    Updating Assets/ResourceLibrary/Audio/fmod/autumn.bytes - GUID: fe222925707933f4cbd5a3a7d68b55ef...
    done. [Time: 112.410780 ms]

    // here follow all the other FMOD banks which seem to get updates automatically again
    [ .. ]

    Script Compilation Pipeline Post Process Assets time: 0.000043s
    Assembly Updater Post Process Assets time: 0.000168s
    Refreshing native plugins compatible for Editor in 4.05 ms, found 9 plugins.
    Preloading 1 native plugins for Editor in 0.40 ms.
    Script Compilation Pipeline Post Process Assets time: 0.000027s
    Assembly Updater Post Process Assets time: 0.000196s
    Updating ProjectSettings/ProjectSettings.asset - GUID: 00000000000000004000000000000000...
    done. [Time: 24.652580 ms]
    Updating ProjectSettings/UnityConnectSettings.asset - GUID: 0000000000000000a100000000000000...
    done. [Time: 10.163050 ms]
    Script Compilation Pipeline Post Process Assets time: 0.000032s
    Assembly Updater Post Process Assets time: 0.000340s
    Refreshing native plugins compatible for Editor in 4.13 ms, found 9 plugins.
    Preloading 1 native plugins for Editor in 0.31 ms.
    DisplayProgressNotification: Build Failed
    Error building Player because scripts have compile errors in the editor
     
  4. DerWoDaSo

    DerWoDaSo

    Joined:
    May 25, 2009
    Posts:
    131
    Anyone? And hints what I could try? Kind of desperate here...