• 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: crashes after changing signatures of virtual functions / virtual inherited classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: crashes after changing signatures of virtual functions / virtual inherited classes


  • Subject: Re: crashes after changing signatures of virtual functions / virtual inherited classes
  • From: Stephan Huber <email@hidden>
  • Date: Thu, 03 Aug 2006 22:56:35 +0200

Hi,

thanks Chris for your suggestions,

Chris Espinosa schrieb:

This usually indicates a mismatch between a library and its client, which in turn implies that when you changed the header for a library that the client application wasn't rebuilt.

I am a bit unsure, if this is the case for my crashes. I do not change any headers of a library in use, instead I am changing headers of the application. The headers and the source-files are all in the same target and get all compiled into the application-target.


Perhaps the compiler gets confused, because the classes where the problems arise are only used as template-parameters and never used directly? Here's a simplified code-snippet:

class A {
  public:
    virtual void doSomething();
    virtual ~A() {}
};

class B : virtual public A {
  public:
    ...
};
class C : virtual public A {
  public:
    virtual void doSomething() { ... }
};

class D : public B, public C {
...
}

template <class T>
class DCreator {

  public:
     T* operator()() { return new T; }
};

DCreator<D> dcreator = new DCreator<D>();
A* = (*dcreator)();


The class-hierarchy is more complex, when I change something inside one of the baseclasses, which involves changing the signature of one of the virtual functions or adding a new virtual function to a derived class, I get crashes after I compile the source. If I clean my project, then everything is fine.


Any other ideas?

Thanks in advance,
Stephan

_______________________________________________
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:
    • Xcode does not resolve file-dependencies correctly (was: Re: crashes after changing signatures of virtual functions / virtual inherited classes)
      • From: Stephan Huber <email@hidden>
References: 
 >crashes after changing signatures of virtual functions / virtual inherited classes (From: Stephan Huber <email@hidden>)
 >Re: crashes after changing signatures of virtual functions / virtual inherited classes (From: Chris Espinosa <email@hidden>)

  • Prev by Date: re: adding new group
  • Next by Date: Re: crashes after changing signatures of virtual functions / virtual inherited classes
  • Previous by thread: Re: crashes after changing signatures of virtual functions / virtual inherited classes
  • Next by thread: Xcode does not resolve file-dependencies correctly (was: Re: crashes after changing signatures of virtual functions / virtual inherited classes)
  • Index(es):
    • Date
    • Thread