Skip to content

"global reference table overflow" exception with very large numbers of "mono.java.lang.RunnableImplementor" #15769

Answered by sjordanGSS
sjordanGSS asked this question in Q&A
Discussion options

You must be logged in to vote

So the solution to this ended up being: be careful when using Android.View.Post(Action) when there's a chance that the view might not be attached to a window. This method will create a RunnableImplementor and call Post(IRunnable) with it. RunnableImplementor's constructor adds it to a dictionary to keep a hold of the reference, which it is then removed from at the end of the Run implementation. Problems arise when Run isn't called, such as when the View is detached from a Window and then destroyed, as the RunnableImplementor will sit there taking up memory and JNI handles forever, and presumably preserving references to whatever is used within the Action as well. Normally it would be clea…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@jonathanpeppers
Comment options

@sjordanGSS
Comment options

@jonathanpeppers
Comment options

@sjordanGSS
Comment options

@jonathanpeppers
Comment options

Answer selected by sjordanGSS
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants