formotion
formotion copied to clipboard
"Invalid Reference" crash with anything that uses CheckRow.
I'm seeing crashes in the KitchenSink example with anything that involves CheckRow.
RM 2.26 Formotion 1.7
Compile KitchenSink and tap "Check", "Select One" or "Subforms". All crash with:
(main)> 2014-04-19 09:56:01.014 KitchenSink[2382:90b] kvo.rb:93:in `observeValueForKeyPath:ofObject:change:context:': Invalid Reference - probably recycled (WeakRef::RefError)
from check_row.rb:34:in `on_select:'
from base.rb:70:in `_on_select:'
from form_delegate.rb:95:in `tableView:didSelectRowAtIndexPath:'
2014-04-19 09:56:01.019 KitchenSink[2382:90b] *** Terminating app due to uncaught exception 'WeakRef::RefError', reason: 'kvo.rb:93:in `observeValueForKeyPath:ofObject:change:context:': Invalid Reference - probably recycled (WeakRef::RefError)
from check_row.rb:34:in `on_select:'
from base.rb:70:in `_on_select:'
from form_delegate.rb:95:in `tableView:didSelectRowAtIndexPath:'
As a workaround/fix, when you compile with ARR_CYCLES_DISABLE=1
it works fine. In fact I remember having to always have that on (even in shipped IPA's) but fixes to RM made it to where it didn't matter.
Is this more of a RM issue?
Thnx for the workaround. useful.
This does seem to be an RM regression, but it's taking some effort to find out exactly what's going wrong. Disabling their retain cycle detector is a good mitigation technique until then, thanks @bwalton!
+1 with this problem too.
+1
Any luck in finding the issue?
@clayallsopp Any progress?
Nope, sorry guys :( I did spend a few hours digging into it in April, but I couldn't isolate it or remove it
Until someone else digs into it, I don't think it will be fixed =\
I accidentally reproduced this issue in my own app. I think it's caused by adding subviews to cells and then scrolling, whereas you should be adding subviews to the cell's contentView. Once I changed that, I stopped seeing this error and everything began working as expected. Also, before I discovered this fix, the ARR_CYCLES_DISABLE=1 fix also worked for me. This leads me to believe the cause of our issues are probably the same.