Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV for Android Out of memory Error

03-15 22:32:18.492 7160-9350/xx.xx.xx I/dalvikvm-heap: Forcing collection of SoftReferences for 21003360-byte allocation 03-15 22:32:18.532 7160-9350/xx.xx.xx E/dalvikvm-heap: Out of memory on a 21003360-byte allocation. 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: "AsyncTask #2" prio=5 tid=17 RUNNABLE 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: | group="main" sCount=0 dsCount=0 obj=0x41a2c190 self=0x6116b150 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: | sysTid=9350 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1628738832 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: | state=R schedstat=( 510200159 389795835 636 ) utm=46 stm=5 core=0 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at android.graphics.Bitmap.nativeCreate(Native Method) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at android.graphics.Bitmap.createBitmap(Bitmap.java:810) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at android.graphics.Bitmap.createBitmap(Bitmap.java:787) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at android.graphics.Bitmap.createBitmap(Bitmap.java:754) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at com.scanlibrary.ScanActivity.getScannedBitmap(Native Method) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at com.scanlibrary.ScanFragment.getScannedBitmap(ScanFragment.java:196) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at com.scanlibrary.ScanFragment.access$700(ScanFragment.java:32) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at com.scanlibrary.ScanFragment$ScanAsyncTask.doInBackground(ScanFragment.java:216) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at com.scanlibrary.ScanFragment$ScanAsyncTask.doInBackground(ScanFragment.java:200) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at android.os.AsyncTask$2.call(AsyncTask.java:288) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 03-15 22:32:18.532 7160-9350/xx.xx.xx I/dalvikvm: at java.lang.Thread.run(Thread.java:841) 03-15 22:32:18.532 7160-9350/xx.xx.xx E/cv::error(): OpenCV Error: Assertion failed (8) in H, file , line 175 03-15 22:32:18.532 7160-9350/xx.xx.xx W/dalvikvm: Exception thrown (Ljava/lang/OutOfMemoryError;) while throwing internal exception (Ljava/lang/Exception;) 03-15 22:32:18.542 7160-9350/xx.xx.xx W/dalvikvm: threadid=17: thread exiting with uncaught exception (group=0x415d5ce0) 03-15 22:32:18.542 7160-9350/xx.xx.xx E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2 Process: xx.xx.xx, PID: 7160 java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841) Caused by: java.lang.OutOfMemoryError at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:810) at android.graphics.Bitmap.createBitmap(Bitmap.java:787) at android.graphics.Bitmap.createBitmap(Bitmap.java:754) at com.scanlibrary.ScanActivity.getScannedBitmap(Native Method) at com.scanlibrary.ScanFragment.getScannedBitmap(ScanFragment.java:196) at com.scanlibrary.ScanFragment.access$700(ScanFragment.java:32) at com.scanlibrary.ScanFragment$ScanAsyncTask.doInBackground(ScanFragment.java:216) at com.scanlibrary.ScanFragment$ScanAsyncTask.doInBackground(ScanFragment.java:200) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)  at java.lang.Thread.run(Thread.java:841)  03-15 22:32:18.682 7160-7160/xx.xx.xx I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@421d14b8 time:8437319 03-15 22:32:21.462 7160-9350/xx.xx.xx I/Process: Sending signal. PID: 7160 SIG: