[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Q] Segmentation Fault error of AddressManager.app
From: |
NeXT |
Subject: |
Re: [Q] Segmentation Fault error of AddressManager.app |
Date: |
Tue, 14 Oct 2003 00:01:39 +0900 |
For your interests, I'm using transmeta crusoe machine(Sony VAIO, C1-MTL) Is
this related to this situation?
On 2003-10-13 16:52:04 +0900 Richard Frith-Macdonald <richard@brainstorm.co.uk>
wrote:
>
> On Monday, October 13, 2003, at 08:04 AM, Björn Giesler wrote:
>
>> Hi,
>>
>> On 2003-10-13 08:00:57 +0200 NeXT <chunsj@embian.com> wrote:
>>> it died with segmentation fault error. What I've found is wakeFromNib of
>>> Controller.m has a problem. -setFillsSuperview:
>>> needs a super view but current code does not set superview before above
>>
>> Yes. Thanks for pointing that out; I fixed it. Strange that it segfaults on
>> your machine, though -- [self superview] should return nil, and sending
>> messages to nil is OK, so [[self superview] frame] should return a bogus
>> rect, but shouldn't segfault, and on my box it doesn't. Strange.
>
> FYI sending a -frame message to nil will return nil ... a pointer rather than
> a structure (the expected NSRect).
>
> On Intel hardware this tends to just mean that a garbage rect is returned,
> but on other hardware it's common
> that this results in a segfault instead. Basically, the convention that it's
> ok to send a message to nil is strictly
> only true if the expected return type is an object, though as far as I know
> it's ok on all real machines for
> void, scalar, and pointer return types as well.
>
> Certainly, if the return type is a structure or a float/double you should be
> careful that you are not sending
> the message to nil.
>
>