Blend material: memory allocation bug

Project:YafaRay
Component:YafaRay Core
Category:bug report
Priority:critical
Assigned:David Bluecame
Status:closed
Description

Hello,

During some tests I found a bug in the blend material that causes some combinations of materials to generate many black/white dots (totally wrong NaN and Inf values)

I found the problem in the way the blend material allocates the pointers that point to the component materials. In some situations, the pointers are allocated the wrong way therefore getting totally wrong material results.

For example, this is an example render of a scene (with YafaRay v3.0.2-beta) that has the bug. I will attach the .blend scene in this thread for you to test as well.

Blend Material memory allocation bug.pngBlend Material memory allocation bug.png

 

With the bug fixed:

Blend Material memory allocation bug fixed.pngBlend Material memory allocation bug fixed.png

 

This bug has been extremely difficult to find, but once found it was easy to solve. In any case I will do more tests to make sure this does not cause any new issues with the blend materials. Hopefully this fix will be included in the next YafaRay version.

 

There are still some aspects in this render I don't like too much, but they could be unrelated to this problem and related to a different issue. I will keep investigating.

 

 

 

Comments

#1

I've attached here the .blend example that causes the error stated above.

 

For your reference, the commit with the change that (hopefully) solves this problem is here:

https://github.com/YafaRay/Core/commit/bb9191c00243dfa238989205338d076b2...

AttachmentSize
FGNan.blend.zip 94.21 KB

#2

Status:active» ready to commit

This problem will be solved in the next YafaRay version

#3

Status:ready to commit» fixed

Hello,

This issue has been fixed in the new YafaRay v3.1.0-beta. See: http://www.yafaray.org/community/forum/viewtopic.php?f=15&t=5184

#4

Status:fixed» closed

Fixed for more than 2 weeks without further feedback, closing.