Code Monkey home page Code Monkey logo

Comments (5)

thomasuster avatar thomasuster commented on September 26, 2024

screen shot 2015-06-29 at 9 22 01 am

from nme.

thomasuster avatar thomasuster commented on September 26, 2024

Most recent stack trace

java.lang.NullPointerException
org.haxe.nme.GameActivity.showKeyboard(GameActivity.java:1097)
org.haxe.nme.NME.onTouch(Native Method)
org.haxe.nme.MainView$8.run(MainView.java:488)
android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1463)
android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

from nme.

codeservice avatar codeservice commented on September 26, 2024

I did changes for text input support. Potentially it could break something. Check line activity.mKeyInTextView.requestFocus(); If null pointer exception occurred here then maybe something destroying text field mKeyInTextView. You can try this for stability improvement:

if(activity.mKeyInTextView != null)
activity.mKeyInTextView.requestFocus();

If this fixed problem, then need to find reason why object empty.
Of course its not a solution only will prove point that object mKeyInTextView been destroyed
somewhere.

public static void showKeyboard(boolean show)
{
InputMethodManager mgr = (InputMethodManager)mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.hideSoftInputFromWindow(activity.mView.getWindowToken(), 0);

  if (show)
  {
     activity.mKeyInTextView.requestFocus();//<-------- check this line
     mgr.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
     // On the Nexus One, SHOW_FORCED makes it impossible
     // to manually dismiss the keyboard.
     // On the Droid SHOW_IMPLICIT doesn't bring up the keyboard.
  }

}

from nme.

thomasuster avatar thomasuster commented on September 26, 2024

Hey @codeservice , thanks for adding the change. I'll try this in the next Pakka Pets build, if the error goes away I'll close this issue.

95c15dc

from nme.

thomasuster avatar thomasuster commented on September 26, 2024

Let's assume this fixes it. If we get reports after building with NME that includes this change we should re-open. 95c15dc

from nme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.