• 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 in virtual method call
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash in virtual method call


  • Subject: Re: Crash in virtual method call
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 11 Jun 2008 21:14:46 -0700


On 11 Jun '08, at 2:55 PM, Doug Hill wrote:

The method crashes because an input parameter passed to it comes in as a bad pointer. Its pointer value is 4 less than the actual passed in value.

Does your real code use multiple inheritance? You can run into trouble like this with MI, where the 'this' pointer will be offset by the runtime to point to where a secondary base class's instance data begins. Doing type-casting of object pointers in the wrong way can interfere with this and get the wrong offsets applied.


(If this is the case, I can't offer more detailed advice, as I've always tried to stay as far away as possible from MI in C++ for just these sorts of reasons...)

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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 in virtual method call
      • From: Doug Hill <email@hidden>
References: 
 >Crash in virtual method call (From: Doug Hill <email@hidden>)

  • Prev by Date: Re: Error on compile
  • Next by Date: Re: OT Transferring a WWDC Ticket?
  • Previous by thread: Re: Crash in virtual method call
  • Next by thread: Re: Crash in virtual method call
  • Index(es):
    • Date
    • Thread