{"action":"opened","issue":{"url":"https://api.github.com/repos/gabrielemariotti/cardslib/issues/516","labels_url":"https://api.github.com/repos/gabrielemariotti/cardslib/issues/516/labels{/name}","comments_url":"https://api.github.com/repos/gabrielemariotti/cardslib/issues/516/comments","events_url":"https://api.github.com/repos/gabrielemariotti/cardslib/issues/516/events","html_url":"https://github.com/gabrielemariotti/cardslib/issues/516","id":116140073,"number":516,"title":"crash after slide to bottom when using CardArrayAdapter and multiple cards","user":{"login":"marekyggdrasil","id":8202674,"avatar_url":"https://avatars.githubusercontent.com/u/8202674?v=3","gravatar_id":"","url":"https://api.github.com/users/marekyggdrasil","html_url":"https://github.com/marekyggdrasil","followers_url":"https://api.github.com/users/marekyggdrasil/followers","following_url":"https://api.github.com/users/marekyggdrasil/following{/other_user}","gists_url":"https://api.github.com/users/marekyggdrasil/gists{/gist_id}","starred_url":"https://api.github.com/users/marekyggdrasil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekyggdrasil/subscriptions","organizations_url":"https://api.github.com/users/marekyggdrasil/orgs","repos_url":"https://api.github.com/users/marekyggdrasil/repos","events_url":"https://api.github.com/users/marekyggdrasil/events{/privacy}","received_events_url":"https://api.github.com/users/marekyggdrasil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-10T16:14:47Z","updated_at":"2015-11-10T16:14:47Z","closed_at":null,"body":"I am not sure if it qualifies as issue, my example app crashes when I use `CardArrayAdapter`. What happends is: when I put 5 cards and slide screen down it crashes with following stack trace:\r\n\r\n```\r\n11-10 16:58:08.192    8205-8205/my.package E/AndroidRuntime﹕ FATAL EXCEPTION: main\r\n    Process: my.package, PID: 8205\r\n    java.lang.NullPointerException\r\n            at it.gmariotti.cardslib.library.view.component.CardThumbnailView.cancelPotentialWork(CardThumbnailView.java:422)\r\n            at it.gmariotti.cardslib.library.view.component.CardThumbnailView.loadBitmap(CardThumbnailView.java:287)\r\n            at it.gmariotti.cardslib.library.view.component.CardThumbnailView.setupInnerView(CardThumbnailView.java:251)\r\n            at it.gmariotti.cardslib.library.view.component.CardThumbnailView.buildUI(CardThumbnailView.java:230)\r\n            at it.gmariotti.cardslib.library.view.component.CardThumbnailView.addCardThumbnail(CardThumbnailView.java:217)\r\n            at it.gmariotti.cardslib.library.view.CardView.setupThumbnailView(CardView.java:399)\r\n            at it.gmariotti.cardslib.library.view.CardView.buildUI(CardView.java:285)\r\n            at it.gmariotti.cardslib.library.view.CardView.setCard(CardView.java:242)\r\n            at it.gmariotti.cardslib.library.internal.CardArrayAdapter.getView(CardArrayAdapter.java:171)\r\n            at android.widget.AbsListView.obtainView(AbsListView.java:2257)\r\n            at android.widget.ListView.makeAndAddView(ListView.java:1790)\r\n            at android.widget.ListView.fillUp(ListView.java:725)\r\n            at android.widget.ListView.fillGap(ListView.java:664)\r\n            at android.widget.AbsListView.trackMotionScroll(AbsListView.java:5193)\r\n            at android.widget.AbsListView.scrollIfNeeded(AbsListView.java:3245)\r\n            at android.widget.AbsListView.onTouchMove(AbsListView.java:3612)\r\n            at android.widget.AbsListView.onTouchEvent(AbsListView.java:3434)\r\n            at android.view.View.dispatchTouchEvent(View.java:7714)\r\n            at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2210)\r\n            at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1945)\r\n            at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)\r\n            at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)\r\n            at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)\r\n            at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)\r\n            at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)\r\n            at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)\r\n            at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)\r\n            at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)\r\n            at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)\r\n            at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)\r\n            at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)\r\n            at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)\r\n            at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2068)\r\n            at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1515)\r\n            at android.app.Activity.dispatchTouchEvent(Activity.java:2476)\r\n            at android.support.v7.internal.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)\r\n            at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2016)\r\n            at android.view.View.dispatchPointerEvent(View.java:7894)\r\n            at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3995)\r\n            at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3874)\r\n            at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3435)\r\n            at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3485)\r\n            at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3454)\r\n            at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3561)\r\n            at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3462)\r\n            at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3618)\r\n            at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3435)\r\n            at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3485)\r\n            at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3454)\r\n            at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3462)\r\n            at android.view.ViewRootImpl$InputStage.d\r\n```\r\n\r\nIt occurs both with release `2.1.0` as well as with stable `1.9.1`. Example is inspired by [this]( https://dzone.com/articles/be-lazy-productive-android-2 ) tutorial.\r\n\r\nHere is my activity:\r\n\r\n```\r\npackage my.package;\r\nimport it.gmariotti.cardslib.library.internal.Card;\r\nimport it.gmariotti.cardslib.library.internal.CardArrayAdapter;\r\nimport it.gmariotti.cardslib.library.internal.CardHeader;\r\nimport it.gmariotti.cardslib.library.internal.CardThumbnail;\r\nimport it.gmariotti.cardslib.library.view.CardListView;\r\nimport it.gmariotti.cardslib.library.view.CardView;\r\nimport android.os.Bundle;\r\nimport android.support.v7.app.AppCompatActivity;\r\nimport java.util.ArrayList;\r\n\r\npublic class CardsActivity extends AppCompatActivity {\r\n    @Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.activity_cards);\r\n        ArrayList<Card> cards = new ArrayList<Card>();\r\n        for (int i = 0; i<5; i++) {\r\n            // Create a Card\r\n            Card card = new Card(this, R.layout.row_card);\r\n            // Create a CardHeader\r\n            CardHeader header = new CardHeader(this);\r\n            header.setTitle(\"Hello world\");\r\n            card.setTitle(\"Simple card demo\");\r\n            CardThumbnail thumb = new CardThumbnail(this);\r\n            card.addCardThumbnail(thumb);\r\n            // Add Header to card\r\n            card.addCardHeader(header);\r\n            cards.add(card);\r\n        }\r\n        // Set card in the cardView\r\n        CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(this, cards);\r\n        CardListView listView = (CardListView) this.findViewById(R.id.myList);\r\n        if (listView != null) {\r\n            listView.setAdapter(mCardArrayAdapter);\r\n        }\r\n    }\r\n}\r\n```\r\nAnd here are the layouts: `activity_cards.xml`\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:orientation=\"vertical\"\r\n    xmlns:card=\"http://schemas.android.com/apk/res-auto\" >\r\n    <it.gmariotti.cardslib.library.view.CardListView\r\n        android:id=\"@+id/myList\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"match_parent\"\r\n        card:list_card_layout_resourceID=\"@layout/list_card_thumbnail_layout\"\r\n        style=\"@style/list_card.thumbnail\"/>\r\n</RelativeLayout>\r\n```\r\nHere is `row_card.xml`\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:orientation=\"vertical\"\r\n    android:padding=\"10dp\" >\r\n    <TextView\r\n        android:id=\"@+id/card_main_inner_simple_title\"\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:text=\"Large Text\"\r\n        android:textAppearance=\"?android:attr/textAppearanceLarge\" />\r\n    <TextView\r\n        android:id=\"@+id/card_main_inner_secondary_title\"\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:text=\"Cardslib\"\r\n        android:textAppearance=\"?android:attr/textAppearanceMedium\" />\r\n</LinearLayout>\r\n```"}}