{"action":"created","issue":{"url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/231","repository_url":"https://api.github.com/repos/davideas/FlexibleAdapter","labels_url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/231/comments","events_url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/231/events","html_url":"https://github.com/davideas/FlexibleAdapter/issues/231","id":190196752,"number":231,"title":"Crash in StickyHeaderHelper class as if ViewGroup for Sticky Headers is not included in layout","user":{"login":"nbortolussi","id":19995679,"avatar_url":"https://avatars.githubusercontent.com/u/19995679?v=3","gravatar_id":"","url":"https://api.github.com/users/nbortolussi","html_url":"https://github.com/nbortolussi","followers_url":"https://api.github.com/users/nbortolussi/followers","following_url":"https://api.github.com/users/nbortolussi/following{/other_user}","gists_url":"https://api.github.com/users/nbortolussi/gists{/gist_id}","starred_url":"https://api.github.com/users/nbortolussi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbortolussi/subscriptions","organizations_url":"https://api.github.com/users/nbortolussi/orgs","repos_url":"https://api.github.com/users/nbortolussi/repos","events_url":"https://api.github.com/users/nbortolussi/events{/privacy}","received_events_url":"https://api.github.com/users/nbortolussi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-17T23:38:05Z","updated_at":"2016-11-18T00:11:40Z","closed_at":"2016-11-17T23:40:54Z","body":"I have implemented sticky headers in multiple places and everything is working well for a large majority. I am unable to reproduce the following bug (got it in from Crashlytics from a SAMSUNG-SM-G900A running 5.1.1). It seems like the crash would be caused by the sticky header view container not being included in the layout (which would make mStickyHolderLayout null), but I am definitely including the requisite code <include layout=\"@layout/sticky_header_layout\" /> directly after the RecyclerView in my layout. Seems to be pretty hard to debug since I can't reproduce it - any ideas?\r\n```\r\nFatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewPropertyAnimator android.view.ViewGroup.animate()' on a null object reference\r\n       at eu.davidea.flexibleadapter.helpers.StickyHeaderHelper.clearHeaderWithAnimation(StickyHeaderHelper.java:240)\r\n       at eu.davidea.flexibleadapter.helpers.StickyHeaderHelper.updateOrClearHeader(StickyHeaderHelper.java:119)\r\n       at eu.davidea.flexibleadapter.FlexibleAdapter$AdapterDataObserver.updateOrClearHeader(FlexibleAdapter.java:4445)\r\n       at eu.davidea.flexibleadapter.FlexibleAdapter$AdapterDataObserver.onChanged(FlexibleAdapter.java:4452)\r\n       at android.support.v7.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:10769)\r\n       at android.support.v7.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:6347)\r\n       at eu.davidea.flexibleadapter.FlexibleAdapter.postUpdate(FlexibleAdapter.java:4627)\r\n       at eu.davidea.flexibleadapter.FlexibleAdapter.updateDataSet(FlexibleAdapter.java:497)\r\n       at eu.davidea.flexibleadapter.FlexibleAdapter.updateDataSet(FlexibleAdapter.java:466)\r\n       at com.winering.wine.base.BaseAdapter.updateDataSet(BaseAdapter.java:139)\r\n       at com.winering.wine.channels.channeldetails.ChannelDetailsFragment.swapData(ChannelDetailsFragment.java:155)\r\n       at com.winering.wine.channels.channeldetails.ChannelDetailsPresenter$1.handleMessage(ChannelDetailsPresenter.java:44)\r\n       at android.os.Handler.dispatchMessage(Handler.java:102)\r\n       at android.os.Looper.loop(Looper.java:145)\r\n       at android.app.ActivityThread.main(ActivityThread.java:6938)\r\n       at java.lang.reflect.Method.invoke(Method.java)\r\n       at java.lang.reflect.Method.invoke(Method.java:372)\r\n       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)\r\n       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)"},"comment":{"url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/comments/261410665","html_url":"https://github.com/davideas/FlexibleAdapter/issues/231#issuecomment-261410665","issue_url":"https://api.github.com/repos/davideas/FlexibleAdapter/issues/231","id":261410665,"user":{"login":"nbortolussi","id":19995679,"avatar_url":"https://avatars.githubusercontent.com/u/19995679?v=3","gravatar_id":"","url":"https://api.github.com/users/nbortolussi","html_url":"https://github.com/nbortolussi","followers_url":"https://api.github.com/users/nbortolussi/followers","following_url":"https://api.github.com/users/nbortolussi/following{/other_user}","gists_url":"https://api.github.com/users/nbortolussi/gists{/gist_id}","starred_url":"https://api.github.com/users/nbortolussi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbortolussi/subscriptions","organizations_url":"https://api.github.com/users/nbortolussi/orgs","repos_url":"https://api.github.com/users/nbortolussi/repos","events_url":"https://api.github.com/users/nbortolussi/events{/privacy}","received_events_url":"https://api.github.com/users/nbortolussi/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T00:11:40Z","updated_at":"2016-11-18T00:11:40Z","body":"Interesting - I actually did just get the crash. It was only upon doing 'Instant Run' from Android Studio however. The warning you mentioned did show in the logs first.\r\n\r\n``11-17 19:09:22.101 31482-31482/com.winering.wine W/StickyHeaderHelper: WARNING! ViewGroup for Sticky Headers unspecified! You must include @layout/sticky_header_layout or implement FlexibleAdapter.getStickySectionHeadersHolder() method"}}
{"actor":{"display_login":"nbortolussi"}}