Coder Social home page Coder Social logo

academysoftwarefoundation / openexr Goto Github PK

View Code? Open in Web Editor NEW
1.6K 131.0 597.0 56.11 MB

The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.

Home Page: http://www.openexr.com/

License: BSD 3-Clause "New" or "Revised" License

C++ 29.27% C 68.92% Shell 0.12% M4 0.19% CMake 0.63% Batchfile 0.05% Starlark 0.17% Python 0.65% HTML 0.01%
openexr images image-processing hdr vfx academy

openexr's People

Contributors

antond-weta avatar aras-p avatar arkellr avatar barracuda156 avatar blackencino avatar cary-ilm avatar danielkaneider avatar darbyjohnston avatar dependabot[bot] avatar dlemstra avatar ehanway-ilm avatar ewimmer avatar fkainz avatar fnordware avatar hjmallon avatar jgoldstone avatar jmertic avatar kdt3rd avatar kwizart avatar lgritz avatar meshula avatar mvtk avatar nickrasmussen avatar ogretransporter avatar oxt3479 avatar peterhillman avatar pstanczyk avatar vertexwahn avatar wkjarosz avatar xlietz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openexr's Issues

Compile fail with MinGW-w64 on Windows

I got this error:

IlmImf/ImfSystemSpecific.h: In function 'void* Imf_2_1::EXRAllocAligned(size_t,
size_t)':
IlmImf/ImfSystemSpecific.h:64:41: error: 'posix_memalign' was not declared in th
is scope
     posix_memalign(&ptr, alignment, size);
                                         ^

There's #ifdef __GNUC__ in code which enables that part, it should be #if defined(__GNUC__) && !defined(__MINGW32__)

testFutureProofing and testMultiPartFileMixingBasic fail on big endian arches

testFutureProofing and testMultiPartFileMixingBasic both use fread(&length,4,f) to get a 4 byte integer value from input file. The value read is not converted from the little endian format to the machine format causing problems (eg. test didn't finish after 24 hours).

something like

+#include "byteswap.h"
+#include "ImfSystemSpecific.h"

...
             fread(&length,4,1,f);
+            if (!GLOBAL_SYSTEM_LITTLE_ENDIAN)
+            {
+                int tmp = bswap_32(length);
+               length = tmp;
+            }

...

should be used

No OStream version of MultiPartOutputFile ctr

MultiPartInputFile has constructor versions that take either char filename[], or IStream&, but MultiPartOutputFile only has a constructor that takes a filename, not a corresponding OStream& for cases where you might want to override the underlying disk I/O methods.

IexMath won't compile on Mac OS X 10.5

It's fine on later OS X versions, but on 10.5 (where I have to compile for historical reasons) it fails. Luckily I don't actually need it :-)

g++ -dynamic -no-cpp-precomp -falign-loops=16 -pipe -Wall -g -O0 -DFLDEBUG -DBUGHUNT -D_REENTRANT -D_GNU_SOURCE -DHAVE_CONFIG_H -I. -I. -I../config -I.. -I../Iex -I../config -I/Users/philb/4.4/build/baselight/Darwin-gcc-4.0.1-64/debug/include -arch x86_64 -m64 -DCONFIG_64_BIT -DFL_LITTLE_ENDIAN -fPIC -pipe -g -O2 -D_THREAD_SAFE -c IexMathFpu.cpp -o IexMathFpu.o
IexMathFpu.cpp:278:28: error: asm/sigcontext.h: No such file or directory
IexMathFpu.cpp: In function 'void Iex_2_0::FpuControl::restoreControlRegs(const ucontext_t&, bool)':
IexMathFpu.cpp:283: error: request for member 'fpregs' in 'ucon->__darwin_ucontext::uc_mcontext', which is of non-class type '__darwin_mcontext64* const'
IexMathFpu.cpp:285: error: '_fpstate' was not declared in this scope
IexMathFpu.cpp:285: error: 'kfp' was not declared in this scope
IexMathFpu.cpp:285: error: expected type-specifier before 'fpstate'
IexMathFpu.cpp:285: error: expected >' before '_fpstate' IexMathFpu.cpp:285: error: expected(' before 'fpstate'
IexMathFpu.cpp:285: error: expected primary-expression before '>' token
IexMathFpu.cpp:285: error: request for member 'fpregs' in 'ucon->__darwin_ucontext::uc_mcontext', which is of non-class type '__darwin_mcontext64* const'
IexMathFpu.cpp:285: error: expected `)' before ';' token
IexMathFpu.cpp: In function 'void Iex_2_0::setFpExceptionHandler(void (
)(int, const char
))':
IexMathFpu.cpp:466: error: 'SA_NOMASK' was not declared in this scope
IexMathFpu.cpp:468: error: 'struct sigaction' has no member named 'sa_restorer'
make[3]: *** [IexMathFpu.lo] Error 1

Docs fixes -- readPixelSampleCounts

In a few places, the ReadingAndWritingImageFiles_2.0.pdf refers to getPixelSampleCounts, but really the function is called readPixelSampleCounts.

struct/class mismatch

Hello,
We found this the oce-win-bundle project, which uses FreeImage, which uses OpenEXR.

in OpenEXR/IlmImf/ImfAcesFile.h

there is a forward declaration to
class Chromaticities;
while in effect the class is declared as
struct Chromaticities
in ImfChromaticities.h

some compilers may complain about this.

Wiki is able to be edited by users

Not sure if this qualifies as an issue but it may be abused by people in the future, was able to edit and save the main wiki page (though I did not edit anything). Just a heads up that you may want to change this to be edited by collaborators only.

testBox failure on i386

from #3:

ilmbase 2.0.0 builds on i386, however the testsuite still fails with:
extendBy() point for type V2f
extendBy() point for type V2d
lt-ImathTest: testBox.cpp:253: void {anonymous}::testExtendByPoint(const char*) [with T = Imath_2_0::Vec2]: Assertion `b.min == p && b.max == p' failed.
/bin/bash: line 4: 7000 Aborted ${dir}$tst
FAIL: ImathTest

VS 2010 broken: exporting std::string subclass crashes

The issue was already discussed on the mailing list, this is just for the sake of completion:

[email protected]
Right, on windows one can't derive from standard string and then export the
class. When the exception is thrown, Iex will crash deep in heap code in
the Stdlib.

[email protected]
The problem is that BaseExc derives from std::string, which doesn't have a dllexport in MSVC2010 and onwards, and so in our case, actually broke the build.
We patched our version so that BaseExc uses std::string as a member variable, rather than deriving from it. This was easy enough to do, since this change only affects testBaseExc.cpp.

Can't build in Max OS X Mountain Lion / XCode 4.6

XCode 4.6 does not include the autoconf tools (I believe Apple got rid of them even earlier, maybe XCode 4.3). I've installed them + libtool 'by hand' but the bootstrap scripts do not seem to behave well with the 'real' (eg Gnu) versions of these tools. I tried tweaking some of the code in bootstrap but I quickly seem to have gotten in over my autoconf head.

I don't want to install brew/macports/whatever because I prefer to run a lean ship on my laptop. Any thoughts here?

Building pyilmbase 1.0.0 issues

Hi, everyone!

I'm trying to build pyilmbase library on osx 10.9 and face some problems. I've boost 1.48, configured and installed it with these options:

export CXXFLAGS="-fPIC"
export CFLAGS="-fPIC"
export LDFLAGS="-fPIC"
./bootstrap.sh --with-libraries=program_options --with-libraries=thread --with-libraries=python
sudo ./bjam install --layout=versioned link=static threading=multi cxxflags=-fPIC

it has installed successfully. After that I cd-ed to pyilmbase folder and ran

export CPPFLAGS="-I/usr/local/lib/python2.7/site-packages/numpy/core/include/"
./configure --with-boost-include-dir=/usr/local/include/boost-1_48/ --with-boost-lib-dir=/usr/local/lib --with-boost-python-libname=boost_python-mt-1_48

Output (with no errors):

---------------------------------------------
Summary for PyIlmBase features:

Python version                                  2.7
boost::python libname                           boost_python-mt-1_47
---------------------------------------------

but when I try to make it i get these errors:

PyImathStringTable.cpp:47:46: error: expected expression
    const StringSet &strings = _table.get<1>();
                                             ^
PyImathStringTable.cpp:62:45: error: expected expression
    const IndexSet &indices = _table.get<0>();
                                            ^
PyImathStringTable.cpp:77:46: error: expected expression
    const StringSet &strings = _table.get<1>();
                                             ^
PyImathStringTable.cpp:105:46: error: expected expression
    const StringSet &strings = _table.get<1>();
                                             ^
PyImathStringTable.cpp:114:45: error: expected expression
    const IndexSet &indices = _table.get<0>();
                                            ^
PyImathStringTable.cpp:47:22: error: declaration of reference variable 'strings' requires an initializer
    const StringSet &strings = _table.get<1>();
                     ^~~~~~~
PyImathStringTable.cpp:121:31: note: in instantiation of member function 'PyImath::StringTableT<std::__1::basic_string<char> >::lookup' requested here
template class PYIMATH_EXPORT StringTableT<std::string>;
                              ^
PyImathStringTable.cpp:62:21: error: declaration of reference variable 'indices' requires an initializer
    const IndexSet &indices = _table.get<0>();
                    ^~~~~~~
PyImathStringTable.cpp:121:31: note: in instantiation of member function 'PyImath::StringTableT<std::__1::basic_string<char> >::lookup' requested here
template class PYIMATH_EXPORT StringTableT<std::string>;
                              ^
PyImathStringTable.cpp:77:22: error: declaration of reference variable 'strings' requires an initializer
    const StringSet &strings = _table.get<1>();
                     ^~~~~~~
PyImathStringTable.cpp:121:31: note: in instantiation of member function 'PyImath::StringTableT<std::__1::basic_string<char> >::intern' requested here
template class PYIMATH_EXPORT StringTableT<std::string>;
                              ^
PyImathStringTable.cpp:105:22: error: declaration of reference variable 'strings' requires an initializer
    const StringSet &strings = _table.get<1>();
                     ^~~~~~~
PyImathStringTable.cpp:121:31: note: in instantiation of member function 'PyImath::StringTableT<std::__1::basic_string<char> >::hasString' requested here
template class PYIMATH_EXPORT StringTableT<std::string>;
                              ^
PyImathStringTable.cpp:114:21: error: declaration of reference variable 'indices' requires an initializer
    const IndexSet &indices = _table.get<0>();
                    ^~~~~~~
PyImathStringTable.cpp:121:31: note: in instantiation of member function 'PyImath::StringTableT<std::__1::basic_string<char> >::hasStringIndex' requested here
template class PYIMATH_EXPORT StringTableT<std::string>;
                              ^
PyImathStringTable.cpp:47:22: error: declaration of reference variable 'strings' requires an initializer
    const StringSet &strings = _table.get<1>();
                     ^~~~~~~
PyImathStringTable.cpp:122:31: note: in instantiation of member function 'PyImath::StringTableT<std::__1::basic_string<wchar_t> >::lookup' requested here
template class PYIMATH_EXPORT StringTableT<std::wstring>;
                              ^
PyImathStringTable.cpp:62:21: error: declaration of reference variable 'indices' requires an initializer
    const IndexSet &indices = _table.get<0>();
                    ^~~~~~~
PyImathStringTable.cpp:122:31: note: in instantiation of member function 'PyImath::StringTableT<std::__1::basic_string<wchar_t> >::lookup' requested here
template class PYIMATH_EXPORT StringTableT<std::wstring>;
                              ^
PyImathStringTable.cpp:77:22: error: declaration of reference variable 'strings' requires an initializer
    const StringSet &strings = _table.get<1>();
                     ^~~~~~~
PyImathStringTable.cpp:122:31: note: in instantiation of member function 'PyImath::StringTableT<std::__1::basic_string<wchar_t> >::intern' requested here
template class PYIMATH_EXPORT StringTableT<std::wstring>;
                              ^
PyImathStringTable.cpp:105:22: error: declaration of reference variable 'strings' requires an initializer
    const StringSet &strings = _table.get<1>();
                     ^~~~~~~
PyImathStringTable.cpp:122:31: note: in instantiation of member function 'PyImath::StringTableT<std::__1::basic_string<wchar_t> >::hasString' requested here
template class PYIMATH_EXPORT StringTableT<std::wstring>;
                              ^
PyImathStringTable.cpp:114:21: error: declaration of reference variable 'indices' requires an initializer
    const IndexSet &indices = _table.get<0>();
                    ^~~~~~~
PyImathStringTable.cpp:122:31: note: in instantiation of member function 'PyImath::StringTableT<std::__1::basic_string<wchar_t> >::hasStringIndex' requested
      here
template class PYIMATH_EXPORT StringTableT<std::wstring>;
                              ^
15 errors generated.
make[1]: *** [PyImathStringTable.lo] Error 1
make: *** [all-recursive] Error 1

Using osx 10.9, Boost 1.48, pyilmbase 1.0.0 and python 2.7 installed with brew

Hope for your assistance.
Thanks in advance!

Issues when using libs built with CMake on Linux

Building IlmBase 2.0 and OpenEXR 2.0 (from the website) using CMake on Linux64 works (in terms of producing the target libs), but then linking those output libs that have been built against an application doesn't work, due to the following issues:

  1. ImfNamespace.h is missing from ./IlmImf/CMakeLists.txt in the Headers INSTALL section, so that header is never installed in the target directory, so anything which needs it (OpenEXR reading/writing) can't find it.
  2. ./OpenEXR-2.0.0/IlmImf/CMakesList.txt is not adding the ilmBase libs as target link libraries, so there's unresolved symbols to all header-only (mostly constructors and destructors) at link time. Adding:
    TARGET_LINK_LIBRARIES(IlmImf -lImath -lIexMath -lHalf -lIex -lIlmThread -pthread)
    after:
    ADD_LIBRARY ( IlmImf STATIC)
    fixes that.

These issues also affect OS X, plus there are additional issues on OS X that I'll look into later.

Feature request: read deeptile with InputPart/InputFile

Imf::InputFile (and Imf::InputPart) can now read and convert SCANLINEIMAGE, TILEDIMAGE, and DEEPSCANLINE. All that's left to add is DEEPTILE, please!

I guess the first step in that would be to get DeepScanLineInputFile to convert a tiled file if it can't already.

IlmBase/Half toFloat.h not built using CMakeLists.txt

Build fails using cmake v1.8.9 on OSX 10.8. Issue reside in the include paths missing for toFloat.h:

Scanning dependencies of target toFloat
[ 1%] Building CXX object Half/CMakeFiles/toFloat.dir/toFloat.cpp.o
Linking CXX executable toFloat
[ 1%] Built target toFloat
Scanning dependencies of target eLut
[ 3%] Building CXX object Half/CMakeFiles/eLut.dir/eLut.cpp.o
Linking CXX executable eLut
[ 3%] Built target eLut
Scanning dependencies of target Half
make[2]: *** No rule to make target ../toFloat.h', needed byHalf/CMakeFiles/Half.dir/half.cpp.o'. Stop.
make[1]: *** [Half/CMakeFiles/Half.dir/all] Error 2
make: *** [all] Error 2

compile openexr with mingw 64 bit

I can compile the complete source with mingw 32 bit under windows, but with the 64 bit version I get some errors. For the compiling I use this commands:
https://github.com/jb-alvarado/media-autobuild_suite/blob/master/wip%28temp%29/compile_imagemagick64.sh#L173-L227

First I was getting the error about:
ImfSystemSpecific.h:64: error: 'posix_memalign' was not declared in this scope

I fix that with this lines in ImfSystemSpecific.h:

define _aligned_malloc __mingw_aligned_malloc

define _aligned_free __mingw_aligned_free

static void* EXRAllocAligned(size_t size, size_t alignment)
{
return _aligned_malloc(alignment, size);
}

static void EXRFreeAligned(void* ptr)
{
_aligned_free(ptr);
}

But now I get this error:

/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../config -ID:/System/mingw/local64/include/OpenEXR -I.. -I../config -I/local64/include -pipe -I/local64/include -mms-bitfields -mthreads -MT ImfDeepScanLineOutputFile.lo -MD -MP -MF .deps/ImfDeepScanLineOutputFile.Tpo -c -o ImfDeepScanLineOutputFile.lo ImfDeepScanLineOutputFile.cpp
In file included from ImfScanLineInputFile.cpp:61:0:
ImfOptimizedPixelReading.h: In function 'bool Imf_2_0::isPointerSSEAligned(const void
)':
ImfOptimizedPixelReading.h:264:50: error: cast from 'const void_ restrict' to 'long unsigned int' loses precision [-fpermissive]
unsigned long trailingBits = ((unsigned long)pPointer) & 15;

Is there any chance to fix that?

make openexr_viewer failed (ImfDeepImageStateAttribute.h)

Hello,
when I compile and install the new source from openexr, it doesn't copy the IlmImf/ImfDeepImageStateAttribute.h from openexr to my include folder. So after that when I will compile openexr_viewer, it brings a error: ImfDeepImageStateAttribute.h don't found. When I copy them manual and compile again, it works.

zlib error when running ./configure in Cygwin

Hello all,

I am trying to build OpenEXR with Cygwin but when I run ./configure it halts with the following error:

checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking for compress in -lz... no
configure: error:
*** OpenEXR requires a recent version of zlib, which you don't appear to
*** have.


*** This could be because the run-time linker is not finding zlib, or it
*** is finding the wrong version. In this case, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the proper version. Also, make sure you have run ldconfig if
*** that is required on your system.

I have version 1.2.6 of zlib installed in the /usr/local directory: zlib.dll and zlibwapi.dll in /bin, zlib.h and zconf.h in /include, and zlib.dll, zlibstatic.dll, and zlibwapi.dll in /bin. Which makes this error very puzzling for me, as /usr/local is in my environment variables. I have tried the command "export LD_LIBRARY_PATH=/usr/local/lib/pkgconfig" because this directory contains the zlib.pc file, but no luck; I have also tried setting LD_LIBRARY_PATH to /lib, with similar results. The other solutions that the message proposes are Linux-exclusive, so I'm at a loss as to how to proceed.

Any assistance would be greatly appreciated. Thank you!

CMake does not generate "toFloat.h" with Ninja

On Windows. Can someone check that?

ninja: error: 'C:/Users/Constantine/Desktop/openexr/IlmBase/Half/toFloat.h', needed
by 'Half/CMakeFiles/Half.dir/half.cpp.obj', missing and no known rule to make it

PyImath array comparison operators

I've had an issue with comparing two pyimath array objects. Instead of returning an integer, the comparison operators return an integer array.

import imath
array1 = imath.DoubleArray(1.0, 3)
array2 = imath.DoubleArray(1.0, 3)
equal = (array1 == array2)
print equal
for i in xrange(0, len(equal)):
    print equal[i]

This code outputs the following:

<imath.IntArray object at 0xdb7370>
1
1
1

It appears that the array is filled with the result of the per-element comparisons.

This happens for all the array types defined in PyImathBasicTypes.cpp

Is this behavior intended? or is it a bug?

PyIlmBase as Static Library only

Hello I am having problem setting PyIlmBase to build as static library
I tried with -DBUILD_SHARED_LIBS=OFF and -DCMAKE_EXE_LINKER_FLAGS=-static
But it still builds only as dynamic. I am doing a cross compile and I don't have other options than static linking.

Thanks,

Alex

Make error due to memset

When I tried building OpenEXR, I get this:

In file included from ImfHuf.cpp:50:0:
./ImfAutoArray.h: In instantiation of 'Imf::AutoArray<T, size>::AutoArray() [with T = int; int size = 65537]':
ImfHuf.cpp:300:34: required from here
./ImfAutoArray.h:60:40: error: 'memset' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from ImfHuf.cpp:52:0:
/usr/include/string.h:62:14: note: 'void* memset(void_, int, size_t)' declared here, later in the translation unit
In file included from ImfHuf.cpp:50:0:
./ImfAutoArray.h: In instantiation of 'Imf::AutoArray<T, size>::AutoArray() [with T = long unsigned int_; int size = 65537]':
ImfHuf.cpp:301:38: required from here
./ImfAutoArray.h:60:40: error: 'memset' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from ImfHuf.cpp:52:0:
/usr/include/string.h:62:14: note: 'void* memset(void_, int, size_t)' declared here, later in the translation unit
In file included from ImfHuf.cpp:50:0:
./ImfAutoArray.h: In instantiation of 'Imf::AutoArray<T, size>::AutoArray() [with T = long unsigned int; int size = 65537]':
ImfHuf.cpp:363:36: required from here
./ImfAutoArray.h:60:40: error: 'memset' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from ImfHuf.cpp:52:0:
/usr/include/string.h:62:14: note: 'void_ memset(void_, int, size_t)' declared here, later in the translation unit
In file included from ImfHuf.cpp:50:0:
./ImfAutoArray.h: In instantiation of 'Imf::AutoArray<T, size>::AutoArray() [with T = Imf::{anonymous}::HufDec; int size = 16384]':
ImfHuf.cpp:1064:37: required from here
./ImfAutoArray.h:60:40: error: 'memset' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from ImfHuf.cpp:52:0:
/usr/include/string.h:62:14: note: 'void_ memset(void_, int, size_t)' declared here, later in the translation unit
make[2]: *_* [ImfHuf.lo] Error 1
make[2]: Leaving directory /home/sashi/src/openexr/OpenEXR/IlmImf' make[1]: *** [all] Error 2 make[1]: Leaving directory/home/sashi/src/openexr/OpenEXR/IlmImf'
make: *** [all-recursive] Error 1

IlmBase SIMD optimization on Arm processors

Hello ,
I couldn't find any info if there is SIMD optimization based on NEON for Arm processors in IlmBase. If not is there future plans for that ?

Thanks in advance,

Alex

recommended boost version?

Hi Guys,

I was wondering, is there a recommended version of boost for building the PyImath bindings? I'm trying to compile against boost 1.51.0 on mac os x (mountain lion). This is compiling on revision 2664764.

I'm seeing lots of build errors and assuming it has something to do with incompatible boost versions, but am not sure.

(pages like this):
/opt/local/include/boost/python/operators.hpp: In static member function 'static PyObject* boost::python::detail::operator_l<op_add>::apply<L, R>::execute(typename boost::python::detail::unwrap_wrapper_::type&, const typename boost::python::detail::unwrap_wrapper_::type&) [with L = PyImath::FixedArray2D, R = PyImath::FixedArray2D]':
/opt/local/include/boost/python/operators.hpp:152: instantiated from 'void boost::python::detail::operator_<id, L, R>::visit(ClassT&) const [with ClassT = boost::python::class_PyImath::FixedArray2D<int, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>, boost::python::detail::operator_id id = op_add, L = boost::python::self_ns::self_t, R = boost::python::self_ns::self_t]'
/opt/local/include/boost/python/def_visitor.hpp:31: instantiated from 'static void boost::python::def_visitor_access::visit(const V&, classT&) [with V = boost::python::def_visitor<boost::python::detail::operator_<op_add, boost::python::self_ns::self_t, boost::python::self_ns::self_t> >, classT = boost::python::class_PyImath::FixedArray2D<int, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>]'
/opt/local/include/boost/python/def_visitor.hpp:67: instantiated from 'void boost::python::def_visitor::visit(classT&) const [with classT = boost::python::class_PyImath::FixedArray2D<int, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>, DerivedVisitor = boost::python::detail::operator_<op_add, boost::python::self_ns::self_t, boost::python::self_ns::self_t>]'
/opt/local/include/boost/python/class.hpp:226: instantiated from 'boost::python::class_<T, X1, X2, X3>& boost::python::class_<T, X1, X2, X3>::def(const boost::python::def_visitor&) [with Derived = boost::python::detail::operator_<op_add, boost::python::self_ns::self_t, boost::python::self_ns::self_t>, W = PyImath::FixedArray2D, X1 = boost::python::detail::not_specified, X2 = boost::python::detail::not_specified, X3 = boost::python::detail::not_specified]'
./PyImathFixedArray2D.h:651: instantiated from 'void PyImath::add_arithmetic_math_functions(boost::python::class_PyImath::FixedArray2D<T, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>&) [with T = int]'
imathmodule.cpp:175: instantiated from here
/opt/local/include/boost/python/operators.hpp:212: error: no match for 'operator+' in 'l + r'

I may have missed it in the docs, sorry about that!

tags for 1.x releases

It would be very helpful to have tags at the commits that represent various 1.x releases for easy access.

CMakeLists.txt incorrectly defines HAVE_POSIX_SEMAPHORES for OSX

In the trunk, HAVE_POSIX_SEMAPHORES is always defined for non WIN32 platforms. This causes an exception to get thrown on OSX when a Semaphore is created.

The top level CMakeLists.txt config needs to be changed so that HAVE_POSIX_SEMAPHORES is not defined on OSX. OSX should use the posix-compatible Iex semaphores, not the posix semaphores.

Simple fix is:

...
IF (WIN32)
FILE ( COPY ${CMAKE_SOURCE_DIR}/config.windows/IlmBaseConfig.h
DESTINATION ${CMAKE_SOURCE_DIR}/config
)
ELSE()

IF(APPLE)
FILE ( WRITE ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_PTHREAD 1\n" )
ELSE()
FILE ( WRITE ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_PTHREAD 1\n" )
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_POSIX_SEMAPHORES 1\n" )
ENDIF ()

FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_STRING "2.0.0"\n" )
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_PACKAGE_STRING "IlmBase 2.0.0"\n" )

ENDIF()

Windows compilation fixes.

ilmbase-2.0.0
subfolder Half - CMakeLists.txt need to add halfExport.h to install block.

openexr-2.0.0
CMakeLists.txt need to adjust a bit for if(WIN32) block
1.add ADD_DEFINITIONS( -DZLIB_WINAPI -D_CRT_SECURE_NO_WARNINGS )
2. change SET( Z_LIB zlib ) to SET ( Z_LIB zlibstat )
Because from official zlib source, for windows compilation the standard naming for output is zlibwapi.dll for shared, and zlibstat.lib for static.
Use condition if OPENEXR_DLL is set to change Z_LIB accordingly.

In doc install block, remove _2.0.pdf files from the list, since they are not included.

IlmImfTest:
project is generated missing following source code file:
+testFutureProofing.cpp
+testPartHelper.cpp
+testDeepScanlineMultipleRead.cpp
+testOptimized.cpp

IlmImfFuzzTest
project is generated missing following source code files:
+testFuzzDeepScanLines.cpp
+testFuzzDeepTiles.cpp

To fix "error C2872: ambiguous symbol" in IlmImfFuzzTest
Fixes for testFuzzDeepScanLines.cpp:
replace FLOAT => OPENEXR_IMF_INTERNAL_NAMESPACE::FLOAT
replace UINT => OPENEXR_IMF_INTERNAL_NAMESPACE::UINT

Fixes for testFizzDeepTiles.cpp:
replace FLOAT => OPENEXR_IMF_NAMESPACE::FLOAT

After applying all these you can compile from default CMake generated projects.

CMake build custom command for generating b44ExpLogTable exe fails on Linux and OS X

As an addition to Issue 61, based off the CMake-fixes branch, on Linux and OS X (10.6.8) with CMake only, I don't think the custom command for generating the b44ExpLogTable.h is working:

previously, I was tarring up the already built versions of IlmBase and OpenEXR that I'd built as tests for the CMake-fixes stuff, and copying them to the project I'm using them in, and that worked, but that seems to be because the 1.1 MB b44ExpLogTable.h was included in that.

If I remove that file, which seems to be generated as a custom command in OpenEXR/IlmImf, then on Linux the file gets generated, but in the OpenEXR directory, which then can't find the header as it's actually looking for it in the OpenEXR/IlmImf directory as that's where the .cpp is.

I tried moving the generation step to build it actually in the OpenEXR/IlmImf directory, but that then can't actually build the b44ExpLogTable executable program, as it has link issues.

This is with the latest CMake-fixes brach, with minor changes to some of the CMakeLists.txt files for the OpenEXR component in order to append "-2_0" to some of the libraries in IlmBase things link against (which coincidently is a change needed to use OpenEXR with CMake on both Linux and OS X).

On OS X, generation of b44ExpLogTable fails completely, as for some reason it can't find libHalf.10.dylib to link against - the target lib's there, so maybe a missing LINK_DIRECTORIES() command to specify the library search path? I can't work out why it does build on Linux and not on OS X, as there doesn't seem to be any platform-specific stuff, but I haven't really got the time to look into it properly I'm afraid:

To fix this issue locally for my own usage, I've just removed that custom command generation and running, and included the 1.1 MB generated file in the .tar.bz2 I'm using as the OpenEXR sourcedrop which then gets around the issue.

IlmImf won't compile on Mac OS X 10.5

Mac OS X 10.5 lacks posix_memalign(), so compilation fails:

g++ -dynamic -no-cpp-precomp -falign-loops=16 -pipe -Wall -g -O0 -DFLDEBUG -DBUGHUNT -D_REENTRANT -D_GNU_SOURCE -DHAVE_CONFIG_H -I. -I. -I../config -I/Users/philb/4.4/build/baselight/Darwin-gcc-4.0.1-64/debug/include/OpenEXR -D_THREAD_SAFE -I.. -I../config -I/Users/philb/4.4/build/baselight/Darwin-gcc-4.0.1-64/debug/include -arch x86_64 -m64 -DCONFIG_64_BIT -DFL_LITTLE_ENDIAN -fPIC -pipe -g -O2 -c ImfScanLineInputFile.cpp -o ImfScanLineInputFile.o
ImfSystemSpecific.h: In function 'void* Imf_2_0::EXRAllocAligned(size_t, size_t)':
ImfSystemSpecific.h:64: error: 'posix_memalign' was not declared in this scope
make[2]: *** [ImfScanLineInputFile.lo] Error 1

ilmbase libs get postfixed with a version id

So, just tried that dev branch, and even though I can confirm build issues with CMake are now fixed, it still generates libs with names postfixed by major/minor version numbers (like e.g. libIex-2_2 and so on).

Issue is, most (all?) dependency libs, like e.g. OSL, do not support that naming at all in their own CMake build system, by default. They tend to consider that naming as an ilmbase problem, too.

So, is there a way to disable that post-fix in naming (looking at CMake file, it does not seem so)? If not, would it be possible to either drop that (not quite sure why it is here in the first place?), or add an option to bypass it?

Cheers,
Bastien

IexMathFpu build error

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../config -I.. -I../Iex
-I../config -pipe -g -O2 -pthread -c IexMathFpu.cpp -fPIC -DPIC -o
.libs/IexMathFpu.o
IexMathFpu.cpp: In function 'void
Iex::FpuControl::restoreControlRegs(const ucontext_t&, bool)':
IexMathFpu.cpp:231:38: error: 'struct _libc_fpstate' has no member named
'cwd'
IexMathFpu.cpp:232:40: error: 'struct _libc_fpstate' has no member named
'mxcsr'

I'll add the missing stdint include. What version of kernel and glibc do
you have? Looks like we'll have to put together an additional
implementation of the fpu routines.

Good morning,

libc6 2.11.3-3
linux-image-2.6.32-5-amd64 2.6.32-41squeeze2

I am running AMD64-kernel with 32bit userland, ilmbase has been
configured with --build=i486-linux-gnu.

thanks, cu andreas

IlmImf Thread should report an 'optimal' number ofthreads to use.

One thing regarding threads and the IlmThread::ThreadPool. It would be useful with a, Imf::idealThreadCount() to query for the ideal number of threads for your current architecture. This is probably not need when running OpenEXR from a renderer or more complex application but extremely useful when running pipeline utilities with "OpenEXR-only" linked.
Not sure though how much it relates to OpenEXR but if the platform specific code is in place it would really be superb.

Mikael

ImfNamespace.h not installed by cmake

This file is missing in the cmake installation step. Noticed it while I was trying to get OpenExr 2.0 running with OpenImageIO on Windows. Checked Pull request #57 and #63, which contain possible fixes, but none have this particular one

--disable-boostpythontest configure flag for pyilmbase does not work

The help message says:

*** You can also run configure with --disable-boostpythontest to skip this test.

However, adding the flag still has the test run for me. The relevant chunk of configure:
15677
15678 # Check whether --enable-boostpythontest was given.
15679 if test "${enable_boostpythontest+set}" = set; then :
15680 enableval=$enable_boostpythontest;
15681 else
15682 enable_programtest=yes
15683 fi
15684

gcc 4.8 compilation issues

Seems like gcc 4.8 has stricter rules. See the build log below:

dpkg-checkbuild
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../config -I/usr/include/OpenEXR -pthread -I.. -I../config -D_FORTIFY_SOURCE=2 -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c -o ImfHuf.lo ImfHuf.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../config -I/usr/include/OpenEXR -pthread -I.. -I../config -D_FORTIFY_SOURCE=2 -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c ImfHuf.cpp -fPIC -DPIC -o .libs/ImfHuf.o
In file included from ImfHuf.cpp:50:0:
ImfAutoArray.h: In constructor 'Imf_2_1::AutoArray<T, size>::AutoArray()':
ImfAutoArray.h:62:39: error: 'memset' is not a member of 'std'
AutoArray (): _data (new T [size]) {::std::memset(_data, 0, size * sizeof(T));}
^
ImfAutoArray.h:62:39: note: suggested alternatives:
In file included from /usr/include/features.h:371:0,
from /usr/include/limits.h:26,
from /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:168,
from /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:7,
from /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:34,
from /usr/include/OpenEXR/ImathInt64.h:46,
from ./ImfInt64.h:44,
from ImfHuf.cpp:49:
/usr/include/x86_64-linux-gnu/bits/string3.h:76:1: note: 'memset'
__NTH (memset (void ___dest, int __ch, size_t __len))
^
/usr/include/x86_64-linux-gnu/bits/string3.h:76:1: note: 'memset'
In file included from /usr/include/c++/4.8/iosfwd:40:0,
from /usr/include/c++/4.8/ios:38,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/postypes.h: At global scope:
/usr/include/c++/4.8/bits/postypes.h:98:11: error: 'ptrdiff_t' does not name a type
typedef ptrdiff_t streamsize; // Signed integral type
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:116:67: error: expected type-specifier before 'ptrdiff_t'
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:116:67: error: expected '>' before 'ptrdiff_t'
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:127:15: error: '_Pointer' does not name a type
typedef _Pointer pointer;
^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:129:15: error: '_Reference' does not name a type
typedef _Reference reference;
^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:179:15: error: 'ptrdiff_t' does not name a type
typedef ptrdiff_t difference_type;
^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:190:15: error: 'ptrdiff_t' does not name a type
typedef ptrdiff_t difference_type;
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/stl_iterator.h:101:69: error: wrong number of template arguments (5, should be 3)
typename iterator_traits<_Iterator>::reference>
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:118:12: error: provided for 'template<class _Category, class _Tp, class _Distance> struct std::iterator'
struct iterator
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/stl_iterator.h:403:66: error: wrong number of template arguments (5, should be 3)
: public iterator<output_iterator_tag, void, void, void, void>
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:118:12: error: provided for 'template<class _Category, class _Tp, class _Distance> struct std::iterator'
struct iterator
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/stl_iterator.h:494:66: error: wrong number of template arguments (5, should be 3)
: public iterator<output_iterator_tag, void, void, void, void>
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:118:12: error: provided for 'template<class _Category, class _Tp, class _Distance> struct std::iterator'
struct iterator
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/stl_iterator.h:588:66: error: wrong number of template arguments (5, should be 3)
: public iterator<output_iterator_tag, void, void, void, void>
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:118:12: error: provided for 'template<class _Category, class _Tp, class _Distance> struct std::iterator'
struct iterator
^
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/OpenEXR/IexMacros.h:46,
from /usr/include/OpenEXR/Iex.h:48,
from ImfHuf.cpp:51:
/usr/include/c++/4.8/bits/stl_algobase.h: In static member function 'static Tp std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(const Tp, const Tp, Tp)':
/usr/include/c++/4.8/bits/stl_algobase.h:370:10: error: 'ptrdiff_t' does not name a type
const ptrdiff_t _Num = __last - __first;
^
/usr/include/c++/4.8/bits/stl_algobase.h:371:8: error: '_Num' was not declared in this scope
if (_Num)
^
/usr/include/c++/4.8/bits/stl_algobase.h:373:22: error: '_Num' was not declared in this scope
return __result + _Num;
^
/usr/include/c++/4.8/bits/stl_algobase.h: In static member function 'static Tp std::__copy_move_backward<_IsMove, true, std::random_access_iterator_tag>::__copy_move_b(const Tp, const Tp, _Tp*)':
/usr/include/c++/4.8/bits/stl_algobase.h:565:10: error: 'ptrdiff_t' does not name a type
const ptrdiff_t _Num = __last - __first;

....

testBox failure on i386

System Slackware 14.0, 32 bit, gcc 4.7.1

Compiles but "make check" fails into the testing of ImathTest. I'm trying to put together a full clean build/install of OpenEXR, CTL (1.5 rc) to utilize ultimately ctlrender command for some testing. I've removed prior builds and removed openexr 1.7.0 package which comes with Slackware by default.

lt-ImathTest: testBox.cpp:253: void {anonymous}::testExtendByPoint(const char*) [with T = Imath_2_0::Vec2]: Assertion `b.min == p && b.max == p' failed.
/bin/sh: line 5: 8024 Aborted ${dir}$tst

FAIL: ImathTest

#1 of 1 test failed

make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory /home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest' make[1]: *** [check-am] Error 2 make[1]: Leaving directory/home/qbit/Documents/OpenEXR/openexr-2.0.1/IlmBase/ImathTest'
make: *** [check-recursive] Error 1
qbit@0xFFFB:~/Documents/OpenEXR/openexr-2.0.1/IlmBase$

Thanks,
Bill Mandel

document typo

For TechnicalIntroduction_2.0.pdf, on page 5, the description of HALF indicates a wrong reference page.
(See The HALF Data Type, on page 18) should be on page 15

For ReadingAndWritingImageFiles_2.0.pdf, on page 25, to read a deep scan line file, the last line of code
file.getPixelSampleCounts() should be file.readPixelSampleCounts(). On page 26, we should not have that delete for loop. On page 28, getPixelSampleCounts() again need to change to readPixelSamplecounts(). On page 29, should not have the for loop of deleting arrays.

Build option for a custom namespace

We use OpenEXR as part of an SDK that we distribute to customers. In that, we include the necessary object files within our static libraries. Some of our customers use OpenEXR in their software as well causing link errors.

It would be helpful if a custom namespace for OpenEXR could be specified at build time so that these conflicts would not occur.

Race condition in creation of LockedTypeMap and registerAttributeTypes

Mutex will only be initialized on first call, suggestion is to move the static Mutex outside of the function.

Mike


IlmImf/ImfAttribute.cpp

LockedTypeMap &
typeMap ()
{
// race condition
static Mutex criticalSection;
// end race condition
Lock lock (criticalSection);

static LockedTypeMap* typeMap = 0;

if (typeMap == 0)
typeMap = new LockedTypeMap ();

return *typeMap;

}

OpenEXR/IlmImf/ImfHeader.cpp

void
staticInitialize ()
{
// race condition
static Mutex criticalSection;
// end race condition
Lock lock (criticalSection);

static bool initialized = false;

if (!initialized)
{

bug #37900: Semaphore::wait() gets interrupted on Posix

Bringing over from Savannah:
https://savannah.nongnu.org/bugs/?37900

Tue 11 Dec 2012 01:39:32 PM UTC, original submission:

In ilmbase-1.0.2/IlmThread/IlmThreadSemaphorePosix.cpp, the implementation of Semaphore::wait() does not check for interrupt. As a result, the ThreadPool does not always wait until all threads are finished before deleting the task group, leading to accessing of deleted memory.

The fix is to change Semaphore::wait() from

::sem_wait( &_semaphore );

to

while( ::sem_wait( &_semaphore ) == -1 && errno == EINTR )
{
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.