Android Universal Image Downloader: Call OpenGL ES API Error

I am using Universal Image Loader in my application. everything works well when I use display methods such as:

 ImageLoader.getInstance().displayImage(imagePath, imageview);

but when I use loading methods to get a raster object,

 ImageLoader.getInstance().loadImage(imagePath, new SimpleImageLoadingListener() {
 // @Override
 public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
 // Do whatever you want with Bitmap
 }
 });

I got an error in logcat:

OpenGL ES API call without current context

so where is the problem? Update : my logcat:

02-21 18:39:27.232: W/ImageLoader(19090): memoryCache() and memoryCacheSize() calls overlap each other
02-21 18:39:27.242: W/ImageLoader(19090): discCache(), discCacheSize() and discCacheFileCount calls overlap each other
02-21 18:39:27.242: W/ImageLoader(19090): discCache(), discCacheSize() and discCacheFileCount calls overlap each other
02-21 18:39:38.692: E/libEGL(19090): call to OpenGL ES API with no current context (logged once per thread)
02-21 18:39:38.702: D/AndroidRuntime(19090): Shutting down VM
02-21 18:39:38.702: W/dalvikvm(19090): threadid=1: thread exiting with uncaught exception (group=0x2aac8578)
02-21 18:39:38.712: E/AndroidRuntime(19090): FATAL EXCEPTION: main
02-21 18:39:38.712: E/AndroidRuntime(19090): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://media/external/images/media/1155 }} to activity {com.example.imagecaching/com.example.imagecaching.MainActivity}: java.lang.NullPointerException
02-21 18:39:38.712: E/AndroidRuntime(19090):    at android.app.ActivityThread.deliverResults(ActivityThread.java:2553)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at android.app.ActivityThread.handleSendResult(ActivityThread.java:2595)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at android.app.ActivityThread.access$2000(ActivityThread.java:121)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at android.os.Handler.dispatchMessage(Handler.java:99)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at android.os.Looper.loop(Looper.java:130)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at android.app.ActivityThread.main(ActivityThread.java:3701)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at java.lang.reflect.Method.invokeNative(Native Method)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at java.lang.reflect.Method.invoke(Method.java:507)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at dalvik.system.NativeStart.main(Native Method)
02-21 18:39:38.712: E/AndroidRuntime(19090): Caused by: java.lang.NullPointerException
02-21 18:39:38.712: E/AndroidRuntime(19090):    at com.example.imagecaching.MainActivity.onActivityResult(MainActivity.java:162)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at android.app.Activity.dispatchActivityResult(Activity.java:3908)
02-21 18:39:38.712: E/AndroidRuntime(19090):    at android.app.ActivityThread.deliverResults(ActivityThread.java:2549)
02-21 18:39:38.712: E/AndroidRuntime(19090):    ... 11 more
02-21 18:39:38.752: D/dalvikvm(19090): DexOpt: couldn't find field Landroid/graphics
/BitmapFactory$Options;.inBitmap
02-21 18:39:38.752: W/dalvikvm(19090): VFY: unable to resolve instance field 21
02-21 18:39:38.762: D/dalvikvm(19090): VFY: replacing opcode 0x54 at 0x0000
02-21 18:39:38.762: D/dalvikvm(19090): VFY: dead code 0x0002-0008 in Lcom/nostra13/universalimageloader/core/decode/ImageDecodingInfo;.copyOptions11 (Landroid/graphics/BitmapFactory$Options;Landroid/graphics/BitmapFactory$Options;)V
02-21 18:39:39.002: D/dalvikvm(19090): GC_CONCURRENT freed 238K, 48% free 2943K/5575K, external 7558K/9438K, paused 2ms+3ms
02-21 18:44:38.752: I/Process(19090): Sending signal. PID: 19090 SIG: 9
+3
source share

All Articles