Re: [libxml++] libxml++ crashing



Wow, this is weird.  The letter I wrote, to which you are responding, was sent on July 18, but didn't get processed and sent out by the list until today the 25th.

Well, since that time this matter has been resolved.  The higher than expected count was as you say...whitespace was being counted.  Furthermore, the crashes I was finding were the result of using libxml++ from a DLL VC project that didn't have the "multi-threaded debug DLL" option turned on.

Thanks,

-Brent

 -------------- Original message ----------------------
From: Jonathan Wakely <cow compsoc man ac uk>
> panoply att net wrote:
> 
> > I've got a VC++ project that depends on libxml++, and crashes when a vector 
> returned from libxml++ goes out of scope (specifically, I'm referring to the 
> find() routine).  I also noticed that the Element::get_children() call always 
> seems to return a higher number of children, for that context node, than the 
> document actually has.  I'm a little suspicious that the faulty "number of 
> children" reporting is responsible for the destruction of non-existent pointers.  
> But I don't know.
> 
> get_children() will include whitespace-only text nodes, Processing
> Instructions, comments, entity declarations and other types of node,
> not just elements.  This is almost certainly why you're seeing a
> higher number than you expect.
> 
> As for the vector, are you taking a reference to it, or a pointer, and
> holding onto that reference longer than you should?
> 
> jon
> 
> 
> -- 
> "The ability to quote is a serviceable substitute for wit."
> 	- W. Sommerset Maugham






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]