title: NullPointerException when trying to load local images with ImageLoader
body: <p>I'm trying to use the nostra13/ImageLoader (<a href="https://github.com/nostra13/Android-Universal-Image-Loader" rel="nofollow">https://github.com/nostra13/Android-Universal-Image-Loader</a>) in an activity which allows the user to pick an image from the Media Gallery or take a new one with the camera. When this action is complete, I have a full path to the picture in the form "/mnt/sdcard/DCIM/100ANDRO/whatever.jpg", that's to say an image saved in the sdcard. When I try to load this image with the ImageLoader I get the following error:</p>
  
  <blockquote>
    <p>11-12 16:05:18.966: E/ImageLoader(12905): null<br>
    11-12 16:05:18.966: E/ImageLoader(12905): java.lang.NullPointerException<br>
    11-12 16:05:18.966: E/ImageLoader(12905): at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.saveImageOnDisc(LoadAndDisplayImageTask.java:239)<br>
    11-12 16:05:18.966: E/ImageLoader(12905): at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:138)<br>
    11-12 16:05:18.966: E/ImageLoader(12905): at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:72)<br>
    11-12 16:05:18.966: E/ImageLoader(12905): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:444)<br>
    11-12 16:05:18.966: E/ImageLoader(12905): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)<br>
    11-12 16:05:18.966: E/ImageLoader(12905): at java.util.concurrent.FutureTask.run(FutureTask.java:138)<br>
    11-12 16:05:18.966: E/ImageLoader(12905): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)<br>
    11-12 16:05:18.966: E/ImageLoader(12905): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)<br>
    11-12 16:05:18.966: E/ImageLoader(12905): at java.lang.Thread.run(Thread.java:1019)  </p>
  </blockquote>
  
  <p>I'm not really understanding the error, the path to the image is not null neither the Image View where I'm trying to load the image. I have the necessary permissions ons the manifest, and I'm able to load remote images but not the local ones.
  Any idea about what can be happening?</p>
  
  <p>Thank you in advance!</p>
  
  <p>This is my configuration:</p>
  
  <pre><code> imageLoader = ImageLoader.getInstance();
   DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
   .cacheInMemory()
   .cacheOnDisc()
   .showImageForEmptyUri(R.drawable.image_broken)
   .build();
   ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this)
   .memoryCache(new WeakMemoryCache())
   .threadPoolSize(4)
   .defaultDisplayImageOptions(defaultOptions)
   .build();
   imageLoader.init(config);
  </code></pre>
  
  <p>This is how I try to load the image into the imageview:</p>
  
  <pre><code>ImageView m_ivAvatar = (ImageView) findViewById(R.id.pdi_image_detail);
  imageLoader.displayImage(imagen.getUrl(), m_ivAvatar);
  </code></pre>
  
  <p>And the xml:</p>
  
  <pre><code>&lt;RelativeLayout 
          android:id="@+id/pdi_header_detail"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;ImageView 
          android:id="@+id/pdi_image_detail"
          android:layout_width="80dp"
          android:layout_height="80dp"
          android:scaleType="fitCenter"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true"/&gt;
  
      &lt;RelativeLayout 
          android:id="@+id/pdi_detail_action_icons_container"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_centerVertical="true"&gt;
  
          &lt;ImageButton 
              android:id="@+id/pdi_detail_icon_share"
              android:layout_width="30dp"
              android:layout_height="30dp"
              android:scaleType="fitCenter"
              android:layout_alignParentTop="true"
              android:layout_alignParentLeft="true"/&gt;
  
          &lt;ImageButton 
              android:id="@+id/pdi_detail_icon_map"
              android:layout_width="30dp"
              android:layout_height="30dp"
              android:scaleType="fitCenter"
              android:layout_below="@id/pdi_detalle_icon_share"
              android:layout_alignParentLeft="true"/&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>