We encounter the same problem, we are using cclabelttf to display some text from user input, the scenario is like this:
1. we use JNI to invoke some java api to input text, invoke java from C*+
2. when user finish typing, in callback, we use cclabelttf’s setstring to make it display what is input, which invoke C*+ from java
we doubt that due to some reason, in step 1 we guess, when we invoke something like this via JNI, it actually invoke a new thread, in this case, when we call setstring, which means we a doing some renderer relevant work in non-UI thread.
in the end, we fix the bug via only set some flag variable in step 2, check that flag and do the actually setstring in UI thread and it works fine now.