fredsa / playn

Cross platform game library for N≥4 platforms
0 stars 1 forks source link

java.nio.BufferOverflowException #108

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I developed new game and it working fine but sometime  i get the exception.

I am not sure what cause this, and if someone saw this problem also?

The exception: 
--------------
113 textures remain.  (playn)
E(12012) error  (playn)
E(12012) java.nio.BufferOverflowException  (playn)
E(12012)    at 
java.nio.ShortToByteBufferAdapter.put(ShortToByteBufferAdapter.java:185)  
(playn)
E(12012)    at 
playn.android.AndroidGraphics$Shader.addElement(AndroidGraphics.java:178)  
(playn)
E(12012)    at 
playn.android.AndroidGraphics.drawTexture(AndroidGraphics.java:630)  (playn)
E(12012)    at playn.android.AndroidImageLayer.paint(AndroidImageLayer.java:136)  
(playn)
E(12012)    at playn.android.AndroidGroupLayer.paint(AndroidGroupLayer.java:101)  
(playn)
E(12012)    at playn.android.AndroidGroupLayer.paint(AndroidGroupLayer.java:101)  
(playn)
E(12012)    at playn.android.AndroidGroupLayer.paint(AndroidGroupLayer.java:101)  
(playn)
E(12012)    at 
playn.android.AndroidGraphics.paintLayers(AndroidGraphics.java:583)  (playn)
E(12012)    at playn.android.GameLoop.paint(GameLoop.java:110)  (playn)
E(12012)    at playn.android.GameLoop.run(GameLoop.java:83)  (playn)
E(12012)    at 
playn.android.GameViewGL$AndroidRendererGL.onDrawFrame(GameViewGL.java:80)  
(playn)
E(12012)    at 
android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1388)  
(playn)
E(12012)    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1138) 
 (playn)
I(12012) clearing images  (playn)
D(12012) onPause  (playn)
I(12012) notifyVisibilityChanged: 4  (playn)
D(12012) Pausing game loop  (playn)
E(12012) error  (playn)
E(12012) java.lang.RuntimeException: Unable to destroy activity 
{com.hh.games.android/com.hh.games.android.MyActivity}: 
java.lang.IllegalStateException  (playn)
E(12012)    at 
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:2676)  
(playn)
E(12012)    at 
android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:2694)  
(playn)
E(12012)    at android.app.ActivityThread.access$2100(ActivityThread.java:117)  
(playn)
E(12012)    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:968)  (playn)
E(12012)    at android.os.Handler.dispatchMessage(Handler.java:99)  (playn)
E(12012)    at android.os.Looper.loop(Looper.java:130)  (playn)
E(12012)    at android.app.ActivityThread.main(ActivityThread.java:3691)  (playn)
E(12012)    at java.lang.reflect.Method.invokeNative(Native Method)  (playn)
E(12012)    at java.lang.reflect.Method.invoke(Method.java:507)  (playn)
E(12012)    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907) 
 (playn)
E(12012)    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)  
(playn)
E(12012)    at dalvik.system.NativeStart.main(Native Method)  (playn)
E(12012) Caused by: java.lang.IllegalStateException  (playn)
E(12012)    at android.media.MediaPlayer._stop(Native Method)  (playn)
E(12012)    at android.media.MediaPlayer.stop(MediaPlayer.java:1020)  (playn)
E(12012)    at 
playn.android.AndroidCompressedSound.onDestroy(AndroidCompressedSound.java:146) 
 (playn)
E(12012)    at playn.android.AndroidAudio.onDestroy(AndroidAudio.java:52)  (playn)
E(12012)    at playn.android.GameActivity.onDestroy(GameActivity.java:166)  
(playn)
E(12012)    at 
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:2663)  
(playn)
E(12012)    ... 11 more  (playn)

Original issue reported on code.google.com by a...@tikalk.com on 18 Dec 2011 at 10:45