Problem savings objects of a typedef defined in a namespace

Hello,
I am trying to save an object of a user defined class into a TTree. This class is declared in a namespace and contains a private member which is a std::vector of types that are declared with typedef. If I use typedef to declare the types outside of the namespace, then I have no problems. However, if I use the typedef in the namespace, I have problems saving the object to a TTree. The macro seg. faults when closing the root file.

I have made a simplified macro of what I am doing to hopefully illustrate this problem.

When I use the following macro I have no problems when I run “root -l -b -q testGood.C+” at the prompt:

#include <vector>
#include "TFile.h"
#include "TTree.h"
#include "TObject.h"

typedef Float_t AddressValue_t; //takes 4 bytes
typedef UInt_t AddressIndex_t; //takes 4 bytes

class Address : public TObject
{
 private:
  std::vector< std::pair<AddressIndex_t, AddressValue_t> > _coordinates;
 public:
  Address(){};
  ~Address(){};
  ClassDef(Address, 1)
};  //End class Address

void testGood()
{
 TFile f_address("address.root","RECREATE");
 TTree t_address("t_address","A Tree with Addresses");

 Address *address = new Address();
 t_address.Branch("Addresses", "Address", &address);
 t_address.Fill();
 t_address.Write();
 f_address.Close();
}

However, when I use the following macro where the typedef is moved into the namespace and run “root -l -b -q testBad.C+” at the prompt, the code seg. faults upon closing:

#include <vector>
#include "TFile.h"
#include "TTree.h"
#include "TObject.h"

namespace acb
{
 typedef Float_t AddressValue_t; //takes 4 bytes
 typedef UInt_t AddressIndex_t; //takes 4 bytes

 class Address : public TObject
 {
  private:
  std::vector< std::pair<acb::AddressIndex_t, acb::AddressValue_t> > _coordinates;
  public:
  Address(){};
  ~Address(){};

  ClassDef(Address, 1)
 };  //End class Address
}//End namespace acb

void testBad()
{
 TFile f_address("address.root","RECREATE");
 TTree t_address("t_address","A Tree with Addresses");

 acb::Address *address = new acb::Address();
 t_address.Branch("Addresses", "acb::Address", &address);
 t_address.Fill();
 t_address.Write();
 f_address.Close();
}

Here is the stack trace:

Thank you in advance for any assistance.

Update:
It appears that the code will execute fine even if I declare the typedef in the namespace as long as I change how I declare _coordinates.

If I replace the single line:

std::vector< std::pair<acb::AddressIndex_t, acb::AddressValue_t> > _coordinates;

with:

std::vector< std::pair<AddressIndex_t, AddressValue_t> > _coordinates;

then everything works fine. It appears that using the scope operator within the same namespace is causing the trouble. I guess that is the work around.

I discovered that I was using an older version of ROOT 5.26/00. In the later versions, this is fixed, and the problem goes away.