Can't add TFolder to TList

Dear Rooters.

I’ve been trying to implement my own class (that i’ve attached) TBDataParser, a class inherited from TSAXParser. The first thing i want is to parse an xml file and for every node that has an attribute “name” create a folder with that name. Of course then i want to access the list of parent folders so i can do operations like currentFolder->RemoveLast() at the end of the callback function TBDataParser::OnEndElement.
The problem is i get a segmentation fault if i try to add a folder created in gROOT->GetRootFolder() to the TList of parent folders. If you run TestParse.C you can see that before getting the segmentation violation it prints the address of the folder and the parent folder list so they do exist…
Is there something wrong with my macro?

EDIT: I’ve added my xml file

Thanks

Matteo
Data.xml.zip (2.76 KB)
TBDataParser.h (697 Bytes)
TBDataParser.C (1.43 KB)
TestParse.C (169 Bytes)

Hi Matteo,

With the trunk I get:root [1] .x TestParse.C (const class TBDataParser)29387808 0x1c36690 0x1c04910 0 0x1c36690 0x1d282b0 1 0x1c36690 0x1cbe560 2 0x1c36690 0x1cfde00 3 Error in <TFolder::TFolder>: folder name cannot contain a slash: 1Gs/s Error in <TList::AddLast>: argument is a null pointer 0x1c36690 0 3 Error: illegal pointer to class object _currentFolder 0x0 427 TBDataParser.C:45: 0x1c36690 0 3 Error: illegal pointer to class object _currentFolder 0x0 427 TBDataParser.C:40: parsing endThe above mentioned error is likely to be the issue.

Cheers,
Philippe.