• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSXMLDocument Crashing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSXMLDocument Crashing


  • Subject: NSXMLDocument Crashing
  • From: Brad Miller <email@hidden>
  • Date: Tue, 28 Aug 2007 18:40:34 -0700

Hi,

I'm getting a crash when creating an NSXMLDocument. It appears that having an unknown entity in the xml data is the trigger. It doesn't happen all of the time though, I'm getting it maybe 1 out of 100 tries. The two times I've caught it, the xml had an unknown/bad entity in it (one was eacute and the other an un-escaped &). So I think that's what's triggering the crash inside of libxml. The stack trace I'm getting on the crash is:

Thread 0 Crashed:
0 libobjc.A.dylib 0x90a594c7 objc_msgSend + 23
1 libxml2.2.dylib 0x91bf6fab __xmlRaiseError + 966
2 libxml2.2.dylib 0x91c042bf xmlParseExternalID + 1084
3 libxml2.2.dylib 0x91c04592 xmlParseDocTypeDecl + 357
4 libxml2.2.dylib 0x91bec2e2 xmlParseChunk + 5055
5 libxml2.2.dylib 0x91c870e3 xmlUCSIsCatZs + 2205
6 libxml2.2.dylib 0x91be6482 xmlTextReaderRead + 265
7 com.apple.Foundation 0x928691b0 -[NSXMLTreeReader parse] + 108
8 com.apple.Foundation 0x9286883c -[NSXMLDocument initWithData:options:error:] + 964
9 com.CynicalPeak.Cyndicate 0x00010685 -[IRConnection parseData] + 369 (IRConnection.m:810)
10 com.CynicalPeak.Cyndicate 0x0000ec05 -[IRConnection connectionDidFinishLoading:] + 28



The xml data is being loaded from the internet using an NSURLConnection. When the connectionDidFinishLoading: callback is received I'm simply taking the data that was received and calling doc = [[NSXMLDocument alloc] initWithData:data options:nil error:&err];


Does anyone have any ideas or suggestions for fixing the crash?

Thanks,

Brad
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSXMLDocument Crashing
      • From: Ken Tozier <email@hidden>
  • Prev by Date: Re: NSScrollerView Problem
  • Next by Date: Re: NSXMLDocument freezes UI
  • Previous by thread: Cocoa Window menu with Carbon windows?
  • Next by thread: Re: NSXMLDocument Crashing
  • Index(es):
    • Date
    • Thread