discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Project Center segfault and nil objects


From: Richard Frith-Macdonald
Subject: Re: Project Center segfault and nil objects
Date: Fri, 24 Jun 2005 08:42:50 +0100

On 2005-06-24 07:10:57 +0100 Duncan Anker <danker@server101.com> wrote:

I was of the belief that it is legal to send messages to nil in Objective C, and nothing would happen. This is supposed to be one of the benefits of it after all, not having to check every object before sending a message.

That is correct ... however, it's really only true for methods which return objects (in practice, also for pointers and scalar return types). If the compiler expects the method to return a structure or floating point number, there are different conventions for how the return value is handled, and this can cause problems when the message to nil tries to return nil.

Given that assumption is true then, is it possible that nil has a different value between the Project Center support libraries and the Objective C runtime?

No ... I don't see how that could be.

I think you probably need to compile everything with debug enabled, and run under gdb to catch exactly what is happening and how it gets to that point, as I've not seen a problem with return type of a message to nil causing a crash in objc_msg_lookup, and it's not clear how it could.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]