Search Issue Tracker
[Importers] Fatal Error when importing large assets and the system has run out of memory
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.
- Missing `localhost` in the `hosts` file configuration could cause the Unity Package Manager server to fail to start
- Wrong scaling in shadow mask scene view mode
- Type.GetField() works differently in IL2CPP from Mono
- Splitter resize cursors flicker on Linux and Windows
- Can't select sRGB color format for Render Texture on HDRP project