I'm trying to spin my head around Asynctasks and threads and the like and I think I have a good solution made where I do all of my calculations on an Asynctask class, send them back to my activity using onCallComplete, add all the variables to a separate array, and then send that array to a List View adapter. However, for some reason that I just can't seem to grasp, Android is throwing me a java.lang.NullPointerException: Attempt to read from null array. I'm sure it's obvious, but I don't know how to fix it, so any advice would be greatly appreciated, thanks!
Activity's onCallComplete (where error occurs)
 public void onCallComplete(int listSize, String[] titles, String[] prices, Bitmap[] images, String[] productURLs ){
      ItemList[]itemArray= new ItemList[listSize];
      int i =0;
      while(i<listSize){
            itemArray[i] = new ItemList();
            itemArray[i].setTitle(titles[i]); //error occurs here
            itemArray[i].setPrice(prices[i]);
            itemArray[i].setImage(images[i]);
            itemArray[i].setProductURL(productURLs[i]);
            i++;
      }
      ListAdapter adapter = new CustomAdapter(this, itemArray);
      ListView productListView = (ListView)findViewById(R.id.productListView);
      productListView.setAdapter(adapter);
 }
ItemList class:
public class ItemList {
    private String title;
    private String price;
    private Bitmap image;
    private String productURL;
    public ItemList(){
        this.title=null;
        this.price=null;
        this.image=null;
        this.productURL=null;
    }
    void setTitle(String title){
        this.title = title;
    }
    void setImage(Bitmap image){
        this.image = image;
    }
    void setPrice(String price){
        this.price = price;
    }
    void setProductURL(String productURL){
        this.productURL = productURL;
    }
    String getTitle(){
        return title;
    }
    String getPrice(){
        return price;
    }
    Bitmap getImage(){
        return image;
    }
    String getProductURL(){
        return productURL;
    }
}
Edit: So after some experimentation and a pointer from Rajendran I did come to the conclusion that it's my AsyncTask calculations that are returning null (go figure, Asynctask always is a problem for me). Here is the code from the AsyncTask.
public class GetProductAttributes extends AsyncTask<Object, Object, Void> {
    OnCallCompleteCallBack callback;
    String url;
    int listSize;
    int index;
    String[] productURLs;
    String[] prices;
    String[] titles;
    String imageSRC;
    Bitmap[] images;
    ImageView productView;
    int listSize;
    int result;
    public GetProductAttributes(String url, int index, OnCallCompleteCallBack callback) {
        this.url = url;
        this.index = index;
        this.callback = callback;
    }
protected Void doInBackground(Object... voids) {
        //Create JSoup connection
        try { 
        Document doc = Jsoup.connect(url).get();
        String link = doc.select("h2#s-result-count").first().text();
        System.out.println(link);
        System.out.println(link.substring(1));
        if (link.substring(1, 2).equals("-")) {
            System.out.println("run1");
            listSize = Integer.parseInt(link.substring(2, 3));
            System.out.println(listSize);
            try {
                listSize = Integer.parseInt(link.substring(2, 4));
                System.out.println(listSize);
            } catch (Exception e) {
            }
        } else {
            System.out.println("run2");
            listSize = Integer.parseInt(link.substring(0, 1));
            System.out.println(listSize);
            try {
                listSize = Integer.parseInt(link.substring(0, 2));
                System.out.println(listSize);
            } catch (Exception e) {
            }
        }
            titles = new String[listSize];
            prices = new String[listSize];
            productURLs = new String[listSize];
            images = new Bitmap[listSize];
            int i = 0;
            while (i < listSize) {
                Elements basicLink = doc.select("div.showRightCol")
                        .select("div.leftCol")
                        .select("div.a-row.s-result-list-parent-container")
                        .select("ul.s-result-list.s-col-1.s-col-ws-1.s-result-list-hgrid.s-height-equalized.s-list-view.s-text-condensed")
                        .select("li[id=result_" + i + "]")
                        .select("div.s-item-container")
                        .select("div.a-fixed-left-grid")
                        .select("div.a-fixed-left-grid-inner");//start here to get to everything
                Element element = basicLink.select("a.a-link-normal.s-access-detail-page.s-color-twister-title-link.a-text-normal").first();
                String title = element.attr("title");
                //System.out.println("Title is: " + title);
                titles[i] = title;
//          Gets product URL and image source
                Elements longLink = basicLink.select("div.a-fixed-left-grid-col.a-col-left")
                        .select("div.a-row")
                        .select("div.a-column.a-span12.a-text-center")
                        .select("a.a-link-normal.a-text-normal");
                String productURL = longLink.attr("href");
                //System.out.println(productURL);
                productURLs[i] = productURL;
                imageSRC = longLink.select("img.s-access-image.cfMarker").attr("src");
                //System.out.println(imageSRC);
                images[i] = getImage(imageSRC);
                //Gets price
                String price = basicLink.select("div.a-row")
                        .select("div.a-column.a-span7")
                        .select("div.a-row.a-spacing-mini")
                        .select("div.a-row.a-spacing-none")
                        .select("a.a-size-small.a-link-normal.a-text-normal")
                        .select("span.a-size-base.a-color-base").first().text();
                System.out.println(price);
                prices[i]=price;
                i++;
            }
            //Gets title
        } catch (Exception e) {
        }
        return null;
    }
 
    