App crash while frequent requesting mediafile with exoplayer instances - java

I am getting this error why frequently try to tap exoplayer instances.
normally instances releases and nulls itself on everytime.
But after some tries app freezes and crashes. I am trying to find where is the problem related
2019-04-04 11:40:36.002 540-1196/? E/BufferQueueProducer: [com..app.musicplayer/com..app.musicplayer.dashboard.DashboardMusicActivity#0] dequeueBuffer: attempting to exceed the max dequeued buffer count (2)
2019-04-04 11:40:36.110 13761-15052/com..app.musicplayer E/NativeCrypto: AppData::create pipe(2) failed: Too many open files
2019-04-04 11:40:36.121 13761-15052/com..app.musicplayer E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
Process: com..app.musicplayer, PID: 13761
java.lang.RuntimeException: javax.net.ssl.SSLException: Unable to create application data
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.newSsl(ConscryptFileDescriptorSocket.java:161)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.<init>(ConscryptFileDescriptorSocket.java:152)
at com.android.org.conscrypt.OpenSSLSocketFactoryImpl.createSocket(OpenSSLSocketFactoryImpl.java:149)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:288

Related

android api 30 Fatal signal 6 (SIGABRT)

My app worked fine at api29. Now getting this native error. No clue otherwise.
D/TransportRuntime.SQLiteEventStore: Storing event with priority=DEFAULT, name=FIREPERF for destination cct
V/FA: Connection attempt already in progress
V/FA: Connection attempt already in progress
D/TransportRuntime.JobInfoScheduler: Scheduling upload for context TransportContext(cct, DEFAULT, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy1wYS5nb29nbGVhcGlzLmNvbS92MS9maXJlbG9nL2xlZ2FjeS9iYXRjaGxvZ1xBSXphU3lDY2traUg4aTJaQVJ3T3MxTEV6RktsZDE1YU9HOG96S28=) with jobId=-546033166 in 30000ms(Backend next call timestamp 1639520060629). Attempt 1
D/mainact: buildDisplayDataBase:
A/libc: fdsan: attempted to close file descriptor 75, expected to be unowned, actually owned by FILE* 0xf108246c
Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 20661 (eymoreau.fitlog), pid 20661 (eymoreau.fitlog)
Disconnected from the target VM, address: 'localhost:60917', transport: 'socket'
If you are displaying images try eliminating them to see of it fixes the error.
It did for me and I ended up changing my image loading from:
mainMenu_viewHolder.getImageView().setImageResource(R.drawable.gear);
to...
Bitmap checkImg = BitmapFactory.decodeResource(fragment.getResources(), R.drawable.check);
mainMenu_viewHolder.getImageView().setImageBitmap(checkImg);
The issue is buried very deep so if this doesn't work for you don't try stepping through your code or researching the native error. It will be wasted time. Just disable your fragments entire view structure and add back in piece by piece.

UnsatisfiedLinkError when trying to create new instance of TessBaseAPI

This is a weird error because it doesn't happen every time - mostly rare - so it's difficult to debug.
This is the line where the error occurs:
TessBaseAPI tessBaseApi = new TessBaseAPI();
I use this library to connect Tesseract with Android.
The error log:
E/linker: package com.app.myapp: library "/system/lib64/libjpeg.so"
("/system/lib64/libjpeg.so") needed or dlopened by
"/system/lib64/libnativeloader.so" is not accessible for the
namespace: [name="classloader-namespace", ld_library_paths="",
default_library_paths="/data/app/com.app.myapp-4EcKvX8ZmvEUrqVJAF20Dg==/lib/arm64:/data/app/com.app.myapp-4EcKvX8ZmvEUrqVJAF20Dg==/base.apk!/lib/arm64-v8a",
permitted_paths="/data:/mnt/expand:/mnt/asec:/data/data/com.app.myapp"]
D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION:
main
Process: com.app.myapp, PID: 6393
java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/lib64/libjpeg.so" needed or dlopened by
"/system/lib64/libnativeloader.so" is not accessible for the namespace
"classloader-namespace"
at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
at java.lang.System.loadLibrary(System.java:1657)
at com.googlecode.tesseract.android.TessBaseAPI.(TessBaseAPI.java:52)
at com.app.myapp.utils.UtilsOCR.getTessBaseAPI(UtilsOCR.java:257)
at com.app.myapp.ocr.OCRTextEvaluator.init(OCRTextEvaluator.java:381)
at com.app.myapp.ocr.OCRTextEvaluator.(OCRTextEvaluator.java:48)
at com.app.myapp.helper.NotebookWriter.init(NotebookWriter.java:530)
at com.app.myapp.helper.NotebookWriter.(NotebookWriter.java:89)
Inside TessBaseAPI class the error occurs in this line:
System.loadLibrary("jpeg");
Any kind of help would be appreciated.

Nativescript angular app breaking with "java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid"

I've creating a nativescript application which uses the nativescript-barcodescanner plugin to scan and decode qr codes. This application is intended to be used to scan a lot of qr codes, but not in consecutive order. However, after a 1000 scans, the application is breaking with the following exception.
java.lang.RuntimeException: Unable to resume activity {org.nativescript.test/com.google.zxing.client.android.CaptureActivity}: java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 15623, callerPackage: org.nativescript.test
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4021)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4053)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7078)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by: java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 15623, callerPackage: org.nativescript.test
at android.os.Parcel.createException(Parcel.java:1974)
at android.os.Parcel.readException(Parcel.java:19
// Allocate time for this cycle to end before issueing a validate request. Attempting to fix Fragment issue on some
// mobile devices34)
at android.os.Parcel.readException(Parcel.java:1884)
at android.app.IActivityManager$Stub$Proxy.registerReceiver(IActivityManager.java:3684)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1567)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1528)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1516)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:636)
at com.google.zxing.client.android.InactivityTimer.onResume(InactivityTimer.java:69)
at com.google.zxing.client.android.CaptureActivity.onResume(CaptureActivity.java:222)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1416)
at android.app.Activity.performResume(Activity.java:7609)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4013)
... 11 more
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActivityManagerService.registerReceiver(ActivityManagerService.java:25447)
at android.app.IActivityManager$Stub.onTransact$registerReceiver$(IActivityManager.java:10896)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:126)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:4162)
at android.os.Binder.execTransact(Binder.java:739)
After attempting to debug the issue, from what i've found, it seems that when calling the BarcodeScanner.scan function offered by the nativescript-barcodescanner plugin, an Activity is started for result as per this code, which in turn, a receiver is registered by the google zxing library (used by this plugin). What seems to be the issue is that upon a successful scan, when the Activity returns the result, the google zxing library is not doing the necessary clean ups, resulting with dangling receivers registered. Note that when the scanner is closed by pressing the back button, the clean ups are carried out as expected.
Any help about going around this issue would be appreciated.
Edit: Added link to github repo for reproduction
https://github.com/jeanpaulattard/nativescript-barcodescanner-demo

DeadObjectException when I try to check external storage status

I'm facing a random crash when I try to check the status of the external storage (mounted/unmounted)
This is the condition I use to check and get the external directory if mounted
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) && context.getExternalCacheDir() != null) {
and this is the crash I'm getting:
Fatal Exception: java.lang.RuntimeException:
android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
at android.os.storage.StorageManager.getVolumeList(StorageManager.java:890)
at android.os.Environment$UserEnvironment.getExternalDirs(Environment.java:11)
at android.os.Environment.getExternalStorageState(Environment.java:674)
Does anyone know why this keeps happening and how to avoid it?

java.lang.OutOfMemoryError: Could not allocate JNI Env always android java

i am running AsyncTask
java.lang.OutOfMemoryError: Could not allocate JNI Env
at java.lang.Thread.nativeCreate(Native Method)
at java.lang.Thread.start(Thread.java:1063)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:921)
at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:989)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1131)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
i get this error the next time i run the app and do the same task,first time task is completed without any porblem and no crashes and when i back press and exit the app and come back and do the same task it shows this error
[ 11-06 22:20:02.741 1174: 1219 D/ ]
NULL ==
surf->write_back_color_buffer
11-06 22:20:02.741 1174-1219/com.package A/OpenGLRenderer: Encountered EGL error 12291 EGL_BAD_ALLOC during rendering
11-06 22:20:02.741 1174-1219/com.package A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 1219 (RenderThread)
never had this problem before
okay that error was due to inputstream i forgot to close in one module,so if you guys use any stream,double check it and make sure you close all stream you open :)

Categories

Resources