Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2020.3.X, 2021.2.X
On Mac preprocessed Lit.shader file stops mid-line when file size is near or more than 2GB
How to reproduce:
1. Create a new project
2. Install the "High Definition RP" package from the Package Manager (Window > Package Manager)
3. In the Project window select Packages/HDRP/Runtime/Materials/Lit/Lit.shader
4. In the inspector, enable "Preprocess only" and disable "Strip #line directives"
5. Hit the small triangle next to "Compile and show code" to expand the menu and select "All platforms"
6. Click "Compile and Show Code"
Expected result: There is a warning ("file too large to preprocess"), or the file ends with <stripped> at the end, or the file grows as big as needed and contains all data
Actual result: On Windows code randomly stops being printed mid-line, on Mac errors appear in the Console "Cannot write content to" and the file is empty
Reproducible with: 12.0.0 (2021.2.0a4, 2022.1.0a6)
Not reproducible with: 11.0.0 (2021.1.18f1, 2021.2.0a3), 10.6.0 (2020.3.17f1)
Could not test with: 2019.4.30f1 (option "Preprocess only" is missing)
- Seems to only happen when the preprocessed file is close to or above 2GB, on Windows this files' size is 2,097,153KB.
- By using “Current graphics device” and “Current build platform” options, instead of "All platforms", file size is smaller and code does not stop randomly.
- In the 11.0.0 version and below preprocessed "Lit.shader" is significantly smaller in size than in the 12.0.0 version and this issue does not happen.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Sprite Atlas remains loaded in memory after scene change or unloading assets
- [Vulkan] Release memory after deleting image
- Referred style sheet stays dirty after saving when using the UIBuilder
- The Height map Amplitude is not working when using HDRP/LayeredLit
- Crash on internalABP::BoxManager::prepareData when entering Play Mode