title: AndEngine Text.setText not working
body: <p>I created a helper class that will return Text object based on the custom font and text I give. </p>
  
  <p>Here is code :</p>
  
  <pre><code>public class CustomFontTextHelper {
      private Font font;
      private ITexture fontTexture; 
      private Text text;
      public Text getTextWithFont(String myText,String fontPath,BaseGameActivity activity,float x,float y,int fontsize,int color){
          fontTexture = new BitmapTextureAtlas(activity.getTextureManager(), 256, 256, TextureOptions.BILINEAR);
          FontFactory.setAssetBasePath("fonts/");
          this.font = FontFactory.createFromAsset(activity.getFontManager(), fontTexture, activity.getAssets(), fontPath, fontsize, true, color);
          this.font.load();
          text = new Text(x, y, this.font, myText, activity.getVertexBufferObjectManager());
          return text;
      }
  }
  </code></pre>
  
  <p>Using this helper class I create a text and attach to my scene. Its working perfectly. But when I try to change the text using text.setText method it crashes. </p>
  
  <p>Below is the code I use to change the text. </p>
  
  <pre><code>public class StartingScreen extends BaseGameActivity {
      // ===========================================================
          // Constants
          // ===========================================================
  
          private static final int CAMERA_WIDTH = 480;
          private static final int CAMERA_HEIGHT = 720;
  
          // ===========================================================
          // Fields
          // ===========================================================
  
          public Text loadingPercentage;
          public float percentLoaded;
          public CustomFontTextHelper fontHelper;
      @Override
      public EngineOptions onCreateEngineOptions() {
          final Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
          return new EngineOptions(true, ScreenOrientation.PORTRAIT_SENSOR, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera);
      }
      @Override
      public void onCreateResources(
              OnCreateResourcesCallback pOnCreateResourcesCallback)
              throws Exception {
          pOnCreateResourcesCallback.onCreateResourcesFinished();
  
      }
      @Override
      public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback)
              throws Exception {
          this.mEngine.registerUpdateHandler(new FPSLogger());
          final Scene scene = new Scene();
          scene.setBackground(new Background(0, 0, 0));
          fontHelper = new CustomFontTextHelper();
          percentLoaded = 0;
          loadingPercentage = fontHelper.getTextWithFont("0%", "MyriadPro-Cond.ttf", this, CAMERA_WIDTH-120, 100, 64, Color.BLACK);
          scene.attachChild(loadingPercentage);
          pOnCreateSceneCallback.onCreateSceneFinished(scene);
      }
      @Override
      public void onPopulateScene(Scene pScene,
              OnPopulateSceneCallback pOnPopulateSceneCallback) throws Exception {
          pOnPopulateSceneCallback.onPopulateSceneFinished();
          loadingPercentage.setText("5%");
          new Thread(new Runnable(){
  
              @Override
              public void run() {
                  int incr;
                  for (incr = 0; incr &lt;= 100; incr+=5) {
                      StartingScreen.this.runOnUpdateThread(new Runnable(){
  
                          @Override
                          public void run() {
                              // TODO Auto-generated method stub
                              StartingScreen.this.loadingPercentage.setText(Float.toString(StartingScreen.this.percentLoaded) + "%");
                          }
  
                      });
  
                              try {
                                  Thread.sleep(5*1000);
                              } catch (InterruptedException e) {
  
                              }
                  }
  
                  // TODO Auto-generated method stub
  
              }
  
          }).start();
          // TODO Auto-generated method stub
  
      }
  </code></pre>
  
  <p>Please help me with the code.</p>