views:

121

answers:

1

Hi All,

I am new with xCode and objective C.

I am using NSXMLParser to parse my xml data and then saved it to sqlite database.

Following is my code to start xml parsing.

NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData: data];
[xmlParser setDelegate: self];
[xmlParser setShouldResolveExternalEntities: YES];
[xmlParser parse];
[xmlParser release];

My iPhone application will crash from xml parsing and debugger showing me following stack value:

#0 0x940de286 in mach_msg_trap
#1 0x940e5a7c in mach_msg
#2 0x0093d382 in CFRunLoopRunSpecific
#3 0x0093cc48 in CFRunLoopRunInMode
#4 0x0001f7ad in GSEventRunModal
#5 0x0001f872 in GSEventRun
#6 0x0168a003 in UIApplicationMain
#7 0x00002abc in main at main.m:14

Please help me to reply why this crash happen.

Please also tell me that how to interpret this debugger stack value.

Thanks in advance,

Punita

A: 

Thanks All for your help!

My problem is solved.

I had found solutions from following URLs:

http://www.iphonedevsdk.com/forum/iphone-sdk-development/5695-exc_bad_access-sigsegv-error.html

stackoverflow.com/questions/546588/objective-c-memory-management-xml-parser-and-other-non-trivial-examples

developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html

Thanks, Punita

Punita