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.
- Mesh.GetIndexBuffer() requires Mesh's 'Read/Write' flag to be enabled to get its index buffer data in Builds
- [Backport] [Sprite Atlas V1] Editor crashes when calling SpriteAtlasUtility.PackAtlases
- Deterministic builds have different files when built from the same project
- PlayerBuildInterface.ExtraTypesProvider no longer provides types to IL2CPP
- Touch input is reset in Device Simulator when Unity Remote is killed