I have a cleanup / kind-of-fix proposed in 
https://github.com/OpenImageIO/oiio/pull/2101

I'll admit, on some platforms (OSX) and some files (not all), I still get some 
kind of crash when the iterator gets to the end of the list. I can't figure out 
what's wrong. Not even sure it isn't an error with pybind11 itself. I can't get 
it to crash on Linux, and the "use indexing" workaround always seems to work, 
and I don't have any ideas what else to try at the moment.

If anybody runs into this problem, just use the alternate construct I suggested 
below:


> On Dec 10, 2018, at 11:01 PM, Larry Gritz <[email protected]> wrote:
> 
> I'm still not sure why it's failing, but I can make it work with the 
> following equivalent (though more awkward) loop, perhaps that can get you 
> "unstuck" for now:
> 
> for a in range(len(srcBufSpec.extra_attribs)) :
>     attr = srcBufSpec.extra_attribs[a]
>     print attr.name
> 
> 
> 
>> On Dec 10, 2018, at 5:12 PM, Etienne Fleurant <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hi Larry,
>> 
>> I'm wondering if you have received my test file for this issue and if you 
>> had a moment to look at it. Since we upgraded to the 2.x version we have 
>> this issue blocking us in certain module.
>> 
>> Thanks in advance,
>> Cheers,
>> Etienne 
>> 
>> On Dec 4, 2018, at 18:17, Etienne Fleurant <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>>> Hi Larry,
>>> 
>>> Here's the file for testing. No worries for the sensitive info, it's just a 
>>> color bar :)
>>> 
>>> Thanks!
>>> 
>>> 
>>> On Tue, Dec 4, 2018 at 5:15 PM Larry Gritz <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> Can you send me (privately if you want) an example file to reproduce it?
>>> 
>>> If it's a sensitive image, you may be able to "sanitize" it like:
>>> 
>>>     oiiotool private.exr -mulc 0,0,0,0 -o clean.exr
>>> 
>>> and see if that sill crashes (with all black pixels, but preserving the 
>>> problematic metadata), then it'll be safe to send. 
>>> 
>>> 
>>>> On Dec 4, 2018, at 1:19 PM, Etienne Fleurant <[email protected] 
>>>> <mailto:[email protected]>> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> We are getting a seg fault when iterating on an image extra_attribs in 
>>>> python.
>>>> 
>>>> Here's a code example:
>>>> 
>>>> srcBuf = OpenImageIO.ImageBuf( inputPath )
>>>> srcBufSpec = srcBuf.spec()
>>>> for attr in srcBufSpec.extra_attribs:
>>>>     print attr.name <http://attr.name/>
>>>> 
>>>> ---> OUTPUT:
>>>> oiio:ColorSpace
>>>> compression
>>>> nuke/full_layer_names
>>>> nuke/node_hash
>>>> nuke/version
>>>> PixelAspectRatio
>>>> screenWindowCenter
>>>> screenWindowWidth
>>>> openexr:version
>>>> Segmentation fault (core dumped)
>>>> 
>>>> 
>>>> The inputPath is a simple .exr file exported from Nuke, just a simple 
>>>> colorbar. Tested with a .tif file also with the same result. I could 
>>>> upload one of those files somewhere if needed.
>>>> 
>>>> We are using OIIO v2.0.1-RC1 on CentOS7.
>>>> 
>>>> Thanks in advance,
>>>> Etienne
>>>> 
>>>> _______________________________________________
>>>> Oiio-dev mailing list
>>>> [email protected] <mailto:[email protected]>
>>>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org 
>>>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org>
>>> 
>>> --
>>> Larry Gritz
>>> [email protected] <mailto:[email protected]>
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Oiio-dev mailing list
>>> [email protected] <mailto:[email protected]>
>>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org 
>>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org>
>>> <test_for_ocio.exr>
> 
> --
> Larry Gritz
> [email protected] <mailto:[email protected]>
> 
> 
> 
> 

--
Larry Gritz
[email protected]




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

Reply via email to