The current behaviour works great, we did have an issue where a file existed 
but get_texture_info with “exists” was returning a false (0) value on a jpeg 
file and there was an error being generated that helped to debug but wasn’t 
initially being passed back to our logging system. 

I’m nit picking here but if there’s a chance something can fail, whether it’s 
get_texture_info returning false or setting the data value to false, I think it 
would be nice to know why it failed?

We’re also happy to concede that just keep the lines commented out in our 
build.  :) 

Colin

> On Jul 6, 2019, at 1:49 AM, Larry Gritz <[email protected]> wrote:
> 
> The "exists" query is special -- it's documented as NOT being an error (in 
> the usual sense of propagating error messages) if the file doesn't exist, so 
> we try to intercept and bury any messages that happen as a result.
> 
> 
> 
>> On Jul 5, 2019, at 2:58 PM, Colin Doncaster <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hello - 
>> 
>> I’ve been doing some debugging and potentially found a few little issues 
>> with how errors are propagated when using get_texture_info with the “exists” 
>> data name.
>> 
>> On line 2553 of imagecache.cpp it calls geterror() to “eat any errors 
>> generated by find_file”, is there a specific reason it does this?  We were 
>> ending up with 0 being returned but geterror() wasn’t returning any 
>> information about it until we commented this out. 
>> 
>> The second issue was in texturesys.cpp at 568, the error is only propagated 
>> from the image cache to the texture system if ok is false - but when using 
>> “exists” this is always true.  Couldn’t the error always be passed if not 
>> “”. 
>> 
>> Thank you, 
>> Colin 
>> _______________________________________________
>> Oiio-dev mailing list
>> [email protected] <mailto:[email protected]>
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
> 
> --
> Larry Gritz
> [email protected] <mailto:[email protected]>
> 
> 
> 
> 
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to