Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2019.4.X, 2020.3.X, 2021.1.X

Votes

9

Found in

2020.2.2f1

2021.1.0a3

Issue ID

1317744

Regression

Yes

Shader error db grows on each build

Shader System

-

Library/ShaderCache.db increases on every build, potentially running out of disk space eventually if the project contains lots of shader warnings.

Repro steps:
1. Create a new URP template project
2. Switch to Android target
3. Build the project and check the ShaderCache.db size
4. Rebuild the project and check that ShaderCache.db size has about doubled

NOTE: Windows explorer might not show the correct size right away. remember to refresh the window or check with right-click->preperties

  1. Response avatar

    Resolution Note (fix version 2021.2):

    Fixed in 2021.2.0a9

  2. Response avatar

    Resolution Note (fix version 2021.1):

    Fixed in 2021.1.0b12

  3. Response avatar

    Resolution Note (fix version 2020.3):

    Fixed in 2020.3.1f1

  4. Response avatar

    Resolution Note (fix version 2019.4):

    Fixed in 2019.4.29f1

Comments (10)

  1. F6eb78bfd950f0f1b09a05a97907d866?d=mm

    fengjingmeng

    Apr 06, 2021 12:33

    Will it be fixed in 2020.3.0f1???

  2. B97c03cb8b5946af8ed337e9f759bc4e?d=mm

    tildebox

    Mar 28, 2021 11:48

    not fixed in 2021.2.6 (Android), the file is 19.12 GB big

  3. 25feb717d960f28e086c6f04641e1d3e?d=mm

    Picmo

    Mar 24, 2021 13:05

    From my testing, it is much, much better in 2020.3.1. It's still grows a little though, so I would say it's not completely fixed compared to 2020.1 and earlier.

    Using the default URP test scene, this is how things now stack up:

    - 2019.4 - before build: 3kb, after a mobile build: 3kb.
    - 2020.1 - before build: 12kb, after a mobile build: 12kb.
    - 2020.2 - before build: 24kb, after a mobile build: 750MB.
    - 2020.3 - before build: 24kb, after a mobile build: 3MB.

    What is it like on a larger project?

    Cheers
    Phil

  4. 4ce1c200443774bdf1a8fc5ca7e95ea0?d=mm

    eblavender

    Mar 23, 2021 10:40

    I can confirm this is now fixed in 2020.3.1f1

  5. 5fdc1599f5d273d394e0ee78b2fcabfa?d=mm

    hipoldo

    Mar 21, 2021 09:37

    the same problem on 2020.3.0f1.21
    it makes it impossible to work with unity.

  6. 25feb717d960f28e086c6f04641e1d3e?d=mm

    Picmo

    Mar 14, 2021 20:46

    My error, the bug is not marked as 'fixed' for 2020.3 as I mistakenly thought, it is actually listed under 'known issues'. Sorry for the noise, looking forward to the fix arriving soon.

  7. 25feb717d960f28e086c6f04641e1d3e?d=mm

    Picmo

    Mar 13, 2021 12:34

    This is reported as fixed in Unity 2020.3. Having just tested a mobile build in this version, it appears not to be fixed.

    - 2019.4 - before build: 3kb, after a mobile build: 3kb.
    - 2020.1 - before build: 12kb, after a mobile build: 12kb.
    - 2020.3 - before build: 24kb, after a mobile build: 750MB.

    Can this regression be re-opened please?

  8. C7fd6e3230735e67690149ac05df8c29?d=mm

    orville_redenbacher

    Mar 04, 2021 17:43

    To add to this, in addition to your machine running out of space, Unity will quickly become unusable as ShaderCache.db grows. Project and scene loading times are heavily impacted, taking upwards of 20 minutes to complete when ShaderCache grows to ~50GB.

  9. 25feb717d960f28e086c6f04641e1d3e?d=mm

    Picmo

    Mar 03, 2021 14:02

    Using only the default/sample URP project, this is what happens on two separate test machines:

    - 2019.4 - before build: 3kb, after a mobile build: 3kb.
    - 2020.1 - before build: 12kb, after a mobile build: 12kb.
    - 2020.2 - before build: 24kb, after a mobile build: 750MB.

    So the regression has evident in 2020.2 or above (2019.4.x and 2020.1.x did not have this issue).

  10. 998bc2070f7969bb1ebd036d518f6f02?d=mm

    Shuyin76

    Feb 27, 2021 10:10

    Same problem on Unity 2021.1.0b4.1811.
    It seems other people had the same bug with the android compiler and not the windows one...
    (This is the case for me at least)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.