swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] did gcc change the way "message to nil" is handled?


From: Rick Riolo
Subject: Re: [Swarm-Support] did gcc change the way "message to nil" is handled?
Date: Tue, 7 Sep 2004 06:49:49 -0400 (EDT)

i agree, its a step back to allow nil to "process" messages.
Thanks for bringing it to our attention.

I've never noticed the problem with nil's in collections.

- r

Rick Riolo                           address@hidden
Center for the Study of Complex Systems (CSCS)
4477 Randall Lab
University of Michigan         Ann Arbor MI 48109-1120
Phone: 734 763 3323                  Fax: 734 763 9267
http://cscs.umich.edu/~rlr

On Mon, 6 Sep 2004, Paul Johnson wrote:

> Date: Mon, 06 Sep 2004 23:04:43 -0400
> From: Paul Johnson <address@hidden>
> Reply-To: Swarm Support <address@hidden>
> To: swarm-support <address@hidden>
> Subject: [Swarm-Support] did gcc change the way "message to nil" is
>     handled?
>
> I am trying to find a bug in a big program. A nil gets inserted at the
> very end of the collection, and somehow that magically makes the loop go
> over and over. Its a loop like this:
>
> for( aThing=[index next];[index getLoc]==Member;[aThing=[index next]])
>
> Very confounding, I can't figure how the nil gets in there.
>
> Anyway, while bug shooting I started to suspect some monkey business
> with Swarm collections and the old [index remove] as applied to the last
> element.  So I made a test app to see if removing the last item with
> that method caused the nil to appear at the end.
>
> It did not unearth the cause of my trouble, but it did reveal another
> problem with gcc-3.3.2 and Swarm-2.1.150.  Now, you can send messages to
> nil and no error is returned.  It just returns a 0.  This is the way it
> had worked a long time ago, but about 3 years ago, we started getting
> errors about sending messages to nils.
>
> If you run the attached, you see it doesn't give any errors when nils
> are told to do things.
>
> I'm thinking this is bad, how about you?  I used to think it was good,
> but that was when I was a lazier programmer.
>
> If you've ever had the problem of a nil magically appearing at the end
> of a collection and causing an index to malfunction and repeat over and
> over, I'd be glad to know.
>
> --
> Paul E. Johnson                       email: address@hidden
> Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
> 1541 Lilac Lane, Rm 504
> University of Kansas                  Office: (785) 864-9086
> Lawrence, Kansas 66044-3177           FAX: (785) 864-5700
>


reply via email to

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