• 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
Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy


  • Subject: Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy
  • From: Chris Idou <email@hidden>
  • Date: Mon, 30 Mar 2009 21:05:34 -0700 (PDT)


Thanks for the links.

If I run with libgmalloc, it dies the same way, but seemingly much quicker:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000032
0x95a82688 in objc_msgSend ()
(gdb) where
#0  0x95a82688 in objc_msgSend ()
#1  0x90894910 in processColor ()
#2  0x9089395b in CharAttr ()
#3  0x9088db34 in -[NSRTFReader attributedString] ()
#4  0x9070bc03 in _NSReadAttributedStringFromURLOrData ()
#5  0x90709943 in -[NSAttributedString(NSAttributedStringKitAdditions) initWithData:options:documentAttributes:error:] ()
#6  0x9088c542 in -[NSAttributedString(NSAttributedStringKitAdditions) initWithRTF:documentAttributes:] ()

I also found a posting with someone with the exact same problem:

http://www.mail-archive.com/email@hidden/msg27895.html

I'm not sure what else to try. I'd be inclined to jump to the conclusion of blaming Apple, if it wasn't that this API must be a very widely called one.





________________________________
From: Sean McBride <email@hidden>
To: Chris Idou <email@hidden>; email@hidden
Sent: Tuesday, 31 March, 2009 2:43:18 PM
Subject: Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy

Chris Idou (email@hidden) on 2009-03-30 8:25 PM said:

>I'm getting NSRTFDPboardType and NSRTFPboardType objects as NSData from
>the pasteboard and I'm storing them in a core data XML repository and
>getting them out again, and when necessary I'm converting them into
>NSAttributedString with initWithRTF or initWithRTFD. This mostly works
>but every now and then, actually quite often, this initWithRTF(D)
>crashes with EXC_BAD_ACCESS. (stack traces below).
>
>The thing is, I'm doing an md5Hash on the NSData objects every single
>time I store them and retrieve them just to make sure they are not
>corrupted, and the exact same NSData that is working one minute as an
>argument to initWithRTF(D), makes it crash later on.
>
>I'm using garbage collection, but I've solved a lot of GC problems and
>this doesn't seem similar.
>
>Has anyone got any thoughts?

What else have you tried?

<http://developer.apple.com/technotes/tn2004/tn2124.html>

<http://www.sealiesoftware.com/blog/archive/2008/09/22/
objc_explain_So_you_crashed_in_objc_msgSend.html>


      Enjoy a safer web experience. Upgrade to the new Internet Explorer 8 optimised for Yahoo!7. Get it now.
_______________________________________________

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

References: 
 >EXC_BAD_ACCESS and NSAttributedString driving me crazy (From: Chris Idou <email@hidden>)
 >Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy
  • Next by Date: Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy
  • Previous by thread: Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy
  • Next by thread: Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy
  • Index(es):
    • Date
    • Thread