at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) - android

When i am running application in android then these problems is coming , my error is as follow i am copying here ,
07-17 11:46:49.780 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:503)
07-17 11:46:49.780 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:356)
07-17 11:46:49.784 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:379)
07-17 11:46:49.784 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
com.squareup.picasso.ResourceRequestHandler.decodeResource(ResourceRequestHandler.java:54)
07-17 11:46:49.784 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
com.squareup.picasso.ResourceRequestHandler.load(ResourceRequestHandler.java:45)
07-17 11:46:49.792 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:206) 07-17
11:46:49.792 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
com.squareup.picasso.BitmapHunter.run(BitmapHunter.java:159) 07-17
11:46:50.152 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
07-17 11:46:50.152 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
java.util.concurrent.FutureTask.run(FutureTask.java:234) 07-17
11:46:50.152 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
07-17 11:46:50.152 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
07-17 11:46:50.152 1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
java.lang.Thread.run(Thread.java:841) 07-17 11:46:50.152
1507-1532/com.shubham.MeraIndore I/dalvikvm﹕ at
com.squareup.picasso.Utils$PicassoThread.run(Utils.java:411)

Ok so i am explaining you what these all about ,
java.lang.Object
↳ android.graphics.BitmapFactory
Creates Bitmap objects from various sources, including files, streams, and byte-arrays.
you are getting error because of limited memory , ideally you only want to load a lower resolution version in memory. The lower resolution version should match the size of the UI component that displays it. An image with a higher resolution does not provide any visible benefit, but still takes up precious memory and incurs additional performance overhead due to additional on the fly scaling.
Although it will not causes any run time error in app .for more details you can visit https://developer.android.com/training/displaying-bitmaps/load-bitmap.html

Related

Sending an automatic email

Hi im trying to follow this tutorial
I followed all the steps and when i try to execute the app i get the following error:
03-14 17:24:19.618 3532-3532/ar.com.taxiexpress.taxiexpress E/dalvikvm: Could not find class 'ar.com.taxiexpress.taxiexpress.Mail', referenced from method ar.com.taxiexpress.taxiexpress.EnvioMail$SendMail.doInBackground
03-14 17:24:19.618 3532-3532/ar.com.taxiexpress.taxiexpress W/dalvikvm: VFY: unable to resolve new-instance 2544 (Lar/com/taxiexpress/taxiexpress/Mail;) in Lar/com/taxiexpress/taxiexpress/EnvioMail$SendMail;
03-14 17:24:19.618 3532-3532/ar.com.taxiexpress.taxiexpress D/dalvikvm: VFY: replacing opcode 0x22 at 0x0001
03-14 17:24:19.618 3532-3532/ar.com.taxiexpress.taxiexpress W/dalvikvm: Unable to resolve superclass of Lar/com/taxiexpress/taxiexpress/Mail; (9576)
03-14 17:24:19.618 3532-3532/ar.com.taxiexpress.taxiexpress W/dalvikvm: Link of class 'Lar/com/taxiexpress/taxiexpress/Mail;' failed
03-14 17:24:19.618 3532-3532/ar.com.taxiexpress.taxiexpress D/dalvikvm: DexOpt: unable to opt direct call 0x51e4 at 0x07 in Lar/com/taxiexpress/taxiexpress/EnvioMail$SendMail;.doInBackground
03-14 17:24:19.650 3532-3676/ar.com.taxiexpress.taxiexpress W/dalvikvm: threadid=17: thread exiting with uncaught exception (group=0xa4d31b20)
03-14 17:24:19.650 3532-3676/ar.com.taxiexpress.taxiexpress E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
Process: ar.com.taxiexpress.taxiexpress, PID: 3532
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.NoClassDefFoundError: ar.com.taxiexpress.taxiexpress.Mail
at ar.com.taxiexpress.taxiexpress.EnvioMail$SendMail.doInBackground(EnvioMail.java:51)
at ar.com.taxiexpress.taxiexpress.EnvioMail$SendMail.doInBackground(EnvioMail.java:34)
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-14 17:24:19.678 3532-3532/ar.com.taxiexpress.taxiexpress W/EGL_genymotion: eglSurfaceAttrib not implemented
03-14 17:24:19.854 3532-3532/ar.com.taxiexpress.taxiexpress W/EGL_genymotion: eglSurfaceAttrib not implemented
03-14 17:24:20.382 3532-3546/ar.com.taxiexpress.taxiexpress I/GMPM: Tag Manager is not found and thus will not be used
03-14 17:27:01.184 3532-3538/ar.com.taxiexpress.taxiexpress D/dalvikvm: GC_FOR_ALLOC freed 305K, 3% free 16909K/17288K, paused 8ms, total 8ms
03-14 17:29:19.670 3532-3676/ar.com.taxiexpress.taxiexpress I/Process: Sending signal. PID: 3532 SIG: 9
could someone tell me what should I check to resolve this issue, thanks in advance.

How to solve "Out of memory" during image processing on Imagine SDK android [duplicate]

This question already has answers here:
Strange OutOfMemory issue while loading an image to a Bitmap object
(44 answers)
Closed 7 years ago.
as i am implementing both OCR and Imagine SDK for our app, i need your help to solve this problem.
i have a method like below.
public void ImageProcessing(View v) {
try {
MIContext _miContext = MIContext.getInstance();
_miContext.clearAll();
Uri _imageUri = Uri.fromFile(GetImageFile("form.jpg")); // GetImageFile() will return a file
ImageOperation _imageOperation = ImageOperation.AUTO_ENHANCE;
OperationController _operationController = _imageOperation.getController();
_miContext.loadSourceImage( _imageUri, this );
final FineOperation fineOperation = _operationController.createOperation();
_miContext.run( fineOperation );
} catch (Exception e) {
Log.v("mango", e.getMessage());
}
}
when i execute it. it returns "Out of memory: Heap Size=7943KB, Allocated=4113KB, Bitmap Size=24888KB, Limit=32768KB"
below is my logcat output.
06-08 12:24:44.561: V/mango(16037): onCreate()
06-08 12:24:44.561: V/mango(16037): starting......
06-08 12:24:44.561: D/dalvikvm(16037): Trying to load lib /data/data/com.abbyy.sample/lib/libMobileImagingEngine.so 0x4051bfd8
06-08 12:24:44.881: D/dalvikvm(16037): Added shared lib /data/data/com.abbyy.sample/lib/libMobileImagingEngine.so 0x4051bfd8
06-08 12:24:44.881: V/mango(16037): MILicenser.getVersionInfo(): 1.2.1.15
06-08 12:24:44.951: V/mango(16037): MILicenser.setLicense() succeeded. Current state:
06-08 12:24:44.951: V/mango(16037): License: Infinite.
06-08 12:24:44.951: V/mango(16037): General availability: Enabled with results scrambling.
06-08 12:24:44.951: V/mango(16037): Allowed platforms: All.
06-08 12:24:44.951: V/mango(16037): Common processing available: Yes.
06-08 12:24:44.951: V/mango(16037): Defect detecting available: Yes.
06-08 12:24:44.951: V/mango(16037): Server side processing available: No.??
06-08 12:24:45.401: D/dalvikvm(16037): Trying to load lib /data/data/com.abbyy.sample/lib/libMobileOcrEngine.so 0x4051bfd8
06-08 12:24:45.892: D/dalvikvm(16037): Added shared lib /data/data/com.abbyy.sample/lib/libMobileOcrEngine.so 0x4051bfd8
06-08 12:24:46.032: D/dalvikvm(16037): GC_CONCURRENT freed 173K, 45% free 3109K/5639K, external 0K/0K, paused 4ms+13ms
06-08 12:24:46.392: D/ATRecorder(16037): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader#40582d68
06-08 12:24:46.402: D/WindowManagerImpl(16037): addView, new view, mViews[0]: com.android.internal.policy.impl.PhoneWindow$DecorView#4055b6e8
06-08 12:26:46.029: D/View(16037): onTouchEvent: viewFlags: 0x18004001
06-08 12:26:46.029: D/View(16037): onTouchEvent: isFocusable: true, isFocusableInTouchMode: false, isFocused: false; focusTaken: false
06-08 12:26:57.210: D/dalvikvm(16037): GC_EXTERNAL_ALLOC freed 184K, 44% free 3248K/5767K, external 0K/0K, paused 31ms
06-08 12:26:58.071: D/ATRecorder(16037): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader#4059fd80
06-08 12:26:58.071: D/WindowManagerImpl(16037): addView, new view, mViews[1]: com.android.internal.policy.impl.PhoneWindow$DecorView#4059cad0
06-08 12:26:58.311: D/WindowManagerImpl(16037): finishRemoveViewLocked, mViews[0]: com.android.internal.policy.impl.PhoneWindow$DecorView#4055b6e8
06-08 12:26:59.632: D/View(16037): onTouchEvent: viewFlags: 0x18004001
06-08 12:26:59.632: D/View(16037): onTouchEvent: isFocusable: true, isFocusableInTouchMode: false, isFocused: false; focusTaken: false
06-08 12:26:59.672: D/dalvikvm(16037): GC_EXPLICIT freed 103K, 45% free 3189K/5767K, external 24888K/26936K, paused 27ms
06-08 12:26:59.763: I/dalvikvm-heap(16037): Clamp target GC heap from 32.598MB to 32.000MB
06-08 12:26:59.763: D/dalvikvm(16037): GC_FOR_MALLOC freed 552K, 44% free 4145K/7367K, external 24888K/26936K, paused 17ms
06-08 12:26:59.763: I/dalvikvm-heap(16037): Forcing collection of SoftReferences for 1966096-byte allocation
06-08 12:26:59.773: I/dalvikvm-heap(16037): Clamp target GC heap from 32.566MB to 32.000MB
06-08 12:26:59.773: D/dalvikvm(16037): GC_FOR_MALLOC freed 32K, 45% free 4113K/7367K, external 24888K/26936K, paused 18ms
06-08 12:26:59.783: E/dalvikvm-heap(16037): Out of memory on a 1966096-byte allocation.
06-08 12:26:59.783: I/dalvikvm(16037): "main" prio=5 tid=1 RUNNABLE
06-08 12:26:59.783: I/dalvikvm(16037): | group="main" sCount=0 dsCount=0 obj=0x400275d8 self=0xd050
06-08 12:26:59.783: I/dalvikvm(16037): | sysTid=16037 nice=0 sched=0/0 cgrp=default handle=-1345002112
06-08 12:26:59.783: I/dalvikvm(16037): | schedstat=( 1244079605 798675516 1219 )
06-08 12:26:59.783: I/dalvikvm(16037): at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:~91)
06-08 12:26:59.783: I/dalvikvm(16037): at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:216)
06-08 12:26:59.783: I/dalvikvm(16037): at com.abbyy.mobile.imaging.MIExporter.importJPEG(MIExporter.java:102)
06-08 12:26:59.783: I/dalvikvm(16037): at com.abbyy.sample.MIContext.loadSourceImage(MIContext.java:114)
06-08 12:26:59.783: I/dalvikvm(16037): at com.abbyy.sample.ScanTheForm.ImageProcessing(ScanTheForm.java:71)
06-08 12:26:59.783: I/dalvikvm(16037): at java.lang.reflect.Method.invokeNative(Native Method)
06-08 12:26:59.783: I/dalvikvm(16037): at java.lang.reflect.Method.invoke(Method.java:507)
06-08 12:26:59.783: I/dalvikvm(16037): at android.view.View$1.onClick(View.java:2187)
06-08 12:26:59.793: I/dalvikvm(16037): at android.view.View.performClick(View.java:2533)
06-08 12:26:59.793: I/dalvikvm(16037): at android.view.View$PerformClick.run(View.java:9320)
06-08 12:26:59.793: I/dalvikvm(16037): at android.os.Handler.handleCallback(Handler.java:587)
06-08 12:26:59.793: I/dalvikvm(16037): at android.os.Handler.dispatchMessage(Handler.java:92)
06-08 12:26:59.793: I/dalvikvm(16037): at android.os.Looper.loop(Looper.java:150)
06-08 12:26:59.793: I/dalvikvm(16037): at android.app.ActivityThread.main(ActivityThread.java:4385)
06-08 12:26:59.793: I/dalvikvm(16037): at java.lang.reflect.Method.invokeNative(Native Method)
06-08 12:26:59.793: I/dalvikvm(16037): at java.lang.reflect.Method.invoke(Method.java:507)
06-08 12:26:59.793: I/dalvikvm(16037): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
06-08 12:26:59.793: I/dalvikvm(16037): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
06-08 12:26:59.793: I/dalvikvm(16037): at dalvik.system.NativeStart.main(Native Method)
06-08 12:26:59.793: E/dalvikvm(16037): Out of memory: Heap Size=7943KB, Allocated=4113KB, Bitmap Size=24888KB, Limit=32768KB
06-08 12:26:59.793: E/dalvikvm(16037): Extra info: Footprint=7367KB, Allowed Footprint=7943KB, Trimmed=480KB
06-08 12:26:59.793: D/AndroidRuntime(16037): Shutting down VM
06-08 12:26:59.793: W/dalvikvm(16037): threadid=1: thread exiting with uncaught exception (group=0x4001d5a0)
06-08 12:26:59.803: E/AndroidRuntime(16037): FATAL EXCEPTION: main
06-08 12:26:59.803: E/AndroidRuntime(16037): java.lang.IllegalStateException: Could not execute method of the activity
06-08 12:26:59.803: E/AndroidRuntime(16037): at android.view.View$1.onClick(View.java:2192)
06-08 12:26:59.803: E/AndroidRuntime(16037): at android.view.View.performClick(View.java:2533)
06-08 12:26:59.803: E/AndroidRuntime(16037): at android.view.View$PerformClick.run(View.java:9320)
06-08 12:26:59.803: E/AndroidRuntime(16037): at android.os.Handler.handleCallback(Handler.java:587)
06-08 12:26:59.803: E/AndroidRuntime(16037): at android.os.Handler.dispatchMessage(Handler.java:92)
06-08 12:26:59.803: E/AndroidRuntime(16037): at android.os.Looper.loop(Looper.java:150)
06-08 12:26:59.803: E/AndroidRuntime(16037): at android.app.ActivityThread.main(ActivityThread.java:4385)
06-08 12:26:59.803: E/AndroidRuntime(16037): at java.lang.reflect.Method.invokeNative(Native Method)
06-08 12:26:59.803: E/AndroidRuntime(16037): at java.lang.reflect.Method.invoke(Method.java:507)
06-08 12:26:59.803: E/AndroidRuntime(16037): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
06-08 12:26:59.803: E/AndroidRuntime(16037): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
06-08 12:26:59.803: E/AndroidRuntime(16037): at dalvik.system.NativeStart.main(Native Method)
06-08 12:26:59.803: E/AndroidRuntime(16037): Caused by: java.lang.reflect.InvocationTargetException
06-08 12:26:59.803: E/AndroidRuntime(16037): at java.lang.reflect.Method.invokeNative(Native Method)
06-08 12:26:59.803: E/AndroidRuntime(16037): at java.lang.reflect.Method.invoke(Method.java:507)
06-08 12:26:59.803: E/AndroidRuntime(16037): at android.view.View$1.onClick(View.java:2187)
06-08 12:26:59.803: E/AndroidRuntime(16037): ... 11 more
06-08 12:26:59.803: E/AndroidRuntime(16037): Caused by: java.lang.OutOfMemoryError: (Heap Size=7943KB, Allocated=4113KB, Bitmap Size=24888KB)
06-08 12:26:59.803: E/AndroidRuntime(16037): at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91)
06-08 12:26:59.803: E/AndroidRuntime(16037): at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:216)
06-08 12:26:59.803: E/AndroidRuntime(16037): at com.abbyy.mobile.imaging.MIExporter.importJPEG(MIExporter.java:102)
06-08 12:26:59.803: E/AndroidRuntime(16037): at com.abbyy.sample.MIContext.loadSourceImage(MIContext.java:114)
06-08 12:26:59.803: E/AndroidRuntime(16037): at com.abbyy.sample.ScanTheForm.ImageProcessing(ScanTheForm.java:71)
06-08 12:26:59.803: E/AndroidRuntime(16037): ... 14 more
am i doing something wrong ? Hemp help me guys
You can try increasing the allocated memory to your application. In android Every application gets a chunk of memory allocated. but in case of image processing application it is most likely to fall short of that memory.
Also try manually cleaning up the memory in your app. The android garbage collector usually have bitmap image memory leakages.
you can get a good read up on this via following link
bitmap memory managment
Use this in your application tag of Manifest file ..
android:largeHeap="true"

Project No Longer Functional in Android Studio

I originally imported the Adobe Marketing Cloud (Omniture) v3x into my project, then changed my mind and replaced it with v4. I ran into problems with v4 though, and decided to remove it and go back to the original v3 library. When I tested it last night, it was working fine and sending hits like I expected. This morning I fired it up, and the project no longer works at all. It tries to start up, seems to fail at remotely loading assets (never a problem before), and eventually crashes without giving me a meaningful exception. All I get are screens and screens of stuff like this:
08-20 12:17:05.018 31576-31777/com.newspress.hurricanehub D/dalvikvm﹕ JIT unchain all for threadid=1
08-20 12:17:05.769 31576-31777/com.newspress.hurricanehub W/dalvikvm﹕ threadid=32: spin on suspend #1 threadid=1 (pcf=0)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub W/dalvikvm﹕ threadid=32: spin on suspend #2 threadid=1 (pcf=0)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ "downloader" prio=5 tid=32 RUNNABLE
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ | group="main" sCount=0 dsCount=0 obj=0x43195640 self=0x61f07738
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ | sysTid=31777 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1643150224
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ | state=R schedstat=( 0 0 0 ) utm=4 stm=1 core=0
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:405)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.squareup.okhttp.Connection.upgradeToTls(Connection.java:208)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.squareup.okhttp.Connection.connect(Connection.java:161)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:246)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:186)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:375)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:328)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:196)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.squareup.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
08-20 12:17:06.519 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.squareup.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
08-20 12:17:06.529 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.mapbox.mapboxsdk.tileprovider.tilesource.WebSourceTileLayer.getBitmapFromURL(WebSourceTileLayer.java:174)
08-20 12:17:06.529 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.mapbox.mapboxsdk.tileprovider.tilesource.WebSourceTileLayer.getDrawableFromTile(WebSourceTileLayer.java:120)
08-20 12:17:06.529 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.mapbox.mapboxsdk.tileprovider.tilesource.WebSourceTileLayer.getDrawableFromTile(WebSourceTileLayer.java:28)
08-20 12:17:06.529 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.mapbox.mapboxsdk.tileprovider.modules.MapTileDownloader$TileLoader.loadTile(MapTileDownloader.java:154)
08-20 12:17:06.529 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at com.mapbox.mapboxsdk.tileprovider.modules.MapTileModuleLayerBase$TileLoader.run(MapTileModuleLayerBase.java:316)
08-20 12:17:06.529 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
08-20 12:17:06.529 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
08-20 12:17:06.549 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ at java.lang.Thread.run(Thread.java:841)
08-20 12:17:06.569 31576-31777/com.newspress.hurricanehub I/dalvikvm﹕ [ 08-20 12:17:06.569 31576:31777 I/dalvikvm ]
"main" prio=5 tid=1 RUNNABLE JIT
I could post my full log if that would helpful, but there's a LOT of that. I've tried everything I know. I took the module out of the project and put it back in, I tried deleting my gradle and iml files and reimporting, I even reset the project to a previous commit from before I changed any libraries or had done anything that would hurt the project. Same result, it's just completely broken now, won't load anything, and eventually crashes. Any insight? I don't really know where to look or what to try at this point.
Turned out I was mistaken in assuming something I had changed in the code was causing the issue. Once I realized older apks were also broken, further testing revealed the data stream for the map was trying to load so many polygons it was crashing the Linux kernel. Once I removed the polygons from the map, everything worked fine. If something breaks I just always figure I probably broke it, but that isn't always a safe assumption!

Lib not found error in tesseract [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I am working with OCR android. Got samples from googling and work with android tesseract. I have the project as library and refered in another project but, when I run the project it shows the following in Logcat
07-17 10:38:47.092: ERROR/AndroidRuntime(426): FATAL EXCEPTION: main
07-17 10:38:47.092: ERROR/AndroidRuntime(426): java.lang.ExceptionInInitializerError
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at com.imagetotext.ImagetoText.onCreate(ImagetoText.java:21)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at android.os.Handler.dispatchMessage(Handler.java:99)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at android.os.Looper.loop(Looper.java:123)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at java.lang.reflect.Method.invokeNative(Native Method)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at java.lang.reflect.Method.invoke(Method.java:521)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at dalvik.system.NativeStart.main(Native Method)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): Caused by: java.lang.UnsatisfiedLinkError: Library liblept not found
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at java.lang.Runtime.loadLibrary(Runtime.java:461)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at java.lang.System.loadLibrary(System.java:557)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): at com.googlecode.tesseract.android.TessBaseAPI.<clinit>(TessBaseAPI.java:47)
07-17 10:38:47.092: ERROR/AndroidRuntime(426): ... 14 more
07-17 10:38:47.112: WARN/ActivityManager(60): Force finishing activity com.imagetotext/.ImagetoText
I think there is something wrong with my android.mk. Please help me fix the error.
Exception cause line is,
System.loadLibrary(“lept”);
The problem is liblept.so (shared library) file can not found on specific library path. Without seeing your code just only assumption is your code trying to load shared library liblept.so and the library is not available at that path.
Also the code you are using is either have that liblept.so file in any lib or internal package directory or you have to generate (build) that shared library by using Android-NDK.

Amazon java.lang.VerifyError Android

I have been trying to submit 2 separate apps into the Amazon App store but they keep being rejected. Here is the stack trace for the first:
11-05 11:14:36.488 E/AndroidRuntime(28128): FATAL EXCEPTION: AsyncTask #1
11-05 11:14:36.488 E/AndroidRuntime(28128): java.lang.RuntimeException: An error occured while executing doInBackground()
11-05 11:14:36.488 E/AndroidRuntime(28128): at android.os.AsyncTask$3.done(AsyncTask.java:200)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.lang.Thread.run(Thread.java:1096)
11-05 11:14:36.488 E/AndroidRuntime(28128): Caused by: java.lang.VerifyError: com.companionfree.WLThemeViewer.AmazonClientManager
11-05 11:14:36.488 E/AndroidRuntime(28128): at com.companionfree.WLThemeViewer.UpdateDBs.doInBackground(UpdateDBs.java)
11-05 11:14:36.488 E/AndroidRuntime(28128): at com.companionfree.WLThemeViewer.UpdateDBs.doInBackground(UpdateDBs.java)
11-05 11:14:36.488 E/AndroidRuntime(28128): at android.os.AsyncTask$2.call(AsyncTask.java:185)
11-05 11:14:36.488 E/AndroidRuntime(28128): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
11-05 11:14:36.488 E/AndroidRuntime(28128): ... 4 more
And the relevant logcat for the second
10-12 15:41:48.929 D/dalvikvm( 2451): GC_FOR_MALLOC freed 8099 objects / 524416 bytes in 34ms
10-12 15:41:49.327 I/RPC ( 1563): rx thread timeout (1 clients):
10-12 15:41:49.828 I/RPC ( 1563): rx thread timeout (1 clients):
10-12 15:41:50.089 I/ActivityManager( 1563): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.companionfree.pushup/.MainScreen }
10-12 15:41:50.099 D/SurfaceFlinger( 1563): Layer::setBuffers(this=0xeafa50), pid=1563, w=1, h=1
10-12 15:41:50.099 D/SurfaceFlinger( 1563): Layer::setBuffers(this=0xeafa50), pid=1563, w=1, h=1
10-12 15:41:50.139 D/SurfaceFlinger( 1563): Layer::requestBuffer(this=0xeafa50), index=0, pid=1563, w=480, h=800 success
10-12 15:41:50.189 I/ActivityManager( 1563): Start proc com.companionfree.pushup for activity com.companionfree.pushup/.MainScreen: pid=2644 uid=10129 gids={1015, 3003}
10-12 15:41:50.319 I/RPC ( 1563): rx thread timeout (1 clients):
10-12 15:41:50.359 W/dalvikvm( 2644): VFY: Lcom/companionfree/pushup/WorkoutDbAdapter; is not instance of Landroid/app/Activity;
10-12 15:41:50.369 W/dalvikvm( 2644): VFY: bad arg 0 (into Landroid/app/Activity;)
10-12 15:41:50.369 W/dalvikvm( 2644): VFY: rejecting call to Lcom/amazon/android/Kiwi;.onActivityResult (Landroid/app/Activity;IILandroid/content/Intent;)Z
10-12 15:41:50.369 W/dalvikvm( 2644): VFY: rejecting opcode 0x71 at 0x0000
10-12 15:41:50.369 W/dalvikvm( 2644): VFY: rejected Lcom/companionfree/pushup/WorkoutDbAdapter;.onActivityResult (IILandroid/content/Intent;)V
10-12 15:41:50.369 W/dalvikvm( 2644): Verifier rejected class Lcom/companionfree/pushup/WorkoutDbAdapter;
10-12 15:41:50.369 D/AndroidRuntime( 2644): Shutting down VM
10-12 15:41:50.369 W/dalvikvm( 2644): threadid=1: thread exiting with uncaught exception (group=0x40025a70)
10-12 15:41:50.369 E/AndroidRuntime( 2644): FATAL EXCEPTION: main
10-12 15:41:50.369 E/AndroidRuntime( 2644): java.lang.VerifyError: com.companionfree.pushup.WorkoutDbAdapter
10-12 15:41:50.369 E/AndroidRuntime( 2644): at com.companionfree.pushup.MainScreen.onCreateMainScreen(MainScreen.java)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at com.companionfree.pushup.MainScreen.onCreate(MainScreen.java)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2802)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2859)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at android.app.ActivityThread.access$2300(ActivityThread.java:136)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2179)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at android.os.Handler.dispatchMessage(Handler.java:99)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at android.os.Looper.loop(Looper.java:143)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at android.app.ActivityThread.main(ActivityThread.java:5073)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at java.lang.reflect.Method.invokeNative(Native Method)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at java.lang.reflect.Method.invoke(Method.java:521)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-12 15:41:50.369 E/AndroidRuntime( 2644): at dalvik.system.NativeStart.main(Native Method)
10-12 15:41:50.379 W/ActivityManager( 1563): Force finishing activity com.companionfree.pushup/.MainScreen
10-12 15:41:50.399 D/SurfaceFlinger( 1563): Layer::setBuffers(this=0xeff6b8), pid=1563, w=1, h=1
10-12 15:41:50.399 D/SurfaceFlinger( 1563): Layer::setBuffers(this=0xeff6b8), pid=1563, w=1, h=1
10-12 15:41:50.419 D/SurfaceFlinger( 1563): Layer::requestBuffer(this=0xeff6b8), index=0, pid=1563, w=480, h=337 success
10-12 15:41:50.469 D/dalvikvm( 2451): GC_FOR_MALLOC freed 7889 objects / 521072 bytes in 105ms
10-12 15:41:50.819 I/RPC ( 1563): rx thread timeout (1 clients):
I see the same verify error on both but I can't figure it out. The only common library used between the 2 apps is the FlurryAgent.jar for analytics.
For the top app I have
For the bottom app I have
in the manifests. The only information I have been able to find out is about libraries (GSON) and needing to use dx but I am using Eclipse so that doesn't help.
To make this more difficult, the error does NOT occur on the Android Market. Yet the testers at Amazon say that it FC 5/5 times on each of their devices (I tried using an emulator for their test devices and they worked fine). I know they use "wrapper" code around my app and I think it must be interfering in some way.
Does anyone have any experience with this?
I had a similar problem - resolved it by removing the non activity class from AndroidManifest.xml
Amazon injects their own code into your apps Activities life-cycle events. Knowing that and looking at the log you've provided:
10-12 15:41:50.359 W/dalvikvm( 2644): VFY: Lcom/companionfree/pushup/WorkoutDbAdapter; is not instance of Landroid/app/Activity;
It appears that Amazon's code tried to instrument a class (WorkoutDbAdapter) which is NOT an Activity (doesn't extends Activity), ending up being rejected by the JVM's verifier.
With my app this happened since the class was listed was listed an an Activity on AndroidManifest.xml. Removing this listing from AndroidManifest.xml resolved the issue and the app was admitted to the market.
Sarp wrote that renaming your class' packaged solved the issue, perhaps by doing so you've made your listing on AndroidManifest.xml no longer relevant. Thereby circumventing the problem.
I'd say this is the problem of the Amazon. Apparently they are injecting some DRM code into your apk: Injecting code into APK
Other people are seeing similar errors - Android app issue (Amazon)
In my case, the class that was causing a VerifyError was in a package called util. It was probably clashing with an injected package by Amazon, because renaming it to utils solved the problem.
Because our app was using Facebook SDK, it was given a "No, I will sign my binary" option when uploading a new binary. When you upload an unsigned APK this way, Amazon will let you download the processed binary (that includes their injected code) as Step 2 so that you can sign it. I was able to download a copy of my APK that crashes, and test my changes without going through the approval process this way.
I just solved my problem and may help to you
I just update the AS to 2.0 and ADT, and the verify issue come out
finally, be careful with the constructor like:
class abc {
abc(int x) {
....
}
abc(byte x) {
....
}
}

Categories

Resources