USER 44
| Sat, 2008-03-08 10:48 | |
|
Hi everybody, i have a problem with the following code. void CXmlHandler::OnStartElementL( const RTagInfo& aElement,It gives USER 44 error. please help me in solvin this problem. #include "XMLData.h"Thank you very much in advance... please help me friends. Netrananda. |
|






Forum posts: 1157
The HBufC8::NewLC method that you use in AddAttributeL pushes the new buffer on the cleanup stack, but I can't find where you pop it.
Which line crashes anyway? The debugger should show you this.
René Brunner
Forum posts: 72
Please do the required correction in the above code.
because
i used HBufC8::NewL insted of HBufC8::NewLC but still same errors comes.
descripter is very confusing concept of the Symbian C++ i think.
Thanks again.
Forum posts: 1157
Well, that NewLC thing certainly is wrong and needs correction, one way or the other. If it still does not run with NewL() instead of NewLC(), there must be other errors. I just don't see it, because I cannot run the code.
Say again, which line crashes? That's a valuable hint.
If you don't know because you don't use a debugger so far, here my standard advice: Learn how to debug. No chance without it.
René Brunner
Forum posts: 134
Hi
From SDK:
This panic is raised by the Free() and FreeZ() member functions of an RHeap. It is caused when the cell being freed overlaps the next cell on the free list (i.e. the first cell on the free list with an address higher than the one being freed).
From your code:
ElementName = HBufC8::NewLC(EName.Length()); //SetElementNameL(const TDesC8& EName)
attribute[AttributeCount].AttributeName = HBufC8::NewLC(AName.Length()); //AddAttributeL
attribute[AttributeCount].AttributeValue = HBufC8::NewLC(AValue.Length());
You are pushing the buffer into stack thrice and never popped out .Hope it'll give u a hint otherwise as rbrunner suggested you should debug your code.this is the best way to find out bugs. I'll suggest you one thing also do take care of stack at time of coding as it can be the reason of the serious problem if u miss a single point.
Regards,
Isha
"To the question of your life , you are the only Answer. To the problems of your life,you are the only Solution".