openexr-devel
[Top][All Lists]
Advanced

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

[Openexr-devel] OpenEXR crash


From: Alexandre Thibodeau
Subject: [Openexr-devel] OpenEXR crash
Date: Mon, 17 Feb 2014 17:47:01 -0500

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

reply via email to

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