swarm-support
[Top][All Lists]
Advanced

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

message lookup bug in swarm app


From: Roger Burkhart
Subject: message lookup bug in swarm app
Date: Mon, 22 Jul 96 08:58:08 MDT

The trace seems to indicate that the uncommented call is occurring with
a nil object receiver (receiver=0x0):

> (uncommented line 123)
> #0  0xd28c4 in objc_msg_lookup (receiver=0x0, op=0xf6010) at sendmsg.c:119

> (commented line 123)
> #0  0xd2844 in objc_msg_lookup (receiver=0x14d138, op=0xf6008) at sarray.h:210

See the documentation on Swarm debugging tips for ways to intercept the
unfortunate silent handling of nil message receivers by gcc objective C.
(A bit of good news -- future releases of the gcc objc runtime will allow
us to replace a single object file to control nil method handling.)

> In both cases, before the first prompt gdb says <filename>:xxx:No such file or
> Directory, where filename is either sendmsg.c or sarray.c and xxx is 119 or 
> 210.
> I assume this is because they aren't in the directory with my sim...

Yes, these lines are in the core sections of code of gcc's libobjc.a
involved in message lookup.  This source is part of the gcc distribution
but can also be copied out separately.  Unfortunately some kinds of message
lookup errors seem just to crash like this rather than give an error message.
If it's simply a matter of the object not supporting a message, you should
get a message like: UAVBase does not support message setCurAcceleration:.
So chances are there's something else wrong with the object you're sending
the message setCurAcceleration: to.  You might try moving the suspect
line to the earliest possible place in the code after the uav variable
is set, and see if you can get your suspect call to work at any place.
For the sake of other debugging, we should try to record what combination
of receiver, class, or message mixup can produce the kinds of lookup errors
you're seeing.

Roger Burkhart


reply via email to

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