Error in Loading Isometric Map

  ... in the unlikely case you discovered a bug, post it here.

Error in Loading Isometric Map

Postby hugo.offhsore » Tue Dec 24, 2013 2:23 am

Hello for all,

Im a new developer in AndEngine.

In my tests im compile and see this error:

[i]12-23 19:12:52.165: E/AndroidRuntime(7474): FATAL EXCEPTION: GLThread 175
12-23 19:12:52.165: E/AndroidRuntime(7474): Process: com.hpex, PID: 7474
12-23 19:12:52.165: E/AndroidRuntime(7474): java.lang.NullPointerException
12-23 19:12:52.165: E/AndroidRuntime(7474): at org.andengine.entity.sprite.batch.SpriteBatch.preDraw(SpriteBatch.java:189)
12-23 19:12:52.165: E/AndroidRuntime(7474): at org.andengine.entity.Entity.onManagedDraw(Entity.java:1352)
12-23 19:12:52.165: E/AndroidRuntime(7474): at org.andengine.entity.Entity.onDraw(Entity.java:1160)
12-23 19:12:52.165: E/AndroidRuntime(7474): at org.andengine.entity.Entity.onManagedDraw(Entity.java:1382)
12-23 19:12:52.165: E/AndroidRuntime(7474): at org.andengine.entity.scene.Scene.onManagedDraw(Scene.java:260)
12-23 19:12:52.165: E/AndroidRuntime(7474): at org.andengine.entity.Entity.onDraw(Entity.java:1160)
12-23 19:12:52.165: E/AndroidRuntime(7474): at org.andengine.engine.Engine.onDrawScene(Engine.java:627)
12-23 19:12:52.165: E/AndroidRuntime(7474): at org.andengine.engine.Engine.onDrawFrame(Engine.java:617)
12-23 19:12:52.165: E/AndroidRuntime(7474): at org.andengine.opengl.view.EngineRenderer.onDrawFrame(EngineRenderer.java:105)
12-23 19:12:52.165: E/AndroidRuntime(7474): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
12-23 19:12:52.165: E/AndroidRuntime(7474): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
[/i]


This my code to load the TMX Isometric map:


final TMXLoader tmxLoader = new TMXLoader(this.getAssets(), this.mEngine.getTextureManager(), TextureOptions.BILINEAR_PREMULTIPLYALPHA, this.getVertexBufferObjectManager());

this.mTMXTiledMap = tmxLoader.loadFromAsset("tmx/isometric_grass_and_water.tmx");
this.mTMXTiledMap.setIsometricDrawMethod(TMXIsometricConstants.DRAW_METHOD_ISOMETRIC_CULLING_PADDING);

final TMXLayer tmxLayer = this.mTMXTiledMap.getTMXLayers().get(0);

gMain.attachChild(tmxLayer);


Anyone can help me or have a idea ?

Thanks
hugo.offhsore
 
Posts: 1
Joined: Tue Dec 24, 2013 2:17 am

Re: Error in Loading Isometric Map

Postby Therdiday » Wed Jan 15, 2014 9:11 am

Hey hugo,

Do you get any Cautions or Warnings in your LogCat before this? Also, are you using niffy's TMXTiledMap branch?
Therdiday
 
Posts: 343
Joined: Thu Oct 20, 2011 11:12 pm


Return to Bugs

Who is online

Users browsing this forum: No registered users and 4 guests