Re: pyilmbase problems importing imath
Federico Naum <[email protected]>
| Newsgroups | gmane.comp.video.openexr.devel |
|---|---|
| Organization | Animal Logic |
| Message-ID | <[email protected]> |
Hi Piotr, I think this is more related to what Nick is pointing out (but I'm on Linux not in Windows) Regarding the lines with NAMESPACE that I put in the post, I mix them, but just to stress that I'm seeing the same problem either with version 1.X and version 2.X of both ilmbase and pylmbase On verison 1.X there was no namespaces code around that piece of code and I'm still seeing the same issue. (crash in the same line) But, I don't know what to try, so I'll give it a go to ilmbase 2.1.0, and I'll report back Thanks Fede On 13/02/14 05:33, Piotr Stanczyk wrote: Hey - How did you build IlmBase? Pre- 2.1.0 releases had a bug when building with custom namespaces Piotr On 11 February 2014 23:50, Federico Naum <[email protected] > wrote: 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 [email protected] https://lists.nongnu.org/mailman/listinfo/openexr-devel _______________________________________________ Openexr-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/openexr-devel