Appolica / InteractiveInfoWindowAndroid

Library project, developed and maintained by Appolica, offering an interactive info window for Google maps on Android.
249 stars 56 forks source link

NullPointerException in `void android.view.ViewGroup.getLocationOnScreen(int[])` #54

Open okonor opened 3 years ago

okonor commented 3 years ago

There are a few crashes for the users. I'm sure that the exact android version doesn't matter here, but just for case, Android 9 and Android 10. Please, advise what I can do here? Are you planning to support this library? Thank you in advance.

Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'void android.view.ViewGroup.getLocationOnScreen(int[])' on a null object reference
com.appolica.interactiveinfowindow.InfoWindowManager.ensureVisible (InfoWindowManager.java:523)
com.appolica.interactiveinfowindow.InfoWindowManager.access$600 (InfoWindowManager.java:52)
com.appolica.interactiveinfowindow.InfoWindowManager$2.onPreDraw (InfoWindowManager.java:294)
android.view.ViewTreeObserver.dispatchOnPreDraw (ViewTreeObserver.java:991)
android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:3054)
android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1927)
android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:8558)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:949)
android.view.Choreographer.doCallbacks (Choreographer.java:761)
android.view.Choreographer.doFrame (Choreographer.java:696)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:935)
android.os.Handler.handleCallback (Handler.java:873)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loop (Looper.java:214)
android.app.ActivityThread.main (ActivityThread.java:7094)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:975)
dpetrov-appolica commented 3 years ago

Can you be more specific or share some code in which case you get the exception?