Hi,
I'm wondering if anyone else has seen this (and hopefully found a workaround). I'm working on a bug in PyObjC (https://github.com/ronaldoussoren/pyobjc/issues/17) related to protocols and can reproduce this in pure (Objective-)C.
PyObjC creates a protocol and populates the method descriptors using the Objective-C runtime API, e.g. objc_allocateProtocol
and protocol_getMethodDescription
.
This appears to work unreliably when adding multiple methods using protocol_getMethodDescription
when the selector name and/or type encoding argument to protocol_getMethodDescription
are not static strings: When the arguments are not static strings I have trouble finding the method descriptor using protocol_getMethodDescription
.
The code fails intermittently when adding two methods (but still fairly often), and fails reliably for me when adding 3 methods.
The PyObjC issue I mentioned earlier contains a full reproducer.