id summary reporter owner description type status milestone component version severity resolution keywords cc 1952 [saywhat] The operation static_cast(boost::python::extract(...)) crashes Python. Seems to create reference counting problem. Konstantin Aslanidi Dave Abrahams "I submit boost::python based python extension code that crashes Python interpreter when used as described below. I attach Visual Studio .NET project files. C:\KDocuments\Variance Swap Validation 2\VarSw2\Debug>python ActivePython 2.5.2.2 (ActiveState Software Inc.) based on Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit (Intel)] on win32 Type ""help"", ""copyright"", ""credits"" or ""license"" for more information. >>> import vrsw2 >>> p=vrsw2.VarSwapTest() >>> p.set(((1,2),(3,4))) The C++ extension code: #include #include #include #include using namespace boost::python; class VarSwapTest { private: class Impl { private: std::ofstream theFile; public: Impl() : theFile(""VarSwapTestEcho.txt"") {} void set( object& input ) { object o=input.attr(""__str__"")(); extract ex(o); if( ex.check() ) theFile<<(static_cast(ex()))< theImpl; public: VarSwapTest() : theImpl(new Impl()) {} void set( object input ) { theImpl->set(input); } }; BOOST_PYTHON_MODULE(vrsw2) { class_(""VarSwapTest"") .def(""set"",&VarSwapTest::set) ; } " Bugs closed Boost 1.36.0 python USE GITHUB Boost 1.35.0 Showstopper worksforme python extract troy@…