Results 1 to 2 of 2

Thread: [Android] Resolution for NullPointerException : onSurfaceCreated(SourceFile:487)

  1. #1
    Neuer skobbler
    Join Date

    [Android] Resolution for NullPointerException : onSurfaceCreated(SourceFile:487)


    Implementing Skobbler in my android app, I stucked half an hour with a crash I couldn't understand.
    Following the DemoApp for the initialization part, I kept crashing just before map was displayed with error:

    at SourceFile:487)
    at android.opengl.GLSurfaceView$GLThread.guardedRun(G
    at android.opengl.GLSurfaceView$

    As the error wasn't self explanatory at all, I investigated file MapRenderer from package, and found
    that I was crashing because I didn't implement a map listener (this.s, in line below), which classname was trying to be displayed on log.

      public final void onSurfaceCreated(GL10 arg1, EGLConfig paramEGLConfig)
          SKLogging.writeLog("MapRenderer", "onSurfaceCreated before LOCK ", 2);
          synchronized (V) {
              SKLogging.writeLog("MapRenderer", "onSurfaceCreated" + this.s.getClass().getName(), 2); // <== Line 487
    You might have forgot to check non-nullity of this.s before logging it, and as it wasn't described as mandatory in your doc to
    implement this listener,I think you should correct that, or otherwise precise it in documentation.

    I think this answer could be useful for other people.

    Thanks for reading.

  2. #2
    Join Date

    Thank you very much for taking the time to share this with us.
    We will make this improvement in our SDK.

    We are glad to have such great users in our community!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts