From: Haejoong L. <hae...@un...> - 2003-11-04 17:43:02
|
Hi Guido, I looked into your code and found a problem, which has nothing to do with AGLIB. In the endElement() function of the SAXWPCHandlers class, you declare a string el_name. And then at the end of the function, you call the destructor of the string!!! You should never do that! 116: string el_name = XMLString::transcode(name); ... 135: el_name.~string(); Probably you wanted to deallocate the memory allocated by XMLString::transcode call. If that was the case, you might want to try this: string el_name = StrX(name).localForm(); The StrX class uses XMLString::transcode() to transform the XML string, and deallocates the memory allocated by the function when it is destroyed. -Haejoong On Sat, Nov 01, 2003 at 04:49:55PM +0100, Guido Di Maio wrote: > Hello, > a few mounts ago I succesfully wrote a SAX parser for winpitch file > format (see thhe stupid dtd) using xerces and the plug-in module of agtk > library. I worked fine. > > Now, probably afeter a cvs update the parser do not work anymore. I > simply obtain segmentation fault whenever I try to call the AGAPI library. > I' pretty sure that the problem is not in the SAX parser. > I attach all the file you need to make you try: > the sax handler, the sax test client, and a short xml file. > > can you figure out why ? > > thanks, > Guido Di Maio > |