From: Patrick G. <par...@gm...> - 2009-07-06 15:45:41
|
>> Is the crash due to that the bridging of that particular call... >> That is to say, if you were to use something like an NSInvocation to >> avoid the bridge does that allow you to work around the crash? > > You're right, its the call bridging that fails. I found this link > > https://www.ohloh.net/p/8833/commits/39267170 > > that suggests that it's a known (and fixed) problem, but not yet in > Leopard. I don't know if it's related, but I have a similar problem with [event context] in JSCocoa. http://code.google.com/p/jscocoa/issues/detail?id=61 The -context method lies about its signature, saying it's returning an ObjC object (@) while really returning some opaque stuff. Thinking it's an Objc object, the bridge retains it while boxing then crashes. Even calling [[event context] retain] in raw ObjC crashes. I don't remember whether RubyCocoa queries the ObjC runtime or BridgeSupport for method signatures. If it queries BridgeSupport you might try to hack into there and supply a different method signature, swapping the ObjC object signature (@) for a pointer (^). -Patrick |