Android 4.0 Error

Hello guys, after a long rest I’m back to game development and still jmonkeyengine is my choice of platform.

I have a test app which works on Android gingerbread, 2.3.6, this morning I updated my Nexus S to Ice cream sandwich 4.0.3… the test app was installed nicely on Ice Cream but when I tried to run it… it shows the following error:

Hope you can help me with this… thank you… more power to jmonkey

None of us (the dev team) has a device with ice cream sandwich, so JME3 hasn’t been tested on it.

Also, could you post a complete log? you probably have the complete exception in the log cat.

I hope my device will be updated to 4.0 soon

Merry Christmas to you all! :slight_smile:

heres the exception log. Hope this will help solve the problem. I really dont have the idea about the error.


ERROR AndroidHarness java.lang.NumberFormatException: Invalid float: “1.8@785978”

ERROR AndroidHarness SEVERE AndroidHarness 8:54:04 PM Exception thrown in Thread[GLThread 313,5,main]: at java.lang.StringToReal.invalidRea(63)

ERROR AndroidHarness at java.lang.StringToReal.parseFloat(310)

ERROR AndroidHarness at java.lang.Float.parseFloat(300)

ERROR AndroidHarness at

ERROR AndroidHarness at

ERROR AndroidHarness at

ERROR AndroidHarness at android.opengl.GLSurfaceView$GLThread.guardedRun(1446)

ERROR AndroidHarness at android.opengl.GLSurfaceView$

Looks like we could use some exception handling in AndroidHarness… It looks like something changed in Dalvik, as someone else saw number conversion issues…

By no means a pressing issue though. The vast majority of Android devices are still running on version 2.3.6 or below. My Nexus S received the 4.0 update, but it was rejected upon install due to a bug. From what I’ve gathered, I wouldn’t even call 4.0 stable just yet.

Stable or not, its “current”… I haven’t really noticed many phones shipping with 4 yet, but we should try to assess if this is a bug in Android or a new norm that we need to adapt to.

As soon as my tablet is updated I’ll look into this

Just want to add that this is happening to me too, in case it helps at all.

01-10 10:01:28.129: WARN/dalvikvm(6075): threadid=12: thread exiting with uncaught exception (group=0x40a2d1f8)

01-10 10:01:28.133: ERROR/AndroidHarness(6075): java.lang.NumberFormatException: Invalid float: “1.8@785978”

01-10 10:01:28.137: ERROR/AndroidHarness(6075): SEVERE AndroidHarness 10:01:28 AM Exception thrown in Thread[GLThread 568,5,main]: at java.lang.StringToReal.invalidReal(63)

01-10 10:01:28.137: ERROR/AndroidHarness(6075): at java.lang.StringToReal.parseFloat(310)

01-10 10:01:28.137: ERROR/AndroidHarness(6075): at java.lang.Float.parseFloat(300)

01-10 10:01:28.137: ERROR/AndroidHarness(6075): at

01-10 10:01:28.137: ERROR/AndroidHarness(6075): at

01-10 10:01:28.137: ERROR/AndroidHarness(6075): at

01-10 10:01:28.137: ERROR/AndroidHarness(6075): at android.opengl.GLSurfaceView$GLThread.guardedRun(1446)

01-10 10:01:28.137: ERROR/AndroidHarness(6075): at android.opengl.GLSurfaceView$

My phone is Nexus S. The program was fine in android 2.3.x right before the update

Still no android 4.0 for me sorry.

I know you would still not have android 4.0 yet :smiley: - since you mentioned “tablet” I would guess you will not have it any time very soon (as in not in the next couple of weeks :). Anyway, I just took as much investigation that I could (I am pretty new to 3D programming). In OGLESShaderRenderer initialize method, I saw this code segment:


String versionStr = GLES20.glGetString(GLES20.GL_SHADING_LANGUAGE_VERSION);

if (versionStr == null || versionStr.equals("")) {

glslVer = -1;

throw new UnsupportedOperationException("GLSL and OpenGL2 is "

  • "required for the OpenGL ES "
  • “renderer!”);


    // Fix issue in TestRenderToMemory when GL_FRONT is the main

    // buffer being used.

    // initialDrawBuf = GLES20.glGetIntegeri(GLES20.GL_DRAW_BUFFER);

    // initialReadBuf = GLES20.glGetIntegeri(GLES20.GL_READ_BUFFER);

    int spaceIdx = versionStr.lastIndexOf(" ");

    if (spaceIdx >= 1) {

    versionStr = versionStr.substring(spaceIdx, versionStr.length());


    float version = Float.parseFloat(versionStr);


    When running in my Nexus S with android 4.0, the fist line return the following string: “OpenGL ES GLSL ES 1.00 build 1.8@785978”. So the String that is passed into Float.parseFloat() in the last line would be “1.8@785978”, hence the error. When I look at the opengl document for glGetString, it say:

    The GL_VERSION and GL_SHADING_LANGUAGE_VERSION strings begin with a version number.

    The version number uses one of these forms:



    Vendor-specific information may follow the version number. Its format depends on the implementation, but a space always separates the version number and the vendor-specific information.

    So my guess is that the version number is 1.0, and the 1.8@785978 is “the vendor-specific information”.

    When I run the same program in my Samsung galaxy Tab with android 2.6.x, the string return for GL_SHADING_LANGUAGE_VERSION is: “OpenGL ES GLSL ES 1.00”

This was already entered as an issue, Android simply doesn’t obey to the spec.

Thanks, normen. Btw, if they obey the spec, they should just return “1.00 build 1.8@785978” right?

afaik it should just return the actual GLSL version, theres no such thing as a GLSL “1.00 build 1.8blah”

mhhh maybe this issue should be posted on the android tracker…

I’ll look at what android 3.2 is sending in this variable.

Fixed in SVN

1 Like