Getting too many crashes in Xiaomi devices - android

I have recently find that my app is getting crash on Xiaomi/Redmi device with following stack trace
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.destroyHardwareResources()' on a null object reference
at android.view.ViewGroup.destroyHardwareResources(ViewGroup.java:5263)
at android.view.ViewGroup.destroyHardwareResources(ViewGroup.java:5263)
at android.view.ViewGroup.destroyHardwareResources(ViewGroup.java:5263)
at android.view.ViewGroup.destroyHardwareResources(ViewGroup.java:5263)
at android.view.ViewGroup.destroyHardwareResources(ViewGroup.java:5263)
at android.view.ViewGroup.destroyHardwareResources(ViewGroup.java:5263)
at android.view.ThreadedRenderer.destroyResources(ThreadedRenderer.java:446)
at android.view.ThreadedRenderer.destroyHardwareResources(ThreadedRenderer.java:441)
at android.view.ViewRootImpl.destroyHardwareResources(ViewRootImpl.java:1315)
at android.view.WindowManagerGlobal.trimMemory(WindowManagerGlobal.java:598)
at android.app.ActivityThread.handleTrimMemory(ActivityThread.java:6499)
at android.app.ActivityThread.access$1500(ActivityThread.java:263)
at android.app.ActivityThread$ApplicationThread.lambda$scheduleTrimMemory$0(ActivityThread.java:1699)
at android.app.-$$Lambda$ActivityThread$ApplicationThread$tUGFX7CUhzB4Pg5wFd5yeqOnu38.accept(-.java:8)
at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:278)
at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:201)
at com.android.internal.util.function.pooled.OmniFunction.run(OmniFunction.java:97)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1039)
at android.view.Choreographer.doCallbacks(Choreographer.java:863)
at android.view.Choreographer.doFrame(Choreographer.java:796)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1024)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8069)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)`
I am not able to reproduce it
Android os : 11
Devcies : Redmi Note 9,Redmi 9, Redmi 10 2022 and some more redmi devices
I have googled but did not find any solution or hint regarding this issue, is there anyone facing some issue ?

Related

Crashes happend in camera plugin used in flutter modules,

firebase crash logs one.
Fatal Exception: java.lang.IllegalStateException: CameraDevice was already closed
at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2236)
at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSessionInternal(CameraDeviceImpl.java:658)
at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession(CameraDeviceImpl.java:644)
at io.flutter.plugins.camera.Camera$DefaultCameraDeviceWrapper.createCaptureSession(Camera.java:175)
at io.flutter.plugins.camera.Camera.createCaptureSessionWithSessionConfig(Camera.java:479)
at io.flutter.plugins.camera.Camera.createCaptureSession(Camera.java:465)
at io.flutter.plugins.camera.Camera.createCaptureSession(Camera.java:387)
at io.flutter.plugins.camera.Camera.startPreview(Camera.java:1074)
at io.flutter.plugins.camera.Camera$1.onOpened(Camera.java:322)
at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:151)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.os.HandlerThread.run(HandlerThread.java:67)
firebase crash logs two.
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.hardware.camera2.CameraCaptureSession.close()' on a null object reference
at io.flutter.plugins.camera.Camera.closeCaptureSession(Camera.java:1192)
at io.flutter.plugins.camera.Camera.access$500(Camera.java:100)
at io.flutter.plugins.camera.Camera$1.onClosed(Camera.java:342)
at android.hardware.camera2.impl.CameraDeviceImpl$5.run(CameraDeviceImpl.java:255)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:240)
at android.os.Looper.loop(Looper.java:351)
at android.os.HandlerThread.run(HandlerThread.java:67)
two crashes caught in my firebase account.
by investigations, It happened at the camera plugin used in flutter modules,
It's happening on android devices only, versions are 9 to 12 versions.
Used plugin details:
camera: ^0.10.0
https://pub.dev/packages/camera
any one can help with this, ?

Problem starting DJI simulation [dji-sdk]

I'm trying to implement the sample code of dji developer for android but i can't start the app, i add my com.dji.sdk.API_KEY and when i launch the app i get this errors:
2020-04-03 19:44:10.734 5567-5607/com.dji.sdk.sample E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.dji.sdk.sample, PID: 5567
java.lang.UnsatisfiedLinkError: No implementation found for java.lang.String dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString() (tried Java_dji_midware_natives_SDKRelativeJNI_native_1getUsbAccessoryAttachedString and Java_dji_midware_natives_SDKRelativeJNI_native_1getUsbAccessoryAttachedString__)
at dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString(Native Method)
at dji.sdk.sdkmanager.DJISDKManager.<clinit>(Unknown Source:32)
at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source:0)
at com.dji.sdk.sample.internal.controller.MainActivity$5.run(:241)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
If you need code of any thing i can post it too. Thanks.
EDIT:
I can do it with an hardware Samsung, not in virtual device.
I'm using an emulator, but the MSDK doesn't support it.
It only works with a real device.

Attempt to read from null array com.google.maps.api.android.lib6.gmm6.vector.gl.drawable.g.a only on Android 5.1

I have a strange bug reported on Crashlytics:
Fatal Exception: java.lang.NullPointerException: Attempt to read from null array
at java.util.ArrayList.get(ArrayList.java:310)
at com.google.maps.api.android.lib6.gmm6.vector.gl.drawable.g.a(g.java:56)
at com.google.maps.api.android.lib6.gmm6.vector.gl.drawable.ao.a(ao.java:91)
at com.google.maps.api.android.lib6.gmm6.store.fetch.i.a(i.java:99)
at com.google.maps.api.android.lib6.gmm6.store.fetch.f.a(f.java:3)
at com.google.maps.api.android.lib6.gmm6.store.j.a(j.java:19)
at com.google.maps.api.android.lib6.gmm6.store.k.a(k.java:96)
at com.google.maps.api.android.lib6.gmm6.store.k.d(k.java:178)
at com.google.maps.api.android.lib6.gmm6.store.k.a(k.java:31)
at com.google.maps.api.android.lib6.gmm6.store.f.handleMessage(f.java:100)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at com.google.maps.api.android.lib6.gmm6.store.k.run(k.java:126)
at com.google.maps.api.android.lib6.gmm6.store.ab.run(ab.java:12)
It happens only on some devices with Android 5 (Lenovo, Gigabyte, Acer...)
Do you have an idea how to solve this?

App crashes on emulator while launching but not on device

While launching the application on emulator the following exception is occurred. But running on device it is working fine. Please help to get rid of the issue.
have been facing the issue around five days. cannot get any proper solution.
2018-10-13 07:45:15.423 1742-1756/system_process E/ActivityManager: Activity Manager Crash. UID:1000 PID:1742 TRANS:5
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)' on a null object reference
at android.app.LoadedApk.createAppFactory(LoadedApk.java:224)
at android.app.LoadedApk.<init>(LoadedApk.java:152)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:2043)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1998)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1970)
at android.app.ContextImpl.createPackageContextAsUser(ContextImpl.java:2054)
at com.android.server.AttributeCache.get(AttributeCache.java:135)
at com.android.server.am.ActivityRecord.<init>(ActivityRecord.java:903)
at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:804)
at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:528)
at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1057)
at com.android.server.am.ActivityStarter.execute(ActivityStarter.java:473)
at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4841)
at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:4817)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:146)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3114)
at android.os.Binder.execTransact(Binder.java:726)
2018-10-13 07:45:15.424 9564-9564/com.google.android.apps.nexuslauncher D/AndroidRuntime: Shutting down VM
--------- beginning of crash
2018-10-13 07:45:15.425 9564-9564/com.google.android.apps.nexuslauncher E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.android.apps.nexuslauncher, PID: 9564
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)' on a null object reference
at android.os.Parcel.createException(Parcel.java:1948)
at android.os.Parcel.readException(Parcel.java:1865)
at android.app.IActivityManager$Stub$Proxy.startActivity(IActivityManager.java:4541)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1660)
at android.app.Activity.startActivityForResult(Activity.java:4574)
at com.android.launcher3.Launcher.startActivityForResult(SourceFile:1394)
at android.app.Activity.startActivity(Activity.java:4889)
at com.android.launcher3.Launcher.startActivitySafely(SourceFile:2000)
at com.android.launcher3.Launcher.startAppShortcutOrInfoActivity(SourceFile:1850)
at com.android.launcher3.Launcher.onClick(SourceFile:1703)
at android.view.View.performClick(View.java:6579)
at android.view.View.performClickInternal(View.java:6556)
at android.view.View.access$3100(View.java:777)
at android.view.View$PerformClick.run(View.java:25660)
at android.os.Handler.handleCallback(Handler.java:819)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
Caused by: android.os.RemoteException: Remote stack trace:
at android.app.LoadedApk.createAppFactory(LoadedApk.java:224)
at android.app.LoadedApk.<init>(LoadedApk.java:152)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:2043)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1998)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1970)

NPE in MediaSessionCompat

I encounter this crash after upgrading the support library to 25.3.1 :
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference
at android.support.v4.media.session.MediaSessionCompat$Callback$StubApi21.onCommand(Unknown Source:941)
at android.support.v4.media.session.MediaSessionCompatApi21$CallbackProxy.onCommand(Unknown Source:164)
at android.media.session.MediaSession$CallbackMessageHandler.handleMessage(MediaSession.java:1363)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)
This crash only happens to API > 21. It seems that mSessionImpl in MediaSessionCompat.Callback class is null, but I can't find a way where this situation can happen.
Has anyone already experienced this issue ?
The error seems fixed in the 25.4.0

Categories

Resources