언어 설정

Menu
Sites
Language
xmlSAXUserParseMemory Problems

I have a project ported from bada that uses xmlSAXUserParseMemory.  It was fine in bada but it is wreaking havoc in my Tizen app.  If I use it too often it eventually crashes my app and using it even once after a call to EvaluateJavascriptN will call all subsequent calls to freeze or crash.  Here is the code:

MethodResult* parse( ByteBuffer* buffer ) 

{

MethodResult* result = new MethodResult();
int ret = xmlSAXUserParseMemory( &(result->saxHandler), result, (char*)buffer->GetPointer(), buffer->GetRemaining() );
xmlCleanupParser();
if ( ret != 0 )
{
 delete result;
 return NULL;
}
return result;
}

Again, this worked fine in bada.

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

8 댓글
Ben Prendergast
Answered my own question. Apparently there was an error in the XML, however the xmlSAXUserParseMemory function did not return an error. Rather it just leaked memory and caused instability...
Mohan Kumar
Hi Ben I am looking for an example to parse a string using SAXParser. can you give some sample app ? Regards Mohan
hgw7
Hi Mohan, There is a sample native application "XmlParserApp" that can help you. Or you can go to Help Contents and check 'Libxml2' guide under this: Tizen Native App Programming > Programming Guide > Libraries.
alan cubero

It's possible that the issue you're experiencing with xmlSAXUserParseMemory in your Tizen app is related to differences in how memory is managed between the two platforms.

Charles Albers

Thanks to everyone who answered.

Alex Hopkins


 

Great Information sharing. I am very happy to read this article. thanks for giving us go thorough info. Fantastic nice. I appreciate this post 

 

 

michealjasson

The issue you're facing with the xmlSAXUserParseMemory function in your Tizen app might be related to compatibility or memory management differences between the bada platform and Tizen Austin photo booth rental. To resolve the problem, you can try the following steps:


Make sure you're using the correct XML parsing functions and libraries for the Tizen platform. Tizen uses the Expat library for XML parsing, so ensure that you have the necessary includes and linked libraries for Expat in your Tizen project. 

Kath Rose

The xmlSAXUserParseMemory function did not produce an error despite the fact that the Hamilton painters XML contained an error. Rather, it merely produced instability and memory leaks.