Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x2c in CXMLElement #39

Open
conqueror opened this issue Jan 9, 2014 · 2 comments
Open

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x2c in CXMLElement #39

conqueror opened this issue Jan 9, 2014 · 2 comments

Comments

@conqueror
Copy link

We have used TouchXML in our app to parse XMLs coming from our backend.
In some circumstances app gives EXC BAD ACCESS in the following method:[CXMLElement attributeforName:]
Is there anyone who experienced this? I did not debugged it in detail yet but I think it is happening in xmlStrcmp(theLocalName, theCurrentNode->name) part.
More specifically in theCurrentNode->name.

while (theCurrentNode != NULL)
{
if (xmlStrcmp(theLocalName, theCurrentNode->name) == 0)
{
if (thePrefix == NULL || (theCurrentNode->ns
&& theCurrentNode->ns->prefix
&& xmlStrcmp(thePrefix, theCurrentNode->ns->prefix) == 0))
{
CXMLNode *theAttribute = [CXMLNode nodeWithLibXMLNode:(xmlNodePtr)theCurrentNode freeOnDealloc:NO];
return(theAttribute);
}
}
theCurrentNode = theCurrentNode->next;
}
return(NULL);
It is very hard to debug this because it happens randomly and it is not happening in all nodes. So let me know if you experienced this and there is a way to prevent this.
Thanks for your help in advance.

@RameshAran
Copy link

I am also facing this issue.

@RameshAran
Copy link

I just noticed that in Class "CXMLDocument", we are using "AutoReleasePool" in "dealloc" method as given below.

Is this is the right way of memory management? I am not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants