• 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
Template trouble
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Template trouble


  • Subject: Template trouble
  • From: "Edward K. Chew" <email@hidden>
  • Date: Mon, 28 Aug 2006 15:29:09 -0400

I have been running into a lot of runtime problems bringing a CodeWarrior C++ project over to Xcode. The most problematic classes seem to be those where I have a base class with some virtual methods and a class template deriving from it. If the template object calls on a base class method which, in turn, calls a virtual method implemented back in the template, the Xcode executable sometimes drops the ball and can't find the right virtual method. (The method dispatch table, when gdb lets me see it, seems to have an unusually low address in those instances, and may be pointing to unmapped memory?) This has never occurred in CodeWarrior, and what is frustrating is that the behaviour in Xcode can be unpredictable and difficult to reproduce.

For example, I can simply declare a template object somewhere in main.cp and it messes up the initialization of another object in another source. The test variable need not use the same template data type, nor does it even need to be created before the other one gets initialized. I can't imagine how the one could possibly be affecting the other, but I'm beginning to think something weird is going on at link time.

I have also run into problems with STL objects, usually when they are nested (e.g. a map where each data element is itself a list or a vector). The iterators seem get lost from time to time.

Unfortunately, I have yet to succeed in coming up with a simple example which replicates the behaviour. I was wondering if others have been having these sorts of problems, or if anyone can offer some advice on what I can check next?

-Ted

_______________________________________________
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: Template trouble
      • From: "Edward K. Chew" <email@hidden>
    • Re: Template trouble
      • From: "Edward K. Chew" <email@hidden>
References: 
 >FSRef_fopen alternative (From: "Edward K. Chew" <email@hidden>)

  • Prev by Date: Letterbox Fer Xcode?
  • Next by Date: Re: Template trouble
  • Previous by thread: Re: FSRef_fopen alternative
  • Next by thread: Re: Template trouble
  • Index(es):
    • Date
    • Thread