openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] OpenEXR crash


From: Peter Hillman
Subject: Re: [Openexr-devel] OpenEXR crash
Date: Wed, 19 Feb 2014 17:34:10 +1300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Thanks for the bug report.
I've put that on github as issue #92.

What you suggest as a workaround is the expected use of the API: unfortunately the sanity checks do not enforce that the type attribute is present when creating one part using the MultiPartOutputFile API.

I'm in two minds whether to inject a type attribute of "scanlineimage" into all parts of multipart output files that are missing them, or whether to change the sanity check.

On 18/02/14 11:47, Alexandre Thibodeau wrote:
Hi,

I'm am developing a tool using OpenEXR. I use the MultiPartOutputFile API because I will eventually support multi-part files. As an initial test, I tried writing a single part file with the multi-part API. I didn't want to implement two different interfaces, so I didn't use the single-part API.

In the function GenericOutputFile::writeMagicNumberAndVersionField, called by the constructor of MultiPartOutputFile, a special check is made for (parts == 1). If it's the case (it was for me), headers[0].type() is called. Unlike the other types of files, MultiPartOutputFile does not set the file type to SCANLINEIMAGE. As a result, the attribute is not set, and causes a crash.

A workaround consists of manually calling SetType(SCANLINEIMAGE) after creating the header. However, to avoid that someone get into the same issue, I suggest that MultiPartOutputFile should be set to SCANLINEIMAGE by default, like it's the case for the other API.

Thanks


_______________________________________________
Openexr-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/openexr-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]