Page MenuHome

OpenColorIO Error with unicode path to config file under Windows
Closed, ArchivedPublic


System Information
Windows 10 Pro 64bits
NVidia GTX960 2GB + Geforce GT730

Blender Version
Broken: 2.77 release version
Worked: (optional)

Short description of error
error message:
OpenColorIO Error: Error could not read 'F:\work\oS\blender-2.77-windows64\2.77\datafiles\colormanagement\config.ocio' OCIO profile.
Color management: using fallback mode for management

A part of the BOLD notation is multi-byte character string.

Exact steps for others to reproduce the error
An error occurs at the time of start of blender in OpenColorIO when I install a 2.77 official release version in a file pass including the multi-byte character string.

Event Timeline

perfection cat (sindra1961) raised the priority of this task from to 90.
perfection cat (sindra1961) updated the task description. (Show Details)
perfection cat (sindra1961) edited a custom field.
Bastien Montagne (mont29) renamed this task from OpenColorIO Error: Error could not read ........... to OpenColorIO Error with unicode path to config file under Windows.Mar 21 2016, 4:03 PM
Bastien Montagne (mont29) lowered the priority of this task from 90 to Normal.

@Sergey Sharybin (sergey) think you are our OCIO guy? unless @Martijn Berger (juicyfruit) wants to handle that windows mess… ;)

Sergey Sharybin (sergey) changed the task status from Resolved to Unknown Status.Mar 23 2016, 7:29 PM

Fix wasn't really correct. Re-opening for further investigation. But it might be a limitation of OCIO API :S

istream can handle multi-byte character string, but is caused by the fact that multi-byte character string is included in a parameter to generate istream instance.
I think that you should preprocess the argument which is used to generate istream instance.
The basic cause thinks that type of the argument of Config::CreateFromFile is inappropriate.

It is nothing to do with istream. that part works just fine and config file is parsed just nicely. The issue appears when OCIO needs to access lookup table referenced in the config file. OCIO needs to know where to find those lookup tables and in normal case this is how it works:

  • If config is created from a given file name, then the dirname of that file name is used as a search path. So if lookup tables are referenced by a relative path in the config it all works just fine.
  • Additionally you can give OCIO hints about search path osing Config::setSearchPath (or something like that).

The issue here is that both points (and underlying calls) operates with char * paths (and no _w* function extensions) which Windows API expects to be ANSI encoded a\\, making it impossible to operate with multi-byte paths for OCIO.

There might be some workarounds for that, that's where i am atm.

Sergey Sharybin (sergey) changed the task status from Unknown Status to Unknown Status.Apr 26 2016, 2:07 PM

This is a limitation of 3rd party library API. I've reported it to the upstream:

Will probably have time to look into solving it from OCIO side, but that's not a task of the bug tracker. So thanks for thee report, but closing it now.