Date: Wed, 12 Feb 2014 18:50:21 +1100
From:
address@hidden
To:
address@hidden
CC:
address@hidden
Subject: [Openexr-devel] pyilmbase problems importing imath
Hi
Hope this is the forum to ask.
I'm building pyilmbase 1.0.0 under llinux Centos 6.2, with
ilmbase 1.0.3, gcc4.1.2 and boost 1.44.0 (also tried all
combinations of the newer version of pyilmbase 2.0.0/1
against ilmbase 2.0 with newer compiler gcc446, and several
flavours boost.
In all cases I can build successfully and import
iex just
fine, but importing
imath does SegFault, it does
crashed on line 241 of PyIex.h
240│ const
TypeTranslator<IEX_NAMESPACE::BaseExc>::ClassDesc
*baseDesc = baseExcTranslator().template
findClassDesc<ExcBase>(baseExcTranslator().firstClassDesc());
241├> std::string baseName =
baseDesc->typeName();
242│ std::string baseModule = baseDesc->moduleName();
baseDesc ends up with a nullPointer (const
PyIex::TypeTranslator<Iex_2_0::BaseExc>::ClassDesc *)
0x0
As importing
iex works fine, I changed the code in
imathmodule.cpp to kind of copy how the Exception gets
registered.
<
PyIex::registerExc<Imath::NullVecExc,Iex::MathExc>("NullVecExc","imath");
<
PyIex::registerExc<Imath::NullQuatExc,Iex::MathExc>("NullQuatExc","imath");
<
PyIex::registerExc<Imath::SingMatrixExc,Iex::MathExc>("SingMatrixExc","imath");
<
PyIex::registerExc<Imath::ZeroScaleExc,Iex::MathExc>("ZeroScaleExc","imath");
<
PyIex::registerExc<Imath::IntVecNormalizeExc,Iex::MathExc>("IntVecNormalizeExc","imath");
---
>
PyIex::registerExc<Imath::NullVecExc,Iex::BaseExc>("NullVecExc","iex");
>
PyIex::registerExc<Imath::NullQuatExc,Iex::BaseExc>("NullQuatExc","iex");
>
PyIex::registerExc<Imath::SingMatrixExc,Iex::BaseExc>("SingMatrixExc","iex");
>
PyIex::registerExc<Imath::ZeroScaleExc,Iex::BaseExc>("ZeroScaleExc","iex");
>
PyIex::registerExc<Imath::IntVecNormalizeExc,Iex::BaseExc>("IntVecNormalizeExc","iex");
This way I can import
imath, and in python land I
can see that the
imath module contains the
registered exceptions and I can raise/try/catch them. but
this code change seems fishy since nothing else seems to
have reported and the code in the latest version remains the
same.
I saw someone else did the same change (back in 2012)
https://groups.google.com/forum/#!searchin/alembic-discussion/Cannot$20build$20windows/alembic-discussion/OMOvhg0Nv7o/VnJRrByVv10J
but I'm pretty sure I am missing something more obvious
also it caught my attention that I get this warning on gdb
PyIex::TypeTranslator<Iex_2_0::BaseExc>::findClassDesc<Iex_2_0::MathExc>
(this=0x6e6510, cd=0x6eaa00) at
/scratch/federicon/git/rezExternalPackages/pyilmbase/2.0.0/build/2/pyilmbase-prefix/src/pyilmbase/PyIex/Py
IexTypeTranslator.h:262
(gdb) print cd->typeInfo()
warning: RTTI symbol not found for class
'PyIex::TypeTranslator<Iex_2_0::BaseExc>::ClassDescT<Iex_2_0::BaseExc>'
could it be related to the realtime type info? I made
sure that ilmbase and pyilmbase were compiled wihout the
-fno-rtti so it should be on by default
Hope someone can help me find the issue
Thanks in advance
Fede
_______________________________________________
Openexr-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/openexr-devel