Domanda

I created a simple Android game and am trying to run it on an Android emulator (i try Android 2.2 and Android 4 on emulator), but it crashes with a "VM aborting" message. It runs nicely on real android device. What does this error mean? And how can I fix it?

My log:

04-14 09:15:59.891: D/dalvikvm(661): Trying to load lib  /data/data/net.me.justblockygame/lib/libgdx.so 0x405144e0
04-14 09:15:59.901: D/dalvikvm(661): Added shared lib/data/data/net.me.justblockygame/lib/libgdx.so 0x405144e0
04-14 09:15:59.911: D/dalvikvm(661): No JNI_OnLoad found in/data/data/net.me.justblockygame/lib/libgdx.so 0x405144e0, skipping init
04-14 09:16:00.081: I/AndroidInput(661): sensor listener setup
04-14 09:16:00.101: D/libEGL(661): egl.cfg not found, using default config
04-14 09:16:00.101: D/libEGL(661): loaded /system/lib/egl/libGLES_android.so
04-14 09:16:00.241: I/AndroidGraphics(661): OGL renderer: Android PixelFlinger 1.4
04-14 09:16:00.241: I/AndroidGraphics(661): OGL vendor: Android
04-14 09:16:00.251: I/AndroidGraphics(661): OGL version: OpenGL ES-CM 1.0
04-14 09:16:00.251: I/AndroidGraphics(661): OGL extensions: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_draw_texture GL_OES_matrix_get GL_OES_query_matrix GL_OES_EGL_image GL_OES_compressed_ETC1_RGB8_texture GL_ARB_texture_compression GL_ARB_texture_non_power_of_two GL_ANDROID_user_clip_plane GL_ANDROID_vertex_buffer_object GL_ANDROID_generate_mipmap 
04-14 09:16:00.251: I/AndroidGraphics(661): framebuffer: (8, 8, 8, 8)
04-14 09:16:00.251: I/AndroidGraphics(661): depthbuffer: (16)
04-14 09:16:00.251: I/AndroidGraphics(661): stencilbuffer: (0)
04-14 09:16:00.251: I/AndroidGraphics(661): samples: (0)
04-14 09:16:00.251: I/AndroidGraphics(661): coverage sampling: (false)
04-14 09:16:00.321: I/AndroidGraphics(661): Managed meshes/app: { }
04-14 09:16:00.321: I/AndroidGraphics(661): Managed textures/app: { }
04-14 09:16:00.321: I/AndroidGraphics(661): Managed shaders/app: { }
04-14 09:16:00.402: I/AndroidGraphics(661): Managed buffers/app: { }
04-14 09:16:00.431: D/dalvikvm(661): Trying to load lib /data/data/net.me.justblockygame/lib/libgdx-freetype.so 0x405144e0
04-14 09:16:00.431: D/dalvikvm(661): Added shared lib /data/data/net.me.justblockygame/lib/libgdx-freetype.so 0x405144e0
04-14 09:16:00.431: D/dalvikvm(661): No JNI_OnLoad found in /data/data/net.me.justblockygame/lib/libgdx-freetype.so 0x405144e0, skipping init
04-14 09:16:00.431: D/szipinf(661): Initializing inflate state
04-14 09:16:00.431: D/szipinf(661): Initializing inflate state
04-14 09:16:00.441: D/szipinf(661): Initializing inflate state
04-14 09:16:00.441: D/szipinf(661): Initializing zlib to inflate
04-14 09:16:00.511: D/dalvikvm(661): GC_FOR_MALLOC freed 102K, 46% free 3416K/6215K, external 1625K/2137K, paused 25ms
04-14 09:16:00.531: I/dalvikvm-heap(661): Grow heap (frag case) to 9.004MB for 1622120-byte allocation
04-14 09:16:00.641: D/dalvikvm(661): GC_FOR_MALLOC freed 800K, 47% free 4200K/7815K, external 1625K/2137K, paused 42ms
04-14 09:16:00.792: D/dalvikvm(661): GC_CONCURRENT freed 822K, 46% free 4287K/7815K, external 1625K/2137K, paused 7ms+5ms
04-14 09:16:01.341: W/dalvikvm(661): JNI WARNING: invalid values for address (0x0) or capacity (0)
04-14 09:16:01.341: I/dalvikvm(661): "GLThread" prio=5 tid=11 NATIVE
04-14 09:16:01.341: I/dalvikvm(661):   | group="main" sCount=0 dsCount=0 obj=0x4052d4b8 self=0x2b3bd0
04-14 09:16:01.341: I/dalvikvm(661):   | sysTid=672 nice=0 sched=0/0 cgrp=default handle=2833672
04-14 09:16:01.341: I/dalvikvm(661):   | schedstat=( 472903169 451942168 165 )
04-14 09:16:01.341: I/dalvikvm(661):   at com.badlogic.gdx.graphics.g2d.freetype.FreeType$Bitmap.getBuffer(Native Method)
04-14 09:16:01.341: I/dalvikvm(661):   at com.badlogic.gdx.graphics.g2d.freetype.FreeType$Bitmap.getBuffer(FreeType.java:334)
04-14 09:16:01.341: I/dalvikvm(661):   at com.badlogic.gdx.graphics.g2d.freetype.FreeType$Bitmap.getPixmap(FreeType.java:342)
04-14 09:16:01.341: I/dalvikvm(661):   at com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.generateData(FreeTypeFontGenerator.java:168)
04-14 09:16:01.341: I/dalvikvm(661):   at com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.generateFont(FreeTypeFontGenerator.java:71)
04-14 09:16:01.341: I/dalvikvm(661):   at com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.generateFont(FreeTypeFontGenerator.java:85)
04-14 09:16:01.341: I/dalvikvm(661):   at net.me.justblockygame.screens.MenuScreen.resize(MenuScreen.java:190)
04-14 09:16:01.351: I/dalvikvm(661):   at com.badlogic.gdx.Game.setScreen(Game.java:60)
04-14 09:16:01.351: I/dalvikvm(661):   at net.me.justblockygame.JustBlockyGame.setScreen(JustBlockyGame.java:74)
04-14 09:16:01.351: I/dalvikvm(661):   at net.me.justblockygame.JustBlockyGame.create(JustBlockyGame.java:60)
04-14 09:16:01.351: I/dalvikvm(661):   at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:292)
04-14 09:16:01.351: I/dalvikvm(661):   at com.badlogic.gdx.backends.android.surfaceview.GLSurfaceViewCupcake$GLThread.guardedRun(GLSurfaceViewCupcake.java:708)
04-14 09:16:01.351: I/dalvikvm(661):   at com.badlogic.gdx.backends.android.surfaceview.GLSurfaceViewCupcake$GLThread.run(GLSurfaceViewCupcake.java:646)
04-14 09:16:01.351: E/dalvikvm(661): VM aborting

All i do in this strings:

TTfont = Gdx.files.internal("EASPORTS15.ttf");//"CALIBRI.TTF");
    generator = new FreeTypeFontGenerator(TTfont);

    mGame.font = mGame.generator.generateFont(width/20); // if i delete this string progamm runs, but it crushes then needed font.

I create font generator and try to generate font. I was trying two fonts file, but it dont change anything.

È stato utile?

Soluzione 2

I solve it. I was using libgdx 0.9.6, in libgdx 0.9.8 it works well.

Altri suggerimenti

you try old remove gdx-freetype.jar and download (gdx-freetype.jar)file https://code.google.com/p/libgdx/issues/detail?id=768#c32

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top