Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throwing NullPointer Exception when we call dismiss() explicitly #96

Closed
jettimadhu opened this issue May 21, 2019 · 2 comments
Closed

Comments

@jettimadhu
Copy link

Hi,
I have tried to call dismiss() in below cases

  1. When the Orientation changes
  2. When the user presses the device back key
    It throws below error

When I change the orientatton:

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.dispatchConfigurationChanged(android.content.res.Configuration)' on a null object reference
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1520)
at android.view.ViewRootImpl.updateConfiguration(ViewRootImpl.java:3743)
at android.view.ViewRootImpl.performConfigurationChange(ViewRootImpl.java:3705)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2016)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1465)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7233)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:979)
at android.view.Choreographer.doCallbacks(Choreographer.java:791)
at android.view.Choreographer.doFrame(Choreographer.java:726)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:965)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6651)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)

And
when i press device back key:

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.dispatchVisibilityChanged(android.view.View, int)' on a null object reference
at android.view.ViewGroup.dispatchVisibilityChanged(ViewGroup.java:1484)
at android.view.View.setFlags(View.java:13470)
at android.view.View.setVisibility(View.java:9458)
at android.app.Dialog.hide(Dialog.java:413)
at android.inputmethodservice.InputMethodService.hideWindow(InputMethodService.java:1737)
at com.kpt.xploree.app.KPTAdaptxtIME.hideWindow(KPTAdaptxtIME.java:2153)
at android.inputmethodservice.InputMethodService.doHideWindow(InputMethodService.java:1731)
at android.inputmethodservice.InputMethodService.-wrap2(Unknown Source:0)
at android.inputmethodservice.InputMethodService$InputMethodImpl.hideSoftInput(InputMethodService.java:461)
at android.inputmethodservice.IInputMethodWrapper.executeMessage(IInputMethodWrapper.java:199)
at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:37)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6651)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)

@carloshjsalas
Copy link

Same issue here!

@douglasjunior
Copy link
Owner

When the Orientation changes your activity is re-created, so you loose the reference to the te current Tooltip.

Can you create a small project to demonstrate this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants