Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid Reference" crash with anything that uses CheckRow. #209

Open
bwalton opened this issue Apr 19, 2014 · 9 comments
Open

"Invalid Reference" crash with anything that uses CheckRow. #209

bwalton opened this issue Apr 19, 2014 · 9 comments

Comments

@bwalton
Copy link

bwalton commented Apr 19, 2014

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:'
@bwalton
Copy link
Author

bwalton commented Apr 19, 2014

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?

@techogate
Copy link

Thnx for the workaround. useful.

@clayallsopp
Copy link
Owner

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!

@robj
Copy link

robj commented May 17, 2014

+1 with this problem too.

@joepestro
Copy link

+1

@dsshap
Copy link

dsshap commented Jul 29, 2014

Any luck in finding the issue?

@ghost
Copy link

ghost commented Aug 26, 2014

@clayallsopp Any progress?

@clayallsopp
Copy link
Owner

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 =\

@pachun
Copy link

pachun commented Oct 14, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants