Search Issue Tracker
Duplicate
Votes
1
Found in
2017.1.0a4
Issue ID
896264
Regression
No
[Importers] Fatal Error when importing large assets and the system has run out of memory
TL; DR:
Drag & Drop 40 GB file to Unity will crash Unity. Maybe we should check if we have enough memory to load the file and throw an error if not? (instead of crashing)
1. Assuming the user has a project with files in it. In this case, my project had a folder with randomly generated text files (1000 files of 60-80 KB each for a total of 51 MB).
2. Have or create a very large file for testing purposes in Windows OS. In this case, I used a 40 GB randomly generated file (created with "fsutil file createnew filename length" command line)
3. From the Windows file browser, drag and drop into the project view of Unity (2017.1.0a4 (303f45914158))
Notice that Unity will freeze for an extended period of time.
Notice that the logs will inform the user that there isn't enough memory necessary for the allocation (notice that nothing informs the user about this issue):
-- DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 42949672992.
-- DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large allocation 42949672992.
4. After a certain time the file will correctly appear and the Unity editor will close without outputting a call stack or providing any indication of failure.
Expected behavior: Expectation here revolves around providing the user better moment to moment information/messaging and if crashing, providing the stack trace.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Add comment