Page MenuHome

Blender eats all memory when painting texture
Closed, ArchivedPublic


System Information
Ubuntu 16.04 x86_64, Nvidia GeForce GTX TITAN X (GM200)

Blender Version
Broken: 2.79RC1, the same in 2.78

When I try to paint texture on object in attached file, blender stucks and starts eating memory very fast.

Exact steps for others to reproduce the error
Try to paint texture at the center of the object in attached file. At the part with tiles texture (Ter Dlazba 2)



Event Timeline

confirm here: builds a8fbe99 6af7d7e

win 7x64 nvidia 1070.

One click to stroke and the memory goes 2 to 12 gb in a few seconds, and crash on 16 gb if i dont kill fast enough the aplication

And it seem that is because all the uv points are in the same place at (0 , 0)

after proper unwrapping seem to work fine.

The problem here is that UV maps have been scaled up extremely, which becomes visible if you zoom out inside the UV/Image Editor.

Painting on an unwrapped cube with uv maps scaled to 0 works fine, but scaling the UVs of the cube way up causes the same problem:

If I'm not mistaken, this happens: Because blender takes repetition (for tiled textures) into account by default, it iterates over a massive amount of pixels for each triangle that is being painted. The effect is the same as if you were painting on a very high-res texture.

Maybe not having blender freeze as a result of this (checking number of pixels it's about to iterate over) would be a solution, but I'm not certain this could be considered a bug in that case.

@Campbell Barton (campbellbarton) @Antony Riakiotakis (psy-fi)

Sergey Sharybin (sergey) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Sep 11 2017, 12:32 PM
Campbell Barton (campbellbarton) closed this task as Archived.EditedMar 21 2018, 8:22 AM

This is effectively zooming out and painting onto a large image (with tiling enabled).

There isn't a clear line when we can say paint system uses too much memory.

Besides rewriting painting to work completely differently, we could support pressing escape to cancel painting.

Currently users need to exercise some care not to paint in a way that paints onto entire high res images with a single click.

This is a TODO.