Page MenuHome

blender either crashes immediately after rendering when using multiple denoise and file output nodes, or the output of random denoise nodes saved with the file output node are pure black.
Needs Developer to Reproduce, NormalPublic

Description

System Information
Operating system: Windows-10-10.0.17763-SP0 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.92

Blender Version
Broken: version: 2.90 (sub 2), branch: master, commit date: 2020-05-20 20:56, hash: rB8a0840b0ee9a
Worked: (newest version of Blender that worked as expected)

Short description of error
blender crashes immediately after rendering if multiple render layers are connected to file output nodes

Exact steps for others to reproduce the error
Create a .blend file
set rendering to cuda gpu experimental and render size to 1080p
make a simple scene, box, monkey, light etc.
enable all main render passes (diffuse, glossy, transmission, environment, shadows, volume, denoising data)
make 9 linked copies of the scene (making 10 scenes in total)
place a different camera in each scene and set it as the render camera for that scene.
make an 11th empty scene for the compositor to live in
in the compositor add a render layer node and a file output node, connecting all of the render layer outputs to the file output node. Set the file output node exr multilayer full float rgba.
place 4 denoisers between the render layer node and the file output node
add a layout node and place all nodes inside of it
select the layout and duplicate it 9 times (making 10 in total)
change each of the file outputs to output a different file name
hit render

All the rendering will complete, but as soon as rendering completes it crashes, initially I thought this was because blender is trying to save all 10 exr's simultaneously rather than one at a time, but I'm guessing it's more likely that it's trying to run all denoise nodes simultaneously rather than one at a time?

My system is happy with around 3 instead of 10, so most likely down to trying to calculate expensive nodes simultaneously rather than sequentially.

example of my setup:

Event Timeline

michael campbell (3di) updated the task description. (Show Details)
Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Needs Information from User.May 25 2020, 10:02 AM

Could you please post your example .blend file?
(this just saves time to reproduce -- especially if multiple devs are having a look at this)

Thanks, blend file attached. The compositor is a little less complex in this one and the file is a lot less heavy, which resulted in it not crashing, but it's still not working. The problem definitely seems to be with the denoise nodes running concurrently, because after render if you try all 10 of the exr images created by the file output node, you'll notice some of the images are missing data because of some of the denoiser nodes failing.

The compositor is in the product compositing scene, open it up hit f12, wait for it to complete, watch the ram usage during rendering and then during the compositing phase where it's trying to denoise and save out the exr's, then using the image input node, try each of the 10 output exr files. You'll notice that some of them have information missing, this is a result of some of the denoise nodes failing. Re-rendering will result in different denoiser nodes failing.

It will probably still crash if you have less than 32gb ram.

Solutions I can think of would be either store the raw renders to the hdd before moving to the next render, and then recalling them one at a time when each file output node is triggered, or alternatively, at the end of each render, execute the full node tree connected to that renderlayers node, clear the memory and then move onto the next renderlayers node/render.

file:

Here's what the scene will look like if all of the denoise nodes work correctly, although I've set it to very only one sample to speed up testing for you:

if you mute 6 of the renderlayers trees then it'll all work usually.

michael campbell (3di) changed the task status from Needs Information from User to Needs Triage.May 28 2020, 4:34 PM

Afraid I cannot really test this (as indeed I am running out of RAM before it finishes)

Sidenote: I am getting this Dependency cycle reported:

Dependency cycle detected:
  NTCompositing Nodetree/Shading Component/MATERIAL_UPDATE() depends on
  NTCompositing Nodetree/Parameters Component/DRIVER(nodes["Group"].inputs[0].default_value) via 'Driver -> Driven Property'
  NTCompositing Nodetree/Shading Component/MATERIAL_UPDATE() via 'RNA Target -> Driver'
Detected 1 dependency cycles

Hi Philipp. Try muting the contents of 4 or 5 of the layouts, this should then work on 16gb ram, although I'm not sure if that will mean the issue with the denoise nodes rendering out black instead of the denoised image will still happen? Depends if that's a ram issue too.

I'm not sure on the cause of the dependancy cycles unless there's some remnant of a deleted driver still existing in the blend data? Or perhaps that's something to do with the fact grouped nodes exist outside of the bpy.data.scene.node_tree? Maybe try ungrouping the nodes with the driven parameters and see if that issue persists.

Richard Antalik (ISS) changed the task status from Needs Triage to Needs Information from User.Wed, Jun 17, 11:26 PM

I couldn't reproduce crash with this file. does this happen when you load factory settings? Can you upload debug log using blender_debug_log.cmd file?

Hi Richard, in the example file I posted above, how many of the renderlayers trees/denoiser nodes did you have unmuted? What system specs do you have? Are you definitely in the product compositing scene when you press f12?

I guess that the issue in my case is that I don't have nvidia GPU. I tried at least... I muted 5 trees as per recommendation for 16GB RAM.

In any case I am requesting this specific info just to exclude influence of externalities like addons and debug log because in 2.90 we see stack trace in case of crash even on windows so this will be something for developers to look at.

Hi Richard. I'll give that a try asap, in the mean time try enabling all 10 trees. GPU shouldn't matter as OIDN is CPU based to the best of my knowledge....unless it's related to having open cl turned on in the compositor settings?

No crash even with 10 trees. Output image is pink, but I don't quite understand how this setup is supposed to work, so I am not really making any conclusions on that.

Output being pink indicates that some of the denoise nodes have failed which means the passes can't be built back together i'd imagine. You can check by checking each of the outputs of the resulting exr file. Some of them will be black instead of the denoised pass.

No crash in Ryzen 7 16core. 32 GB RAM. GeForce GTX 950. Debain 10. Memory peak was 30,062 . No node was muted.
Possible reason of crash:

  1. Memory maxed out.
  2. Your scene0004 might have some glitch.
  3. I used scene1004 in final compositing area.
  4. Just disconnect the viewer and composite node while rendering. After the render, connect it.
  5. Don't use Backdrop. Instead use image editor>Viewer node. [Just a free advice I give every time ;)]

But I must say, I had to hold my coffee seeing such peak after a long time.

Hi Fahad, can you confirm that all of the exr's contain the same data on the denoised passes as they do on the un-denoised passes?

I've just managed to complete without the crash, but the problem of some of the denoised passes saving as black persists.

@Richard Antalik (ISS) , here's the log files, memory was nearly maxed out, but it didn't crash. Can you check the log files to see what the problem is with the denoise nodes outputting black instead of the denoised pass?

@Richard Antalik (ISS) I noticed that the debug output indicates dependancy cycles between the controls group and the saturation node. Could the denoise node bug be related to this? If so perhaps this is related to the below bug report:

https://developer.blender.org/T77279

EDIT: scrap that, I just tried re-rendering without the driver and most of the denoise nodes outputted black instead of the denoised pass.

This one's got a bit more information in it.

@Fahad Hasan (cgvirus) , probably better if one of the devs try that, as they'll probably have a script for replacing the new denoise nodes with the old ones from 2.83

Your scene is memory intensive and need too much resources and time. That's why asking.

Hi Fahad, I'm not sure I follow. That's the point of this bug report, Blender is crashing or the denoise nodes are failing to output anything due to improper memory handling (I'm guessing). They need to execute consecutively instead of simultaneously, and the result of each denoise node temporarily stored on the HDD instead of ram, that way only the memory required for an individual denoise node is needed at any one time. Once they're all complete then the data can be moved from the HDD back to wherever it's needed, in this case into an image output node for writing of the EXR.

Let me test it once again for you. I am asking to test it as devs may not have that much time and hardware resource to compare the result with b2.8 and b2.9 which is AFIK updated with new OIDN library.

@michael campbell (3di) Result: Tested with B 2.83 and 2.9 (6899cb3c073e). Ryzen 7 16 core, 30 GB Ram, GeForce GTX 950. Debian 10. Mem Peak 29,060.

  1. Both version gives denoised data (Named as *_clean pass) properly in all EXRs. Tested with Natron and Blender compositor.
  1. The only fail I had faced is the final comp was pink after render is done. Turning backdrop on/off or connecting-disconnecting or mute/unmute any node or any kind of "one/single" update event in the compositor was necessary to load the Final EXR file in the final comp. That makes sense as the final EXR was absent before the rendering is finished (NULL file with reference).

Hope it helps. Thanks.

That's great, hopefully the log files I provided will help the devs ascertain the cause of the issue for myself and other people experiencing it (the black output seems to be a common issue). Can you upload the 10 exr files your test created so I can double check all the passes for you?

wonder if the problem only happens on intel? That would be funny :)

I have just deleted them. It was 1.1 GB.

ah ok, no problem. Should be enough info in the log files and above anyway for a dev to investigate the cause.

2.90 hasn’t updated to OIDN 1.2.1 just yet, so it is still running the same 1.0 version as 2.83.

ah ok, no problem. Should be enough info in the log files and above anyway for a dev to investigate the cause.

Just to clarify, what is the bug we are talking about? I am looking for crash as it is the title of this report, but there is no crash in logs. Blender has normally quit. That is either by user or by some addon somehow. There are lot addons used so I can't really tell what could happen. That is why I want to check if there is any crash when you test with factory settings loaded.

michael campbell (3di) renamed this task from blender crashes immediately after rendering if multiple render layers are connected to file output nodes to blender either crashes immediately after rendering when using multiple denoise and file output nodes, or the output of random denoise nodes saved with the file output node are pure black..Thu, Jun 18, 11:42 PM

I've updated the title. The issue is it either crashes when the render gets to the denoise/file output stage, or some of the denoise nodes output a black image instead of the denoised image....at least they save this way in the exr...so it could be the denoise nodes or the file output.

I haven't been able to reproduce the crash, so perhaps that was related to the build I was using way back when, when I initially reported the bug.

I can't spend any more time on this, as I've already spent three or four days testing and producing files for the devs to look at.

I'm pretty sure it's just a bad implementation in terms of memory management.

Richard Antalik (ISS) changed the task status from Needs Information from User to Needs Developer to Reproduce.Mon, Jun 22, 5:36 AM

So I have rendered the file again, checked out all exr files, and all seems to be good on my machine. Result was composited correctly that is.

So I have rendered the file again, checked out all exr files, and all seems to be good on my machine. Result was composited correctly that is.

Try increasing the number of un-muted trees to 15, and ensure all denoise nodes are un-muted. It was teetering on the edge at 32gb ram. What differences are there between our hardware and operating system?

@Richard Antalik (ISS), from reading the discussion seems this is a an out-of-memory issue?

@Richard Antalik (ISS), from reading the discussion seems this is a an out-of-memory issue?

I wasn't able to reproduce any issue here, so I don't know. Claim is that this file will either crash or some denoise nodes will fail to create output.