Hi, Brett Viren wrote: > I'm trying to use PyROOT with classes that return STL containers. Eg > I have a class that reutrns an "std::vector<std::string>". Some of > the std::vector methods work but some don't, particularly operator[]. > > print vs > <__main__.vector<string> object at 0x41d1124c> > print vs.size() > 37 > print vs[0] > *** Break *** illegal instruction I'm afraid the problem is more general. I see STL related trouble in ROOT without the Python wrapping. My full script gives "illegal instruction". The shortest shows different behavior: <session> [nikulin@lx13cmd:root]$ cat vector_fail.C { vector<Double_t> v; Int_t i; for (i = 0; i < 10000; ++i) { v.push_back(100); } } [nikulin@lx13cmd:root]$ root ******************************************* * * * W E L C O M E to R O O T * * * * Version 4.01/03 5 October 2004 * * * * You are welcome to visit our Web site * * http://root.cern.ch * * * ******************************************* FreeType Engine v2.1.3 used to render TrueType fonts. Compiled for linux with thread support. CINT/ROOT C/C++ Interpreter version 5.15.153, Sep 20 2004 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] #include <vector> root [1] .x vector_fail.C Loop Compile Internal Error: Illegal instruction 0 FILE:vector_fail.C LINE:4 *** Break *** segmentation violation </session> root.exe is sleeping... ROOT: CVS, September, 29 OS: Fedora Core 2 Hardware: Intel Pentium 4 -- Maxim Nikulin
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET