ID 316253 - ZDefocus/Kronos nodes error when rendering with a fresh Cache directory saying "Exception while running kernel on device" [MAC]

Follow

Problem summary
ZDefocus/Kronos nodes error when rendering with a fresh Cache directory saying "Exception while running kernel on device" [MAC]

Customer reported version
nuke.11.0v2

Customer reported platform
ubuntu

Steps to reproduce

1) Open the attached script

2) Repath the Read node to footage, and the Write nodes to a local directory 

3) Save the script and close Nuke

4) Create a new directory in your user

5) Open terminal and set the NUKE_TEMP_DIR env to a new directory you created

6) Run ./Applications/Nuke11.0v2/Nuke11.0v2.app/Contents/MacOS/Nuke11.0v2 -V -F "100-105" -X KronosWrite -x /path/to/script.nk

7) Create a new directory in your user

8) Open terminal and set the NUKE_TEMP_DIR env to a new directory you created

9) Run ./Applications/Nuke11.0v2/Nuke11.0v2.app/Contents/MacOS/Nuke11.0v2 -V -F "100-105" -X KronosWrite -x /path/to/script.nk

This issue only occurs the first time you use the Cache location

Expected behaviour
For Nuke to render

Actual behaviour
It returned the following error when rendering for ZDefocus:

Writing /Users/macadmin/Desktop/pete/zdef_0100.exr
[18:02.24] ERROR: ZDefocus1: Exception while running kernel on device
Writing /Users/macadmin/Desktop/pete/zdef_0100.exr took 0.09 seconds
Total render time: 0.09 seconds
ZDefocus1: Exception while running kernel on device

And for Kronos:
Writing /Users/macadmin/Desktop/pete/kronos_0100.exr
[17:29.34] ERROR: Kronos1: Exception while running kernel on device
Writing /Users/macadmin/Desktop/pete/kronos_0100.exr took 0.13 seconds
Total render time: 0.13 seconds
Kronos1: Exception while running kernel on device


Workaround
Use the same Cache location more than once

Reproduced by support
This problem has been reproduced on:
Nuke 11.0v2 - MacOSX 10.12 - regression
Nuke 10.5v6 - MacOSX 10.12 - regression

The issue was not reproduced on:
Nuke 11.0v2 - Windows 10
Nuke 11.0v1 - MacOSX 10.12
Nuke 10.5v6 - Windows 10
Nuke 10.5v5 - MacOSX 10.12

Linux gets a different error, so is logged as a separate bug

Earliest version tested
Nuke 10.5v5 - Bug did not occur before this version

    We're sorry to hear that

    Please tell us why