swarm-support
[Top][All Lists]
Advanced

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

Re: Casting an id type to a specific object type?


From: Jae Chan Oh
Subject: Re: Casting an id type to a specific object type?
Date: Sat, 15 Mar 1997 17:23:51 -0500 (EST)

Ken, Thanks for the kind replies.
I have tried your suggestions on trapping core dump using respondTo: etc.
My program gives core dump on even that call as well.. sigh..

i.e.
      if ([tgt respondsTo: M(print)] )        <--- bombs right here.
        [tgt print];
    else
        {
        if ( [tgt isMemberOfClassNamed: "Person"] )
                fprintf(stderr,"tgt is a 'Person'!\n");
        else
                fprintf(stderr,"tgt is a nobody!\n");
        exit(1);
        }
tgt is not nil as far as I know. 
tgt is declard as id.
gdb command "where" gives the following:

Program received signal SIGSEGV, Segmentation fault.
objc_msg_lookup (receiver=0x18, op=0x14c100) at sendmsg.c:115
sendmsg.c:115: No such file or directory.
(gdb) where
#0  objc_msg_lookup (receiver=0x18, op=0x14c100) at sendmsg.c:115
#1  0x2329c in _i_Person__look (self=0x22b850, _cmd=0x14bec0) at Person.m:335
#2  0x21b10 in _i_Person__step (self=0x22b850, _cmd=0x14c9cc) at Person.m:49
#3  0x5e990 in _i_Object_s__perform_ (self=0x22b850, _cmd=0x154fd0, 
    aSel=0x14c9cc) at DefObject.m:241
#4  0x47110 in _i_ActionTo_0___performAction__ (self=0x244478, _cmd=0x155410, 
    anActivity=0x244408) at Action.m:161
#5  0x48d78 in _i_Activity_c___run_ (self=0x244408, _cmd=0x1553f8)
    at Activity.m:482
#6  0x1172f0 in __objc_init_install_dtable (receiver=0x1532e0, op=0x1553f8)
    at sendmsg.c:208
#7  0x48bb4 in _i_Activity_c___run_ (self=0x243f40, _cmd=0x1553f8)
    at Activity.m:454
#8  0x48bb4 in _i_Activity_c___run_ (self=0x243958, _cmd=0x1553f8)
    at Activity.m:454
#9  0x48bb4 in _i_Activity_c___run_ (self=0x243668, _cmd=0x1553f8)
    at Activity.m:454
#10 0x48bb4 in _i_Activity_c___run_ (self=0x243c88, _cmd=0x1553f8)
    at Activity.m:454
#11 0x48bb4 in _i_Activity_c___run_ (self=0x242c28, _cmd=0x1553e0)
    at Activity.m:454
#12 0x4897c in _i_Activity_c__run (self=0x242c28, _cmd=0x1553b8)
    at Activity.m:411
#13 0x48664 in _i_Activity_c__next (self=0x242c28, _cmd=0x1553d0)
    at Activity.m:350
#14 0x48888 in _i_Activity_c__stepUntil_ (self=0x242c28, _cmd=0x14e820, tVal=1)
    at Activity.m:399
#15 0x2f714 in _i_GUISwarm__go (self=0x1f41e8, _cmd=0x14bab4) at GUISwarm.m:56
#16 0x21a24 in main (argc=1, argv=0xeffffbe4) at main.m:25
(gdb) 

I'm stuck here any suggestions? Sorry for the too much detailed question.

-Jae


reply via email to

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