osx lion - Objective-C Library - cannot form weak reference to instance of class -
i'm working xmpp library objective-c, , i'm using "desktop" example code.
it logs in fine; however, when open new chat, or sends me message, crashes.
this seems goes wrong:
xmppstream[11678:1b03] recv: 2012-06-05 15:03:59:379 xmppstream[11678:1b03] recv: 2012-06-05 15:03:59:382 xmppstream[11678:403] rostercontroller: xmpprosterdidchange: 2012-06-05 15:03:59:387 xmppstream[11678:403] rostercontroller: xmpprosterdidchange: 2012-06-05 15:04:01:900 xmppstream[11678:403] tableview:shouldedittablecolumn:"jid" row:0 2012-06-05 15:04:01:900 xmppstream[11678:403] user: objc[11678]: cannot form weak reference instance (0x7fcd4a498930) of class chatcontroller
and
objc[11998]: cannot form weak reference instance (0x7f853bd17c70) of class chatcontroller (lldb) (lldb)
what "cannot form weak reference instance....of class chatcontroller" mean? guys know how can fix it? used older version of code snow leopard , worked, lion screwing me up!
thank you!
looking @ mike ash's blog, found interesting paragraph:
arc's implementation of zeroing weak references requires close coordination between objective-c reference counting system , zeroing weak reference system. means class overrides retain , release can't target of zeroing weak reference. while uncommon, cocoa classes, nswindow, suffer limitation. fortunately, if hit 1 of these cases, know immediately, program crash message this:
objc[2478]: cannot form weak reference instance (0x10360f000) of class nswindow
if must make weak reference classes such these, can use __unsafe_unretained qualifier in place of __weak.
did turn arc on in app? if turn off, better results?
Comments
Post a Comment