ID 216719 - Nuke saves script omitting a close brace in user knob of a Switch node; can't re-open without 'missing close brace' error

Follow

Problem summary
Nuke saves script omitting a close brace and therefore Nuke is unable to interpret the script on re-opening.
 
Attachment has the before-corruption and the after-corruption scripts, and the only difference is in line 4220 where this line of a Swtich node
 formatHeight {{root.formatheight}}
 
was saved as
 
 formatHeight {{root.formatheight}
 
This is the [corrected] node at issue:
 
set cut_paste_input [stack 0]
version 10.0 v2
push 0
push 0
push 0
push 0
push 0
push $cut_paste_input
Switch {
 inputs 6
 which {{"\[python -execlocal def\\ getBibleNew(ratio,\\ overlap=1.02,\\ setBible=0):\\n\\ \\ \\ \\ n\\ =\\ nuke.thisNode()\\n\\ \\ \\ \\ noi\\ =\\ n.inputs()\\n\\ \\ \\ \\ ratios\\ =\\ \\\[\\]\\n\\ \\ \\ \\ for\\ x\\ in\\ range(0,\\ noi):\\n\\ \\ \\ \\ \\ \\ \\ \\ ratios.append((x,\\ float(n.input(x).width())/float(n.input(x).height())))\\n\\ \\ \\ \\ \\n\\ \\ \\ \\ ratios.sort(key=lambda\\ tup:\\ tup\\\[1\\])\\n\\ \\ \\ \\ \\n\\ \\ \\ \\ if\\ setBible\\ !=\\ 0:\\n\\ \\ \\ \\ \\ \\ \\ \\ return\\ int(ratios\\\[setBible-1\\]\\\[0\\])\\n\\n\\ \\ \\ \\ else:\\n\\ \\ \\ \\ \\n\\ \\ \\ \\ \\ \\ \\ \\ for\\ x\\ in\\ range(len(ratios)):\\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ if\\ ratio\\ <=\\ (ratios\\\[x\\]\\\[1\\]\\ *\\ overlap):\\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ r\\ =\\ ratios\\\[x\\]\\\[1\\]\\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ b\\ =\\ ratios\\\[x\\]\\\[0\\]\\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ return\\ b\\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ break\\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ elif\\ ratio\\ >=\\ ratios\\\[-1\\]\\\[1\\]:\\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ return\\ ratios\\\[-1\\]\\\[0\\]\\n\\n\\n\\nn\\ =\\ nuke.thisNode()\\n\\nw\\ =\\ n.knob('formatWidth').value()\\n\\nh\\ =\\ n.knob('formatHeight').value()\\n\\nr\\ =\\ w\\ /\\ h\\n\\nif\\ n.knob('forceBibleEnable').value():\\n\\ \\ \\ \\ ret\\ =\\ n.knob('forceBible').value()\\nelse:\\n\\ \\ \\ \\ ret\\ =\\ getBibleNew(r)\\n]"}}
 name bibleSelector
 selected true
 xpos -1818
 ypos -1303
 addUserKnob {20 User}
 addUserKnob {3 forceBible}
 addUserKnob {6 forceBibleEnable -STARTLINE}
 addUserKnob {3 formatWidth l formatResolution}
 formatWidth {{root.formatwidth}}
 addUserKnob {3 formatHeight l "" -STARTLINE}
 formatHeight {{root.formatheight}}
}
 
 
Customer reported version
nuke.9.0v8

Customer reported platform
MacOSX 10.09 and SAMBA network share

Steps to reproduce
Attached:
588x174_LOGO_corrupt.nk
588x174_LOGO_fixed.nk
 
Customer reported intermittent errors, where scripts that work correctly in Nuke9.0v8
are saved over SAMBA share and re-open with 'missing close brace' error and missing nodes.
 
After investigating the corrupt script in a text ediior, customer reports
that a closing brace has been substituted for a NULL-character in the script.
"Problem occurs at line 4220, near "formatHeight {{root.formatheight" (Switch node)."

Customer reports that if he replaces this in a text editor, the script loads fine and has all the expected nodes.

Reproduced by support
 Support was NOT able to reproduce on Mac OSX 10.10.4 on 9.0v8
 
Support did not reproduce the script corruption on save/re-open either
locally or over our Samba network share
 
Mac OSX 10.10.4 9.0v8
Opened 588x174_LOGO_corrupt.nk , verified get missing close brace error.
 
FAILURE TO REPRO-
1. 9.0v8 opened 588x174_LOGO_fixed.nk, no error
2. Copy/paste multiple nodes and change Reformat values/or any steps to simulate work in the script
2. Saved script over SMB 3.6 network share
3. Re-opened script, no error


Expected behaviour
Save script over SAMBA network share without data loss

Actual behaviour
Customer reported data loss and 'missing close brace' error when re-opening a saved script
 
 

    We're sorry to hear that

    Please tell us why