ID 584428 - Nuke crashes with a "Too many open files" error when opening a large script

Follow

Problem summary
Nuke crashes with a "Too many open files" error when opening a large script.
 
Customer reported version
Nuke 12.0v3
 
Customer reported platform
N/A
 
Steps to reproduce
 
1) Open Nuke.
 
2) Open the attached script.
 
3) Run the following code, to reconnect all Read nodes in the script. You will need to change the file paths to a PNG and EXR sequence that exist on your system.

for n in nuke.allNodes():    if n.Class() == "Read":        n["file"].setValue("C:/_test_footage/frame_count.####.png")    if n.Class() == "Group":        try:            n["file"].setValue("C:/_test_footage/frame_count.####.exr")        except:            pass
 
4) View one of the Group nodes in the script.
 
5) Save and close the script.
 
6) Reopen the script.
RESULT: Nuke should crash shortly after opening the script and and a "Too many open files" error should be returned in command line.
 
Expected behaviour
Nuke should not crash.
 
Actual behaviour
Nuke crashes when opening the script and a "Too many open files" error is returned in command line.
 
Workaround
Unknown.
 
Reproduced by support
This bug has been reproduced in:
Nuke 15.1v2 - Windows 11
Nuke 12.0v1 - Windows 11
 
Unable to reproduce bug in:
Nuke 15.1v2 - macOS 11 (Big Sur)
 
Earliest version tested
Nuke 12.0v1 - Windows 11
- This issue appears to be in all tested versions of the product on Windows

    We're sorry to hear that

    Please tell us why