Page MenuHome

Blender crashes due to high memory usage when batch-generating material previews
Closed, ArchivedPublic

Description

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.94

Blender Version
Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: rBbcfdb14560e7
Worked: None

Short description of error
When batch generating material previews for large asset libraries, blender doesn't unload the data from the previous material and it leads to a memory crash.

Exact steps for others to reproduce the error
Import high amounts of materials into any project totaling up to more than your system's memory and select File > Data Previews > Batch generate previews > [file with large amounts of high res PBR materials]

Event Timeline

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Needs Information from User.Sep 20 2022, 8:29 PM

Did you check if it's not some specific material that requires a lot of memory?

And what makes a material consume a lot of memory to cause this crash? Complexity to compile or HD textures?

We have a report of a regression where a material consumes a lot of memory to compile. See T99120: Regression: Crash due to high memory usage when compiling Eevee shaders on AMD GPUs.

Blender has a garbage collector that clears the cache of unused textures every 1 minute. Could it be that the fact that too many textures are loaded in a short time is what is causing the crash?

I tried to replicate the problem by generating previews for this file:

If two of the materials in this file were compiled at the same time, Blender would crash in my PC. But OpenGL itself limits the number of shaders compiled at the same time.

For me it's not yet clear what the steps are to reproduce the issue, confirm it and forward it to the developers.

It is also possible that the problem is not even in the Batch generate previews.

Thanks for the report, but it does not contain all the requested information, which is required for us to investigate the issue.

Please submit a new report and carefully follow the instructions. Be sure to provide Blender version, the last Blender version which worked, and a .blend file with exact steps to reproduce the problem.

A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports