Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2020.3.X, 2021.2.X
Votes
0
Found in
2020.3
2021.1
2021.2
2022.1
2022.1.0a3
Issue ID
1357761
Regression
No
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)
Notes:
- 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.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a13 on Mac.
The progress on the Windows issue can be tracked here: https://issuetracker.unity3d.com/product/unity/issues/guid/1378000
Resolution Note (fix version 2021.2):
Fixed in: 2021.2.1f1 on Mac
Resolution Note (fix version 2020.3):
Fixed in 2020.3.23f1
Resolution Note:
Fixed in 2021.1.28f1 on Mac