during the download i get E/CursorWindow - android

my application is downloading large files from internet. but during the download i get
E/CursorWindow﹕ Could not create CursorWindow from Parcel due to error -12.
error. I am using download manager.
I get a very long out put part it looks like:
Cursor finalized without prior close()
Cursor finalized without prior close()
Cursor finalized without prior close()
Cursor finalized without prior close()
Cursor finalized without prior close()
Cursor finalized without prior close()
Cursor finalized without prior close()
E/CursorWindow﹕ Could not create CursorWindow from Parcel due to error -12.
E/CursorWindow﹕ Could not create CursorWindow from Parcel due to error -12.
E/CursorWindow﹕ Could not create CursorWindow from Parcel due to error -12.
E/CursorWindow﹕ Could not create CursorWindow from Parcel due to error -12.
E/CursorWindow﹕ Could not create CursorWindow from Parcel due to error -12.
E/CursorWindow﹕ Could not create CursorWindow from Parcel due to error -12.
09-01 23:08:44.241 17397-17615/com.yasna.appsaraai W/System.err﹕ at java.lang.Thread.run(Thread.java:841)
09-01 23:08:44.246 16969-17654/? E/CursorWindow﹕ Could not allocate CursorWindow '/data/data/com.android.providers.downloads/databases/downloads.db' of size 2097152 due to error -12.
09-01 23:08:44.246 16969-17654/? E/JavaBinder﹕ *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=552 (# cursors opened by this proc=4) (# cursors opened by pid 17397=548)
at android.database.CursorWindow.<init>(CursorWindow.java:109)
at android.database.CursorWindow.<init>(CursorWindow.java:100)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
at android.database.sqlite.SQLiteCursor.clearOrCreateWindow(SQLiteCursor.java:301)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:139)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:133)
at android.database.CursorToBulkCursorAdaptor.getBulkCursorDescriptor(CursorToBulkCursorAdaptor.java:148)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:118)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)
09-01 23:08:44.251 17397-17615/com.yasna.appsaraai W/System.err﹕ java.lang.NullPointerException
09-01 23:08:44.251 17397-17615/com.yasna.appsaraai W/System.err﹕ at af.yasna.appsaraai.ApkFileDownloader$1.run(ApkFileDownloader.java:105)
09-01 23:08:44.251 17397-17615/com.yasna.appsaraai W/System.err﹕ at java.lang.Thread.run(Thread.java:841)
09-01 23:08:44.256 16969-17642/? E/CursorWindow﹕ Could not allocate CursorWindow '/data/data/com.android.providers.downloads/databases/downloads.db' of size 2097152 due to error -12.
09-01 23:08:44.256 16969-17642/? E/JavaBinder﹕ *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=552 (# cursors opened by this proc=4) (# cursors opened by pid 17397=548)
at android.database.CursorWindow.<init>(CursorWindow.java:109)
at android.database.CursorWindow.<init>(CursorWindow.java:100)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
at android.database.sqlite.SQLiteCursor.clearOrCreateWindow(SQLiteCursor.java:301)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:139)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:133)
at android.database.CursorToBulkCursorAdaptor.getBulkCursorDescriptor(CursorToBulkCursorAdaptor.java:148)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:118)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)

Related

FATAL EXCEPTION: FrescoDecodeExecutor-2

I got the crash FATAL EXCEPTION: FrescoDecodeExecutor-2
Throwing OutOfMemoryError "Failed to allocate a 64256268 byte allocation with 16777216 free bytes and 49MB until OOM"
StackTrace :
java.lang.OutOfMemoryError: Failed to allocate a 64256268 byte allocation with 16777216 free bytes and 49MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:905)
at android.graphics.Bitmap.createBitmap(Bitmap.java:882)
at android.graphics.Bitmap.createBitmap(Bitmap.java:849)
at com.facebook.imagepipeline.memory.BitmapPool.alloc(BitmapPool.java:51)
at com.facebook.imagepipeline.memory.BitmapPool.alloc(BitmapPool.java:26)
at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:255)
at com.facebook.imagepipeline.platform.ArtDecoder.decodeStaticImageFromStream(ArtDecoder.java:147)
at com.facebook.imagepipeline.platform.ArtDecoder.decodeJPEGFromEncodedImage(ArtDecoder.java:127)
at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decodeJpeg(DefaultImageDecoder.java:173)
at com.facebook.imagepipeline.decoder.DefaultImageDecoder$1.decode(DefaultImageDecoder.java:56)
at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decode(DefaultImageDecoder.java:119)
at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.doDecode(DecodeProducer.java:254)
at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.access$300(DecodeProducer.java:113)
at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder$1.run(DecodeProducer.java:152)
at com.facebook.imagepipeline.producers.JobScheduler.doJob(JobScheduler.java:202)
at com.facebook.imagepipeline.producers.JobScheduler.access$000(JobScheduler.java:22)
at com.facebook.imagepipeline.producers.JobScheduler$1.run(JobScheduler.java:73)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)
at java.lang.Thread.run(Thread.java:761)
Image is 5,34 Mo big 5344x3006 and was shoot by the phone Motorola XT1562, Android 7.1.1
implementation 'com.facebook.fresco:fresco:1.9.0'
Of course it does not reproduced every time the app is running
What's wrong ? Help ! :-)

Logcat shows random/irrelevant errors

It's so annoying when logcat shows errors which are not related to my app at all. I turned off my app in the emulator and still this error will print after every 15-20 seconds
06-08 18:22:50.685 2350-14664/com.google.android.googlequicksearchbox:search W/ErrorProcessor: onFatalError, processing error from engine(4)
com.google.android.apps.gsa.shared.speech.a.g: Error reading from input stream
at com.google.android.apps.gsa.staticplugins.recognizer.i.a.a(SourceFile:342)
at com.google.android.apps.gsa.staticplugins.recognizer.i.a$1.run(SourceFile:1367)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
at com.google.android.apps.gsa.shared.util.concurrent.a.ad$1.run(SourceFile:85)
Caused by: com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 393238 | Buffer overflow, no available space.
at com.google.android.apps.gsa.speech.audio.Tee.g(SourceFile:2531)
at com.google.android.apps.gsa.speech.audio.ap.read(SourceFile:555)
at java.io.InputStream.read(InputStream.java:101)
at com.google.android.apps.gsa.speech.audio.al.run(SourceFile:362)
at com.google.android.apps.gsa.speech.audio.ak$1.run(SourceFile:471)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:66)
at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:139)
at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:139)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
at java.lang.Thread.run(Thread.java:761) 
at com.google.android.apps.gsa.shared.util.concurrent.a.ad$1.run(SourceFile:85)
It makes debugging a bit tedious and I really want to do something about it.
EDIT-Even after using the filter I get random googlequicksearchbox errors
06-08 18:20:34.728 2350-14241/com.google.android.googlequicksearchbox:search E/AudioRecord: AudioFlinger could not create record track, status: -1
06-08 18:20:34.732 2350-14241/com.google.android.googlequicksearchbox:search E/AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -1.
06-08 18:20:34.732 2350-14241/com.google.android.googlequicksearchbox:search E/android.media.AudioRecord: Error code -20 when initializing native AudioRecord object.
06-08 18:20:34.732 2350-14241/com.google.android.googlequicksearchbox:search E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
06-08 18:20:39.760 1306-3296/? E/audio_hw_generic: Error opening input stream format 1, channel_mask 0010, sample_rate 16000
06-08 18:20:39.762 1306-1691/? E/AudioFlinger: openRecord() permission denied: recording not allowed
PS: I am not using any voice related stuff in my app.
You Go To File menu on Android studio they have a option invalidate cache and restart and press this option .
when You invalidate cache and restart then . Approx Your Problem solved
You could use pidcat (https://github.com/JakeWharton/pidcat) - Pidcat is a colored logcat script which only shows log entries for a specific application package.

Android KitKat 4.4 Chromium WebView "v8_value_converter_impl.cc" error

I am building an Android app which contains a couple of webview. The app needs to support KitKat 4.4 at minimum which embeds chromium v30 webview according to this. I am testing the app on Samsung Galaxy Note 2 running 4.4.2 stock rom, the webview runs very slowly and the logcat is flood with the below error messages:
...
03-21 14:11:48.651 29445-29445/com.mylovely.app I/GraphicBuffer: allocate buffer (w:384 h:384 f:1) handle(0x6f64b600) err(0)
03-21 14:11:48.652 29445-29445/com.mylovely.app I/GraphicBuffer: allocate buffer (w:384 h:384 f:1) handle(0x6d715280) err(0)
03-21 14:11:48.652 29445-29445/com.mylovely.app I/GraphicBuffer: allocate buffer (w:128 h:192 f:1) handle(0x6dd99590) err(0)
03-21 14:12:03.996 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionDirection threw an exception.
03-21 14:12:03.996 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionEnd threw an exception.
03-21 14:12:03.996 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionStart threw an exception.
03-21 14:12:04.007 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionDirection threw an exception.
03-21 14:12:04.007 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionEnd threw an exception.
03-21 14:12:04.007 29445-29884/com.mylovely.app E/chromium: [ERROR:v8_value_converter_impl.cc(405)] Getter for property selectionStart threw an exception.
... <skipped lots of duplicated error here>
03-21 14:12:05.370 29445-29445/com.mylovely.app I/dalvikvm-heap: Grow heap (frag case) to 41.055MB for 11211498-byte allocation
03-21 14:12:06.285 29445-29445/com.mylovely.app I/dalvikvm-heap: Grow heap (frag case) to 34.448MB for 4285074-byte allocation
03-21 14:12:06.354 29445-29445/com.mylovely.app I/Choreographer: Skipped 41 frames! The application may be doing too much work on its main thread.
03-21 14:12:06.356 29445-29445/com.mylovely.app I/GraphicBuffer: allocate buffer (w:384 h:384 f:1) handle(0x637baab0) err(0)
03-21 14:12:06.358 29445-29445/com.mylovely.app I/GraphicBuffer: allocate buffer (w:384 h:384 f:1) handle(0x6e7ee640) err(0)
...
I already did some googling and found this seems to be fixed this chromium ticket. But since we cannot update the system webview under 4.4.2 through Google Play. Is there any other way to fix / workaround this issue beside embedding other webview (like crosswalk) to the app?
I found out the root cause of the issue. I added some heavy js tasks in the onProgressChanged callback, which they would output an null object. This null object could not be serialized and causing the bug in this chromium ticket. As a workaround, I wrapped all the js calls with IIFE to slient the output and throttle the js calls in onProgressChanged using Guava's RateLimiter.

Media Codec : Insufficient sized buffer

When i play video with resolution 704x576 (using MediaCodec) . I'm seeing this error and app is crashing
Logs:
12-04 04:35:55.507 E/OMX-VDEC-1080P( 9621): Insufficient sized buffer given for playback, expected 2514944, got 2506752
12-04 04:35:55.507 E/OMXNodeInstance( 9621): OMX_UseBuffer failed with error -2147479547 (0x80001005)
12-04 04:35:55.507 E/ACodec (22699): registering GraphicBuffer 0 with OMX IL component failed: -2147483648
12-04 04:35:55.507 E/ACodec (22699): Failed to allocate output port buffers after port reconfiguration (error 0x80000000)
12-04 04:35:55.507 E/MediaCodec(22699): Codec reported an error. (omx error 0x80001001, internalError -2147483648)

Android Hello World app crashes: IllegalArgumentException from Surface.lockCanvasNative

I am trying to run the simplest Hello World example app and looks like I can crash it even all it does is showing a TextView.
Steps to reproduce: Launch it in the emulator (1.5). Open the app - it shows the text view, then lock the phone by pressing "end call" button. Unlock by pressing "menu", then press "back". App crashes with "The process android.process.acore has stopped unexpectedly..." and Force Close button. It does not happen all the time, but I am able to reproduce it every time after wiping the user data at least.
I wonder if default Hello World is missing a detail which was considered too advanced for a hello world... Such problems with a basic example does not look very encouraging =)
Any idea what detail is missing and how to avoid this crash?
Stack (I've truncated timestamps):
37.478: DEBUG/KeyguardViewMediator(576): wakeWhenReadyLocked(82)
37.481: DEBUG/KeyguardViewMediator(576): handleWakeWhenReady(82)
37.481: DEBUG/KeyguardViewMediator(576): pokeWakelock(5000)
39.110: DEBUG/KeyguardViewMediator(576): pokeWakelock(5000)
39.140: WARN/InputManagerService(576): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#436e3fc0
40.990: ERROR/IMemory(679): binder=0x238aa8 transaction failed fd=-2147483647, size=0, err=-2147483646 (Unknown error: 2147483646)
40.990: ERROR/IMemory(679): cannot dup fd=-2147483647, size=0, err=-2147483646 (Bad file number)
40.990: ERROR/IMemory(679): cannot map BpMemoryHeap (binder=0x238aa8), size=0, fd=-1 (Bad file number)
40.990: ERROR/Surface(679): Couldn't map Surface's heap (binder=0x238aa8, heap=0x238b00)
40.990: DEBUG/AndroidRuntime(679): Shutting down VM
40.990: WARN/dalvikvm(679): threadid=3: thread exiting with uncaught exception (group=0x4000fe70)
40.990: ERROR/AndroidRuntime(679): Uncaught handler: thread main exiting due to uncaught exception
40.990: ERROR/AndroidRuntime(679): java.lang.IllegalArgumentException
40.990: ERROR/AndroidRuntime(679): at android.view.Surface.lockCanvasNative(Native Method)
40.990: ERROR/AndroidRuntime(679): at android.view.Surface.lockCanvas(Surface.java:196)
40.990: ERROR/AndroidRuntime(679): at android.view.ViewRoot.draw(ViewRoot.java:1175)
40.990: ERROR/AndroidRuntime(679): at android.view.ViewRoot.performTraversals(ViewRoot.java:1030)
40.990: ERROR/AndroidRuntime(679): at android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
40.990: ERROR/AndroidRuntime(679): at android.os.Handler.dispatchMessage(Handler.java:99)
40.990: ERROR/AndroidRuntime(679): at android.os.Looper.loop(Looper.java:123)
40.990: ERROR/AndroidRuntime(679): at android.app.ActivityThread.main(ActivityThread.java:3948)
40.990: ERROR/AndroidRuntime(679): at java.lang.reflect.Method.invokeNative(Native Method)
40.990: ERROR/AndroidRuntime(679): at java.lang.reflect.Method.invoke(Method.java:521)
40.990: ERROR/AndroidRuntime(679): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
40.990: ERROR/AndroidRuntime(679): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
40.990: ERROR/AndroidRuntime(679): at dalvik.system.NativeStart.main(Native Method)
41.000: INFO/Process(576): Sending signal. PID: 679 SIG: 3
41.000: INFO/dalvikvm(679): threadid=7: reacting to signal 3
41.030: ERROR/ActivityThread(576): Failed to find provider info for android.server.checkin
41.030: ERROR/Checkin(576): Error reporting crash: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/crashes
41.070: INFO/dalvikvm(679): Wrote stack trace to '/data/anr/traces.txt'
50.940: WARN/ActivityManager(576): Launch timeout has expired, giving up wake lock!
50.980: WARN/ActivityManager(576): Activity idle timeout for HistoryRecord{4366ac40 {com.android.launcher/com.android.launcher.Launcher}}
sounds to me more like something wrong with your emulator. Why dont you delete your emulator and create a new one and try again with a fresh project.
Hope that will help you. BTW why are you using emulator on 1.5?? Start to build applications for min 2.1.
Good luck.

Categories

Resources