• 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: Crash for buffer partially allocated?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash for buffer partially allocated?


  • Subject: Re: Crash for buffer partially allocated?
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 24 Sep 2012 12:25:49 -0500

On Sep 24, 2012, at 11:46 AM, Jean-Denis MUYS wrote:

> This a Flex native extension running on iOS (Yes, I know, don't rub salt in the wound). It crashes with an EXC_BAD_ACCESS when constructing a C++ object. The C++ object is declared, and therefore allocated and constructed, within a dispatch_async block.
>
> The crash is on a line that sets a long member to 0. The allocation returned a pointer that is not NULL. All data members up the one crashing can be read (and written) just fine. The one crashing, and all that follow, are not readable at all. LLDB says "error: read memory from 0x17bf28c failed (0 of 4 bytes read)".

Is there any chance that you've violated the One Definition Rule?  In particular, does your class declaration have any conditional compilation in it, like #if or #ifdef?  I've seen people try to be clever by enabling or disabling Objective-C parts of a class definition based on the language being compiled, but of course that will cause nothing but grief.

Other than that, I recall that there were some issues with C++ and blocks, although I can't recall the specifics.  That was some time ago, and I would hope that Apple and the clang developers would have ironed them out by now.

Regards,
Ken


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Crash for buffer partially allocated?
      • From: Jean-Denis MUYS <email@hidden>
References: 
 >Crash for buffer partially allocated? (From: Jean-Denis MUYS <email@hidden>)

  • Prev by Date: Re: Apple app review guideline.. really not clear
  • Next by Date: Non-profits and dev program requirements
  • Previous by thread: Crash for buffer partially allocated?
  • Next by thread: Re: Crash for buffer partially allocated?
  • Index(es):
    • Date
    • Thread