{"action":"created","issue":{"url":"https://api.github.com/repos/TonicArtos/SuperSLiM/issues/62","labels_url":"https://api.github.com/repos/TonicArtos/SuperSLiM/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/TonicArtos/SuperSLiM/issues/62/comments","events_url":"https://api.github.com/repos/TonicArtos/SuperSLiM/issues/62/events","html_url":"https://github.com/TonicArtos/SuperSLiM/issues/62","id":62482249,"number":62,"title":"Sporadic NullPointerException in 0.4.5 on devices running KitKat","user":{"login":"kcorwin","id":124571,"avatar_url":"https://avatars.githubusercontent.com/u/124571?v=3","gravatar_id":"","url":"https://api.github.com/users/kcorwin","html_url":"https://github.com/kcorwin","followers_url":"https://api.github.com/users/kcorwin/followers","following_url":"https://api.github.com/users/kcorwin/following{/other_user}","gists_url":"https://api.github.com/users/kcorwin/gists{/gist_id}","starred_url":"https://api.github.com/users/kcorwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcorwin/subscriptions","organizations_url":"https://api.github.com/users/kcorwin/orgs","repos_url":"https://api.github.com/users/kcorwin/repos","events_url":"https://api.github.com/users/kcorwin/events{/privacy}","received_events_url":"https://api.github.com/users/kcorwin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-17T18:47:13Z","updated_at":"2015-03-17T19:02:43Z","closed_at":null,"body":"Using the the 0.4.5 release. This is happening for some of our users, but unfortunately we are unable to reproduce it, so it's hard to say why it's happening. All reports are coming from devices running KitKat (4.4.2 and 4.4.4) and this apparently happens upon loading the activity (or shortly thereafter?).\r\n\r\nThis stack trace closely resembles https://github.com/TonicArtos/SuperSLiM/issues/4, but we're obviously using a more recent version.\r\n\r\nI will update this issue as soon as I can find more useful information (sorry it's so vague!), but I thought I'd report it in the meantime in case anyone has ideas.\r\n\r\njava.lang.NullPointerException\r\n       at android.support.v7.widget.RecyclerView$LayoutManager.getPosition(SourceFile:5017)\r\n       at com.tonicartos.superslim.LayoutManager.computeVerticalScrollOffset(SourceFile:555)\r\n       at android.support.v7.widget.RecyclerView.computeVerticalScrollOffset(SourceFile:1115)\r\n       at android.view.View.canScrollVertically(View.java:12016)\r\n       at android.support.v4.view.ViewCompatICS.canScrollVertically(SourceFile:34)\r\n       at android.support.v4.view.ViewCompat$ICSViewCompatImpl.canScrollVertically(SourceFile:907)\r\n       at android.support.v4.view.ViewCompat.canScrollVertically(SourceFile:1192)\r\n       at android.support.v7.widget.RecyclerView$LayoutManager.onInitializeAccessibilityEvent(SourceFile:6301)\r\n       at android.support.v7.widget.RecyclerViewAccessibilityDelegate.onInitializeAccessibilityEvent(SourceFile:66)\r\n       at android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl$1.onInitializeAccessibilityEvent(SourceFile:228)\r\n       at android.support.v4.view.AccessibilityDelegateCompatJellyBean$1.onInitializeAccessibilityEvent(SourceFile:56)\r\n       at android.view.View.onInitializeAccessibilityEvent(View.java:5204)\r\n       at android.view.View.sendAccessibilityEventUncheckedInternal(View.java:5077)\r\n       at android.view.View$AccessibilityDelegate.sendAccessibilityEventUnchecked(View.java:19417)\r\n       at android.support.v4.view.AccessibilityDelegateCompatIcs.sendAccessibilityEventUnchecked(SourceFile:117)\r\n       at android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateIcsImpl.sendAccessibilityEventUnchecked(SourceFile:210)\r\n       at android.support.v4.view.AccessibilityDelegateCompat.sendAccessibilityEventUnchecked(SourceFile:358)\r\n       at android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl$1.sendAccessibilityEventUnchecked(SourceFile:255)\r\n       at android.support.v4.view.AccessibilityDelegateCompatJellyBean$1.sendAccessibilityEventUnchecked(SourceFile:82)\r\n       at android.view.View.sendAccessibilityEventUnchecked(View.java:5062)\r\n       at android.view.ViewRootImpl$SendWindowContentChangedAccessibilityEvent.run(ViewRootImpl.java:6615)\r\n       at android.view.ViewRootImpl$SendWindowContentChangedAccessibilityEvent.runOrPost(ViewRootImpl.java:6641)\r\n       at android.view.ViewRootImpl.postSendWindowContentChangedCallback(ViewRootImpl.java:5876)\r\n       at android.view.ViewRootImpl.notifySubtreeAccessibilityStateChanged(ViewRootImpl.java:5949)\r\n       at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2539)\r\n       at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2539)\r\n       at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2539)\r\n       at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2539)\r\n       at android.view.ViewGroup.notifySubtreeAccessibilityStateChanged(ViewGroup.java:2539)\r\n       at android.view.View.notifySubtreeAccessibilityStateChangedIfNeeded(View.java:7434)\r\n       at android.view.View.setFrame(View.java:15057)\r\n       at android.view.View.layout(View.java:14944)\r\n       at android.view.ViewGroup.layout(ViewGroup.java:4631)\r\n       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)\r\n       at android.widget.FrameLayout.onLayout(FrameLayout.java:388)\r\n       at android.view.View.layout(View.java:14948)\r\n       at android.view.ViewGroup.layout(ViewGroup.java:4631)\r\n       at android.support.v4.view.ViewPager.onLayout(SourceFile:1594)\r\n       at android.view.View.layout(View.java:14948)\r\n       at android.view.ViewGroup.layout(ViewGroup.java:4631)\r\n       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)\r\n       at android.widget.FrameLayout.onLayout(FrameLayout.java:388)\r\n       at android.view.View.layout(View.java:14948)\r\n       at android.view.ViewGroup.layout(ViewGroup.java:4631)\r\n       at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)\r\n       at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)\r\n       at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)\r\n       at android.view.View.layout(View.java:14948)\r\n       at android.view.ViewGroup.layout(ViewGroup.java:4631)\r\n       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)\r\n       at android.widget.FrameLayout.onLayout(FrameLayout.java:388)\r\n       at android.view.View.layout(View.java:14948)\r\n       at android.view.ViewGroup.layout(ViewGroup.java:4631)\r\n       at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1987)\r\n       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1744)\r\n       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)\r\n       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5610)\r\n       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)\r\n       at android.view.Choreographer.doCallbacks(Choreographer.java:574)\r\n       at android.view.Choreographer.doFrame(Choreographer.java:544)\r\n       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)\r\n       at android.os.Handler.handleCallback(Handler.java:733)\r\n       at android.os.Handler.dispatchMessage(Handler.java:95)\r\n       at android.os.Looper.loop(Looper.java:212)\r\n       at android.app.ActivityThread.main(ActivityThread.java:5137)\r\n       at java.lang.reflect.Method.invokeNative(Method.java)\r\n       at java.lang.reflect.Method.invoke(Method.java:515)\r\n       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)\r\n       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)\r\n       at dalvik.system.NativeStart.main(NativeStart.java)"},"comment":{"url":"https://api.github.com/repos/TonicArtos/SuperSLiM/issues/comments/82532910","html_url":"https://github.com/TonicArtos/SuperSLiM/issues/62#issuecomment-82532910","issue_url":"https://api.github.com/repos/TonicArtos/SuperSLiM/issues/62","id":82532910,"user":{"login":"TonicArtos","id":296142,"avatar_url":"https://avatars.githubusercontent.com/u/296142?v=3","gravatar_id":"","url":"https://api.github.com/users/TonicArtos","html_url":"https://github.com/TonicArtos","followers_url":"https://api.github.com/users/TonicArtos/followers","following_url":"https://api.github.com/users/TonicArtos/following{/other_user}","gists_url":"https://api.github.com/users/TonicArtos/gists{/gist_id}","starred_url":"https://api.github.com/users/TonicArtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TonicArtos/subscriptions","organizations_url":"https://api.github.com/users/TonicArtos/orgs","repos_url":"https://api.github.com/users/TonicArtos/repos","events_url":"https://api.github.com/users/TonicArtos/events{/privacy}","received_events_url":"https://api.github.com/users/TonicArtos/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T19:02:43Z","updated_at":"2015-03-17T19:02:43Z","body":"Okay, I see how this is happening. I've forgotten to handle no items being attached yet. It looks like this actually only happens when items are being added to a layout with 0 children, which is why it is intermittent. From this I suppose you are setting an adapter and gradually adding items to it."}}