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
- The cursor moves into wrong place when renaming folder/asset
- Assertion error "(dx - width < padding) || (dy - height < padding)" when using Pack Preview
- [Memory Profiler] The EntryType.NativeAllocationSites_MemoryLabelIndex of snapshots only reports -1 or 0 instead of the MemLabel used for allocations made from any call site.
- [Vulkan] Artifacts appear in the Player when using Screen Space shadows with orthographic camera
- Errors OnGUIDepth changed & GUIUtility:ProcessEvent when opening Textures with Third Party App
Add comment