Re: Disappointed with XCode debugging
Re: Disappointed with XCode debugging
- Subject: Re: Disappointed with XCode debugging
- From: Ricky Sharp <email@hidden>
- Date: Sat, 17 Apr 2004 22:24:11 -0500
On Apr 17, 2004, at 9:39 PM, Ricky Sharp wrote:
I must say that I'm very disappointed with XCode. While I did manage
to migrate my CFM--based app from CodeWarrior and got it to compile
and link, it does nothing but crash.
Then, when using the debugger, I can't seem to display values of class
data. But what I found even worse was that the Value column
completely lies about values.
It seems that if you have local variables in registers, the values
column doesn't show the correct value. Thus, I got rid of the register
keyword and could then see the correct values. Will definitely file a
bug soon on this.
For example:
register int i = 0;
became
int i = 0;
I think I've found the reason for my app's crashing, but I really don't
understand what I'm seeing.
I have an abstract base CTechnology class which implements certain
basic methods and has a few pure virtual methods.
There are then several derived classes; one to serve as a wrapper
around some technology (e.g. QuickTime).
One of the pure virtual methods is IsAvailable which often uses a call
to Gestalt for its implementation.
Now then, I have another object which is a factory of these technology
objects. At app startup, I build up a simple array of these objects.
I then run through that array and call various methods.
For example:
CTechnology* aTechnology = NULL;
for (i = 0; i < numTechs; ++i)
{
aTechhnology = sTechnologyList [i];
FailNILVar (aTechnology);
if (aTechnology-->IsAvailable()) <- ** crashes here **
{
...
}
}
I have an earlier loop that fills sTechnologyList by creating the
various derived CTechnology objects.
Here's the strange part...If I view the type of the aTechnology
variable, half of the time, it shows that the type is a CTechnology*.
The other half of the time, it shows the derived class (e.g.
CQuickTime*). Whenever I call IsAvailable in situations where the type
given me is a CTechnology*, I get a crash. Probably because it's
issuing that method against the base class, but the base classes'
method is pure virtual and thus NULL?
I've never seen anything like this before in any build environment.
I've verified that RTTI is on (Enable C++ Runtime types is ON in my
target settings).
Has anyone seen this type of behavior?
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Founder & President
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.