• 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: CFSocket client side exc_bad_access
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFSocket client side exc_bad_access


  • Subject: Re: CFSocket client side exc_bad_access
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 18 Mar 2014 11:12:50 -0700


On Mar 18, 2014, at 10:47 AM, Jeremy Thompson <email@hidden> wrote:

When the client software calls to send data it does so through a void pointer.  Void *passed_req

CFDataRef sf = (CFDataRef) passed_req;
int slen = CFDataGetLength(sf);

Once I try and get the length of the passed_req I get a bad access error.

Are you saying that the caller has a CFDataRef already but passes it through a void* parameter, and then the code you showed is just casting that pointer back to a CFDataRef? Then that should work fine. But if the caller is just passing a raw pointer to a data block, you can’t legally cast that to a CFDataRef, because it isn’t one.

If this isn’t what’s going on, then you should post some more code for context.

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

This email sent to email@hidden

  • Follow-Ups:
    • Re: CFSocket client side exc_bad_access
      • From: Jeremy Thompson <email@hidden>
References: 
 >CFSocket client side exc_bad_access (From: Jeremy Thompson <email@hidden>)

  • Prev by Date: CFSocket client side exc_bad_access
  • Next by Date: Re: CFSocket client side exc_bad_access
  • Previous by thread: CFSocket client side exc_bad_access
  • Next by thread: Re: CFSocket client side exc_bad_access
  • Index(es):
    • Date
    • Thread