ID 496681 - Nuke crashes on launch when the OCIO environment variable is set to a config file that does not exist

Follow

Problem summary
Nuke crashes on launch when the OCIO environment variable is set to a config file that does not exist.
This issue occurs with Nuke, Hiero and Nuke Studio.

Customer reported version
Nuke 13.1v1

Customer reported platform
N/A

Steps to reproduce

1) Open Command Prompt/Terminal.


2) Set the OCIO environment variable to a config.ocio that does not exist. For example:

Windows:
set OCIO=C:\some\path\config.ocio

Linux and macOS:
export OCIO=/some/path/config.ocio

3) Launch Nuke in the same command line session. 

Windows:
"C:\Program Files\Nuke13.1v1\Nuke13.1.exe"

macOS:
/Applications/Nuke13.1v1/Nuke13.1v1.app/Contents/MacOS/Nuke13.1

Linux
/usr/local/Nuke13.1v1/Nuke13.1

NOTE:
As this issue seems to occur less consistently on Windows, you may need to close Nuke and relaunch it a few times to encounter a crash.

Expected behaviour
When the OCIO environment variable is set to a config file that does not exist, Nuke should return an error but not crash.

Actual behaviour
Nuke crashes on launch when the OCIO environment variable is set to a config file that does not exist.

Workaround
Unknown. 

Reproduced by support
This bug has been reproduced in:
Nuke 13.1v1 - Linux CentOS 7 - Windows 10 - macOS 10.13 (High Sierra) - Regression

Unable to reproduce bug in:
Nuke 13.0v5 - Linux CentOS 7 - Windows 10 - macOS 10.13 (High Sierra)

Earliest version tested
Nuke 13.0v5
- This issue doesn't appear in this version and has regressed

    We're sorry to hear that

    Please tell us why