OzLark wrote:This is very unlikely to be a bug, a lot of people use setText with GLES2 on desires without issue - it is almost certainly something to do with the manner you're calling setText.
Hmmm...ok let s try to understand my fault. Now i ll show the code.
I have a class which realises scrolling, and i want to watch debug information without touching the debugger.
Using java Syntax Highlighting
/*Initializing my texts, all texts have the Text type,and they re all public*/
public Text headerText;
public Text capitalText;
public Text turnText;
public void setFonts(){
capitalText = new Text(100,100,this.mMainFont,"Capital:",this.getVertexBufferObjectManager());
headerText = new Text(100,200,this.mMainFont,"Header:",this.getVertexBufferObjectManager());
turnText = new Text(100,300,this.mMainFont,"Turn:",this.getVertexBufferObjectManager());
mScene.getChild(LAYER_GUI).attachChild(capitalText);
mScene.getChild(LAYER_GUI).attachChild(headerText);
mScene.getChild(LAYER_GUI).attachChild(turnText);
}
/*wanna set text when finishing the scrolling and my camera position is over the width*/
public void onScrollFinished(ScrollDetector pScollDetector, int pPointerID,
float pDistanceX, float pDistanceY) {
final float zoomFactor = this.mCamera.getZoomFactor();
float cX = this.mCamera.getCenterX() -pDistanceX / zoomFactor;
float cY = this.mCamera.getCenterY() -pDistanceY / zoomFactor;
if(cX>=CAMERA_WIDTH){
capitalText.setText("cross over");/*it crashes in here*/
}
else{
this.mCamera.offsetCenter(-pDistanceX / zoomFactor, -pDistanceY / zoomFactor);
}
}
Parsed in 0.034 seconds, using
GeSHi 1.0.8.4
what s wrong with it? Maybe this method called in separate thread which doesn t have any access to public fields of my main activity class, but it looks like kinda delirium=))