|
From: | David Ayers |
Subject: | Re: conformsToProtocol over DO |
Date: | Mon, 19 Apr 2004 10:12:51 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 |
Philip Mötteli wrote:
Hi I have a heavy crash, that I do not understand why: I send from a client program the following message: [aUser conformsToProtocol:@protocol(UserProtocol)]; This makes my server crash in #2 in +[NSObject conformsToProtocol:aProtocol] at NSObject.m:1286 where the protocol list gives something probably wrong: (gdb) print *aProtocol$3 = {isa = 0x4022c680, protocol_name = 0x0, protocol_list = 0c8165c78, instance_methods = 0x0, class_methods = 0x1}(gdb) print *aProtocol->protocol_list $2 = {next = 0x40228580, count = 257, list = {0x0}}
Actually there is more wrong. The procol name is nil which is illegal (and thr strcmp with nil is what is causing the crash) the instance_methods list is nil (which could be ok) but the class_methods contain an invalid pointer. It seems that the variable aProtocol is not pointing to a valid protocol.
Could you post some more code on how aProtocol is set? Cheers, David
[Prev in Thread] | Current Thread | [Next in Thread] |