Page MenuHome

Blender freezes temporarily when editing material color and/or changing number values in sliders
Closed, ResolvedPublic

Description

System Information

Windows 10 Home Edition
Nvidia GeForce GTX 970 (4GB VRAM)
Intel i5 4590 3.4GHz
24GB RipJaw/Corsair Vengeance RAM (two 8GB sticks + two 4GB sticks)

Blender Version
Broken: 2.79 5bd8ac9

Short description of error
Blender freezes temporarily when interacting with ANY value slider (bevel modifier width, subdivision level, mean bevel width, location, etc) or the material color picker but only after not using the sliders for roughly10-15 minutes or more. Basically, it will freeze once, and the length that Blender isn't responsive varies anywhere from seconds to whole minutes, and then after that point, I can interact with any slider without any problems UNLESS I don't touch them again for another 10-15 minutes.

Note: I have tested this on my 2015 macbook pro using the same files, blender version, and settings. While working in Blender for 30+ minutes on my laptop, it didn't stutter or freeze once.

Exact steps for others to reproduce the error

  • Open the .blend file and work on the piece in any way you want (boolean objects, add loop cuts, extrude, add subdiv levels, whatever your heart desires for a few minutes. (I can be doing anything beforehand and it will still freeze regardless)
  • After roughly 10-15+ minutes attempt to change any value slider or create a new material and change the color of it (I typically experience it with the bevel width modifier slider or the edge bevel weight but it happens regardless of what slider I use)
  • At this point, Blender experiences the hiccup and freezes here. It might freeze for a second or a few minutes. The time it freezes varies based on how much time has gone by since I've last interacted with the value slider/material color picker.

Details

Type
Bug

Event Timeline

Sergey Sharybin (sergey) triaged this task as Needs Information from User priority.Oct 16 2017, 11:10 AM

It is not very efficient to spend so much time trying to reproduce bug which might not be reproducable on other machines even. Need to narrow the scope down.

Guess is that it's related on memory consumption, which might be kicking parts of Blender to swap. To confirm this theory:

  • Check memory usage when Blender starts hicking up for you
  • Check if disabling global undo / reducing number of global undo steps / setting memory limit for undo stack (User Preferences -> Editing) affects on the issue.

Hi.
I think this thread in BA forum is related (just in case developers can find some pattern there):
https://blenderartists.org/forum/showthread.php?438429-2-79-slow-performance-on-Material-drop-down

I must dig some time in this issue, but I had the same problem too. I was told to try using Triple Buffer for Window Draw Method (User Preferences > System). Well it's much better now! I use Windows 8.1, so isn't a Win10 exclusive problem.

What i found until now is I use "Automatic" for Window Draw Method (which is de default value for everyone):
Blender strangely starts to use A LOT of memory from RAM while I work. I start noticing when my professional work starts to be someway complex (with various objects, textures, etc.). If I stay quiet and do nothing the memory usage is about 2GB (in my particular case). When i try to do something like changing UV mapping in Material mode Blender uses 9 or 11 GB of memory instantly and freeze. When memory usage drop it's someway operational but it can take 1min or much more! But it's "operational moment" is short if i insist to make changes; suddenly memory grows more than 300% again, Blender freezes, and I must wait to be stable again. It can be a nightmare. But since I use the solution described above, the situation is a lot better. But I still need to view the problem while I work (i'm in the middle of a profissional work). If I find something new I'll come back.

Thanks for the feedback so far everyone. I added a memory limit (my global undo was already at the default). I wasn't sure what value to put it around at so I just plopped it at 20 but Blender was still freezing. I'll check out the triple buffer and see if that works. Strangely, I noticed Blender has trouble regardless of if I have a complex scene or not. I could have 100k or 1k verts and the problem persists regardless. Just to see if my HDD was the cause of the problem, I reinstalled Blender on an external SSD and I haven't noticed any freezing yet after using it for about an hour or 2 but I'll keep the triple buffer option selected and reinstall on my hard drive to see if that solves the issue!

I have been experiencing this too on all newly started projects in 2.79. Blender will freeze for a few minutes sometime as much as 15 minutes. Sometimes I will just kill it and open it back to get working again. But it eventually lags fairly quickly again. Form me, I have notice Blender is having a hard time regenerating/ compiling material previews. When this happens Bender will freeze. So I have to wait for it to do its thing.

Blender 2.79 5bd8ac9
Windows 7 x64
dual E5 2660 v3's (2.6 ghz) (40 Threads) Z10PE D8 WS, 96 gigs of ram win 7 x64 GTX 970
GTX driver 22.21.13.8250

I've tried using the Triple Buffer for Window Draw Method but it still freezes for me. And moving Blender to another storage device didn't work too well either. I'm wondering if it could be a hardware issue? I've tried using a fresh install of Blender with no add-ons or tweaked settings and it still hangs up on me. I know my mobo and cpu are somewhere between 3 and 4 years old and while they work fine for just about everything else, I have been pushing them pretty hard over the last 10-11 months with a lot of 4k map baking and rendering.

Mathew,

it is not your computer. Look at the specs of my machine. I am using same work flow that I was using in 2.78. I did not have any of these issues with 2.78a.

I updated my video driver today. Still hanging.

Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Normal.Oct 31 2017, 4:03 PM

The same is happening here. The Task Manager shows 100% CPU usage for Blender and less than 60% total RAM is in use. It happened with material preview a few times and sometimes it freezes out of nowhere.

Blender 2.79 5bd8ac9

Windows 10 Home
NVidea GTX 1050 mobile (4GB)
Intel i5 7300HQ @2.50GHz
8 GB RAM
All drivers up-to-date

Quick little update in-case anyone is still looking for an answer. Updating to the latest Windows 10 feature update seems to have fixed my issue with Blender freezing. I've been using it for a little while now and haven't experienced any issues at all. I even rolled back (to try and fix another unrelated problem) temporarily and the issue came back. I guess the update fixed whatever memory issue my computer was having with Blender.

I have the same effect with the material panel of the blender properties. About 50% to 60% RAM consuming with the latest build Blender 2.79 e59cf13b8c4

With the official blender 2.79 5bd8ac9abfa i have a lag of blender with a slight memory consumption (memory sinusidal jumps)

while about 10 seconds (attachment), after this time blender works well.

GNU/Linux - Manjaro 16.08 64bit
NVidia GTX Titan Z (12GB)
Intel i7 @3.20GHz
16 GB RAM
Driver 370.28

Same here. Noticed it since 2.79. Updated to latest win10 update. enabled triple buffer. None of that helps.
I always suspected it had something to do with the new "principled bdsf" shader. Cause even without textures it can slow down the material preview drop down 10s-1m once you have a few of them in your scene.
The worst is when I'm using a few 2k or 4k textures. Every single time blender needs to preview a texture or material icon it lags 30s-1m easily.
Although personally when this happens I don't see a significant spike in processor or mem usage in the task manager. (but I have a lot of ram.)

Win 10 Home
Nvidia Feforce GTX 1080
Intel Core i7-6800K CPU @ 3.40GHz
64GB RAM

The problem keeps happening, even after the last Windows updates...

A screenshot showing task manager when Blender froze:

I can confirm this is still happening. Blender freezes when the material dropdown is opened, and the memory usage continues to climb long after the drop down is closed. Very unusual behavior. Triple buffer does nothing to remedy it.

Windows 8.1 Home 64 bit

Nvidia Geforce GTX 970

Intel Core i7-5930K CPU @ 3.5 GHz

32 GB RAM

Thanks for looking into this.

I haven't been able to reproduce any freezing Blender so far, and there's a lot of issues mixed together here. Does anyone have exact steps to reproduce the freezing, for example "open this .blend file, open material dropdown, Blender locks up for X minutes.". Does this freezing happen with both CPU and GPU rendering, or only one of the two? Is Blender completely not reacting when frozen, or only very slow?

Some notes:

  • While Blender renders material previews, it is expected to take up CPU usage and increase memory usage, just like it would while rendering anything else. What is not expected:
    • Blender freezing while it is doing this. Some operations may become slower, but normally not massively slower.
    • Memory usage being permanently increased after it's done, due to a memory leak. However note that the task manager is not a reliable indicator of actual memory usage, since Blender might free the memory while the operating system may only reclaim it later when it needs it.
  • There may be a bug where Blender is unnecessarily re-rendering a lot of material previews, maybe losing them on file save, file load, undo, etc.
  • The window draw method is very unlikely to be related to this, probably there is some randomness to the bug that makes it seem like it had an affect. On Windows choosing Automatic will actually just use Triple Buffer, so it should make zero difference.

Ok, I have noticed that using undo will lose all the material previews, which I think explains at least why it is re-rendering a lot of material previews. That still doesn't explain why Blender would freeze though.

@Bastien Montagne (mont29), previews started getting lost on undo after rBdc26171.

Can we just revert this? In the commit you mention that undo memory usage of previews was not critical, and that's what I expect if the undo system is working correctly, since each step should only store previews that have changed. Re-rendering all previews in the scene is very expensive (including loading all image textures used by materials), even when it doesn't freeze Blender.

Problem with keeping previews in undo steps is that often it led them to be out of sync iirc… But if you really think re-rendering them at each undo/redo step is worse, I don’t mind the commit to be reverted either.

Previews going out of sync is not great, but this is a more serious issue for production files with lots of materials.

Can anyone help us to reproduce this issue?

Does anyone have exact steps to reproduce the freezing, for example "open this .blend file, open material dropdown, Blender locks up for X minutes.". Does this freezing happen with both CPU and GPU rendering, or only one of the two? Is Blender completely not reacting when frozen, or only very slow?

Also, it would be useful to test this this happens with factory settings, in case there is some addon or other setting that is causing problems.

Also attaching the system-info.txt generated from the Help> Save System Info menu by dragging and dropping the whole .txt file into the comment field would provide information on add-ons enabled and be helpful to single out a possible culprit.

For some further reading about how to attach files to reports check the link here:
https://wiki.blender.org/index.php/Dev:Doc/Process/Bug_Reports (under the Appending files to the report section)

Sorry I haven't been able to test with factory settings at present, as I'm in the middle of working on a project; however, here is the system info file. I have about 68 materials in this project, and I add a new cube, click the "Browse Material" button to select a material I already have, and Blender will choke to a crawl for about 2 minutes as the 68 previews build.

Thanks for your time in looking into this.

I am certain like others here that this is linked to the 'Principled BDSF' shader. When using this shader I find drop down menus in the node editor become very laggy, however the worst issues are with slider adjustments in the materials window. If I make a complete 0 - 100% change then Blender stops working and has to close and these results are pretty consistent.

Windows 10 latest update - Blender 2.79 - intel 4790K - GTX 970 4GB - 32GB RAM

Just to repeat, we are not able to reproduce this issue currently. This is the information we are looking for:

Does anyone have exact steps to reproduce the freezing, for example "open this .blend file, open material dropdown, Blender locks up for X minutes.". Does this freezing happen with both CPU and GPU rendering, or only one of the two? Is Blender completely not reacting when frozen, or only very slow?

Hi Brecht

I can't reproduce the bug with a new file but i have try to do it... Whithout success !!
I made this study model
for my studients and i can reproduce the lag of the shader panel !
I'm sorry for this huge file ... But it is necessary

On the official stable version of blender 2.79 5bd8ac9abfa you can see memory chopped
On the version of blender-2.79-e59cf13b8c4 you will have 60% memory consumption ... !!!!

To reproduce the bug of this scene :

  • Check Ctrl + Top ARROW
  • Select the body object of the car name "Fiat_Caisse" because it have a lot of shaders
  • Choose Shader panel of the properties panel and at this time the system will be laggy and calculate all of the shader preview one by one !!! and you can see the bug correctly

Hope my model will help you.
A lot of courage for you, to resolve this bug.

Damien

Thanks a lot for the test file, it doesn't matter if it's big or not created from scratch.

I haven't encountered anything that I would describe as freezing, but the previews are rendering very slow in this file. The slow rendering here seems to be due to an an 8K environment texture in the world, which is being loaded for every preview render.

The freezing could perhaps be explained if there are heavy packed image files that Cycles is loading from Blender. Can you test if the freezing still happens in these two scenarios:

  • All image files unpacked, by disabling File > External Data > Automatically Pack Into .blend and then using File > External Data > Unpack All into Files
  • Removing the Environment Texture from the world

Can anyone else confirm if the existence of packed files (in the world or elsewhere) or a heavy world texture is having an influence here? Note that the fact that all previews will re-render is expected at this point. We have most likely fixed that cause of them going missing now, but they will still need to be re-rerendered in existing files. It just shouldn't be that slow or causing freezes.

You are welcome

I test your 2 scenarios

  • I uncheck Automatically Pack into blend and unpack All into Files the problem of freezing will be here again.
  • I removed All of the textures and this is resolve the freezing... Yes we have it !!!

I'm on GNU/Linux environment and 8 month ago i had some freezing when i check the Browsed image to be linked (button at the left of buttton + New) on UV/Images Editor
Anymay, i think it is because the previews will be calculated with the 8k hdr map.
I think for previews ; this will be better to calculate it with a low resolution map !

Thanks for your help !
Hope this freezing and 60% memory consumption will be resolved.

Best,

Damien

With the latest fix we will now compute the icons previews with a fixed background color. It's not possible to load low resolution map for a .hdr file, we'd have to load in the full resolution anyway and then scale it down which would be slow too.

I'm not really convinced that the world texture explains it entirely, because it's been working that way since the beginning. So for anyone, if you had this issue please test's tomorrow's build and let me know if there is still problem, and if world or packed textures have an influence. If there's still a problem, the more repro .blend files the faster we can figure out what's going on.
https://builder.blender.org/download/

Thanks Damien for helping out with testing this situation. I have one 5000 x 2500 .jpg image and one 5000 x 2500 .hdr image in the scene. These 2 textures represent only 2 of the 68 materials. A portion of the other materials use multiple 2K textures. So it would seem then, that even 2K textures cause Blender to slow to a crawl, as it is calculating the tiny previews at full resolution. If there was a way to calculate at lower resolution (as Damien mentioned) or to somehow locally save the tiny preview after it's calculated once so it will not constantly go offline would be great.

Thanks Brecht for looking into this issue.

EDIT: I think the fixed background color is a great idea. This would only affect the small material icons and not the actual material preview window, correct?

Yes, it only affects the small material icons.

Sounds good; I didn't even realize the icons were using the world texture, but I just checked and sure enough, the icons for the chrome-like materials don't even represent their larger material previews at all (since my scene texture is tinted). So basically, either the solid color method or, if possible, just use the same preview image as in the larger material preview (with the gray checkered background for reflections). This would also help with visual consistency.

Just to repeat, we are not able to reproduce this issue currently. This is the information we are looking for:

Does anyone have exact steps to reproduce the freezing, for example "open this .blend file, open material dropdown, Blender locks up for X minutes.". Does this freezing happen with both CPU and GPU rendering, or only one of the two? Is Blender completely not reacting when frozen, or only very slow?

Hi,

Just to add in case it helps, before Windows closes blender the application freezes and this is very frequent whilst using an 8k environment texture. However, I tested this scenario with ver 2.79a and didnt encounter the issue.

Hi Brecht

To test your latest update, on the https://builder.blender.org/download/ can i have a feb 13 on GNU/Linux 64bits latest daily build because at this time only GNU/Linux 64Bits will be on feb 12
Thank you in advance

Best,

Wow, wow, wow!!! I cannot thank you guys enough! I just tried the new Blender 2.79 d640ce4 build, and it is FLAWLESS. All 68 material previews load nearly instantly... it's as if I'm running a new super computer! Not only that, but the small previews now accurately reflect the larger previews without sacrificing anything. It's incredible!

Thank you Brecht and the Blender team!!

-Adam Janz

Brecht Van Lommel (brecht) claimed this task.

Let's consider this resolved for now, if further issues are found please open a new bug report with .blend to repro. This fix will be in 2.79a.