Material viewport mode crash on node with more than 64 outputs.
Closed, ResolvedPublic

Description

System Information
Windows 10 x64 home on Nvidia GTX 1070 with latest WHQL drivers.

Blender Version
2.78c

Short description of error
"Material" viewport mode will crash if any if material group nodes contains more than 64 inputs/outputs. "Render" viewport mode will work fine though...

Exact steps for others to reproduce the error

  1. Open attached file.
  2. Switch viewport mode to "Material".
  3. [[ http://www.techkind.org/Blender/[Bugreports]_64_outputs.png | In next 1-10 seconds Blender will crash ]].

P.S. It may sounds funny & not practical limitation but not for me - in my "Real Materials" series those tricky collapseable sections with options sliders allows to keep things simple and use more than 64 material parameters...

Details

Type
Bug
Sergey Sharybin (sergey) triaged this task as "Confirmed" priority.Wed, Mar 22, 5:25 PM
Sergey Sharybin (sergey) claimed this task.

The issue is coming from hardcoded MAX_SOCKET set to 64. I've tried to remove such a static limit, but it's not so trivial within the current nodes design, especially for the texture nodes. I think it is safe to bump this constant to 512. This will only be ~16K extra stack memory usage per thread during evaluation which is really small for the modern systems.

@Bastien Montagne (mont29), do you have any string opinion here?

The issue is coming from hardcoded MAX_SOCKET set to 64. I've tried to remove such a static limit, but it's not so trivial within the current nodes design, especially for the texture nodes. I think it is safe to bump this constant to 512. This will only be ~16K extra stack memory usage per thread during evaluation which is really small for the modern systems.

At least prevent it from crashing Blender, please ). "Material" viewport mode will not work with my complex materials anyway, too many nodes...

Sergey Sharybin (sergey) closed this task as "Resolved".Fri, Mar 24, 2:38 PM

The fix is in Git. Thanks for the report, closing!

Thank you all very much )