{"action":"closed","issue":{"url":"https://api.github.com/repos/wix/react-native-navigation/issues/460","repository_url":"https://api.github.com/repos/wix/react-native-navigation","labels_url":"https://api.github.com/repos/wix/react-native-navigation/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/wix/react-native-navigation/issues/460/comments","events_url":"https://api.github.com/repos/wix/react-native-navigation/issues/460/events","html_url":"https://github.com/wix/react-native-navigation/issues/460","id":190474307,"number":460,"title":"Android application crashes intermittently if there is a fab on some but not all of the top tabs","user":{"login":"varungupta85","id":7475133,"avatar_url":"https://avatars.githubusercontent.com/u/7475133?v=3","gravatar_id":"","url":"https://api.github.com/users/varungupta85","html_url":"https://github.com/varungupta85","followers_url":"https://api.github.com/users/varungupta85/followers","following_url":"https://api.github.com/users/varungupta85/following{/other_user}","gists_url":"https://api.github.com/users/varungupta85/gists{/gist_id}","starred_url":"https://api.github.com/users/varungupta85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varungupta85/subscriptions","organizations_url":"https://api.github.com/users/varungupta85/orgs","repos_url":"https://api.github.com/users/varungupta85/repos","events_url":"https://api.github.com/users/varungupta85/events{/privacy}","received_events_url":"https://api.github.com/users/varungupta85/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"guyca","id":12352397,"avatar_url":"https://avatars.githubusercontent.com/u/12352397?v=3","gravatar_id":"","url":"https://api.github.com/users/guyca","html_url":"https://github.com/guyca","followers_url":"https://api.github.com/users/guyca/followers","following_url":"https://api.github.com/users/guyca/following{/other_user}","gists_url":"https://api.github.com/users/guyca/gists{/gist_id}","starred_url":"https://api.github.com/users/guyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyca/subscriptions","organizations_url":"https://api.github.com/users/guyca/orgs","repos_url":"https://api.github.com/users/guyca/repos","events_url":"https://api.github.com/users/guyca/events{/privacy}","received_events_url":"https://api.github.com/users/guyca/received_events","type":"User","site_admin":false},"assignees":[{"login":"guyca","id":12352397,"avatar_url":"https://avatars.githubusercontent.com/u/12352397?v=3","gravatar_id":"","url":"https://api.github.com/users/guyca","html_url":"https://github.com/guyca","followers_url":"https://api.github.com/users/guyca/followers","following_url":"https://api.github.com/users/guyca/following{/other_user}","gists_url":"https://api.github.com/users/guyca/gists{/gist_id}","starred_url":"https://api.github.com/users/guyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyca/subscriptions","organizations_url":"https://api.github.com/users/guyca/orgs","repos_url":"https://api.github.com/users/guyca/repos","events_url":"https://api.github.com/users/guyca/events{/privacy}","received_events_url":"https://api.github.com/users/guyca/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-11-19T03:46:26Z","updated_at":"2016-11-21T17:35:35Z","closed_at":"2016-11-21T17:35:35Z","body":"### Issue Description\r\n\r\nI have a single screen application with 3 top tabs. I have a `fab` on two of them. By default screen with a `fab` button is rendered. When I go to a tab which doesn't contain a `fab` button, application crashes with the below call stack\r\n\r\n```java\r\n11-19 09:01:51.386 25235-25235/com.xyz E/AndroidRuntime: FATAL EXCEPTION: main\r\n                                                               Process: com.xyz, PID: 25235\r\n                                                               java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.View.getY()' on a null object reference\r\n                                                                   at com.reactnativenavigation.views.FloatingActionButtonCoordinator$ActionBehaviour.calculateY(FloatingActionButtonCoordinator.java:213)\r\n                                                                   at com.reactnativenavigation.views.FloatingActionButtonCoordinator$ActionBehaviour.onDependentViewChanged(FloatingActionButtonCoordinator.java:198)\r\n                                                                   at com.reactnativenavigation.views.FloatingActionButtonCoordinator$ActionBehaviour.onDependentViewChanged(FloatingActionButtonCoordinator.java:179)\r\n                                                                   at android.support.design.widget.CoordinatorLayout.offsetChildToAnchor(CoordinatorLayout.java:1566)\r\n                                                                   at android.support.design.widget.CoordinatorLayout.onChildViewsChanged(CoordinatorLayout.java:1228)\r\n                                                                   at android.support.design.widget.CoordinatorLayout$HierarchyChangeListener.onChildViewRemoved(CoordinatorLayout.java:2868)\r\n                                                                   at android.view.ViewGroup.dispatchViewRemoved(ViewGroup.java:4220)\r\n                                                                   at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4621)\r\n                                                                   at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4576)\r\n                                                                   at android.view.ViewGroup.removeView(ViewGroup.java:4507)\r\n                                                                   at com.reactnativenavigation.views.FloatingActionButtonCoordinator.removeAllViews(FloatingActionButtonCoordinator.java:77)\r\n                                                                   at com.reactnativenavigation.views.FloatingActionButtonCoordinator.access$000(FloatingActionButtonCoordinator.java:25)\r\n                                                                   at com.reactnativenavigation.views.FloatingActionButtonCoordinator$1.onAnimationEnd(FloatingActionButtonCoordinator.java:65)\r\n                                                                   at com.reactnativenavigation.views.FloatingActionButtonAnimator$3.onAnimationEnd(FloatingActionButtonAnimator.java:100)\r\n                                                                   at android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd(ViewPropertyAnimator.java:1114)\r\n                                                                   at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1239)\r\n                                                                   at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:766)\r\n                                                                   at android.animation.ValueAnimator$AnimationHandler$1.run(ValueAnimator.java:801)\r\n                                                                   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)\r\n                                                                   at android.view.Choreographer.doCallbacks(Choreographer.java:670)\r\n                                                                   at android.view.Choreographer.doFrame(Choreographer.java:603)\r\n                                                                   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)\r\n                                                                   at android.os.Handler.handleCallback(Handler.java:739)\r\n                                                                   at android.os.Handler.dispatchMessage(Handler.java:95)\r\n                                                                   at android.os.Looper.loop(Looper.java:148)\r\n                                                                   at android.app.ActivityThread.main(ActivityThread.java:5417)\r\n                                                                   at java.lang.reflect.Method.invoke(Native Method)\r\n                                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n                                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n```\r\n\r\nIf I add the `fab` to all of the tabs, then the crash doesn't happen. I saw this crash twice. Then I added the `fab` button to all the tabs and like I mentioned the crash didn't happen. Then I removed the `fab` button from one of the tabs and tried it again and the crash didn't happen this time. So, the crash is intermittent but I definitely saw it a couple of times with the above call stack before it disappeared with no apparent code change. So, I just wanted to share the call stack with you guys in case it rings any bells.\r\n\r\n### Environment\r\n* React Native Navigation version: 2.0.0.experimental.141 including the commit to fix fab\r\n* React Native version: 0.37\r\n* Platform(s) (iOS, Android, or both?): Android\r\n* Device info (Simulator/Device? OS version? Debug/Release?): Debug Simulator\r\n"}}
{"actor":{"display_login":"varungupta85"}}