Android Studio crashes intermittently with com.intellij.util.DeprecatedMethodException - android

I have recently installed Android Studio on my new setup. However, it keeps on crashing unexpectedly at random times, without warning.
The same exception keeps happening during the crash:
2022-01-13 15:23:06,066 [ 85372] WARN - util.DeprecatedMethodException - This method in 'com.intellij.codeInsight.daemon.LineMarkerInfo' is deprecated and going to be removed soon. Please use LineMarkerInfo(T, TextRange, Icon, Function, GutterIconNavigationHandler, Alignment, Supplier) instead
com.intellij.util.DeprecatedMethodException: This method in 'com.intellij.codeInsight.daemon.LineMarkerInfo' is deprecated and going to be removed soon. Please use LineMarkerInfo(T, TextRange, Icon, Function, GutterIconNavigationHandler, Alignment, Supplier) instead
at com.intellij.util.DeprecatedMethodException.report(DeprecatedMethodException.java:28)
at com.intellij.codeInsight.daemon.LineMarkerInfo.<init>(LineMarkerInfo.java:161)
at org.jetbrains.kotlin.idea.highlighter.KotlinSuspendCallLineMarkerProvider$SuspendCallMarkerInfo.<init>(KotlinSuspendCallLineMarkerProvider.kt:32)
at org.jetbrains.kotlin.idea.highlighter.KotlinSuspendCallLineMarkerProvider.collectSlowLineMarkers(KotlinSuspendCallLineMarkerProvider.kt:77)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:182)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:83)
at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:81)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:78)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1146)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:172)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:189)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:366)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
My machine is running on Ubuntu 21.10, and the Android Studio version is 2020.3.1 Patch 2, installed from snap(although the same problem happened when installed from the official website).
Thank you!

Related

Xamarin Android error on DeviceInfo.Model

I have a Xamarin for Android app that has been working until today. I needed to make a change but before I did, I ran a test to ensure no VS or Nuget package updates caused an issue. I have Xamarin.Essentials in my app and this line worked before, not sure what is happening now.
if(DeviceInfo.Model == "TC72"){scannerIndex = 1;}
Exception Unhandled:
Xamarin.Essentials.NotImplementedInReferenceAssemblyException: 'This
functionality is not implemented in the portable version of this
assembly. You should reference the NuGet package from your main
application project in order to reference the platform-specific
implementation.'
Any insight would be helpful. TIA
I changed the DeviceInfo.Model to Build.Model and get the same info I was expecting. That fixed my issue. If anyone has a different suggestion, happy to entertain them.
Added 8/11/21 3:25pm CT
I also found that changing my Compile Target to 10.0 fixed the Xamarin.Essentials issues. So far the application is working on 8.1 on the device (Zebra MC3300).

E/com.facebook.appevents.RestrictiveDataManager: updateRulesFromSetting failed

When I launch my app from Android Studio, with Facebook SDK installed on my device, Xiaomi Mi A2, it triggers the same error trhee times. It does not stop the app, but I don't know if I am missing something or simply, it is not important, but in the end, it is an error and I want to clarify it.
I am using Android Studio 3.4.1, Android 9 on the Xiaomi A2 and the new clause in build.gradle file is implementation 'com.facebook.android:facebook-android-sdk:5.1.0'. Error has not appeared before upgrading Facebook SDK.
This is what appears in Logcat:
2019-06-24 18:24:31.202 25105-25136/com.myapp
E/com.facebook.appevents.RestrictiveDataManager:
updateRulesFromSetting failed
org.json.JSONException: End of input at character 0 of
at org.json.JSONTokener.syntaxError(JSONTokener.java:449)
at org.json.JSONTokener.nextValue(JSONTokener.java:97)
at org.json.JSONArray.(JSONArray.java:92)
at org.json.JSONArray.(JSONArray.java:108)
at com.facebook.appevents.RestrictiveDataManager.updateFromSetting(RestrictiveDataManager.java:32)
at com.facebook.internal.FetchedAppSettingsManager.parseAppSettingsFromJSON(FetchedAppSettingsManager.java:323)
at com.facebook.internal.FetchedAppSettingsManager.access$000(FetchedAppSettingsManager.java:63)
at com.facebook.internal.FetchedAppSettingsManager$1.run(FetchedAppSettingsManager.java:181)
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:764)
EDIT
The issue has been fixed in version 5.1.1.
Revert to 5.0.3 to get rid of this.
5.1.0 is actually crashing in production at this method (there's a bug report here). GitHub commits of this file show its rather flawed, the method is called from multiple threads concluding to a concurrency crash because it's using a static ArrayList.
Lately the core FB SDK is kinda bloated with useless stuff and low-quality code. The codeless stuff "feature" that simply can't even be turned off is especially a horror to look at. If you don't strictly need the FB SDK in your app, I'd avoid it until they get their shit figured out.

How to Solve "The "XamlCTask" task failed unexpectedly" error without updating xamarin.forms version

I am stuck in one of my issue in xamarin.forms. In my xamarin.form project xamarin.form package version is 2.3.2.123 in PCL,Android and IOS.
Since Last few days when I am trying to build my iphone project, its gives me an error
The "XamlCTask" task failed unexpectedly
So I have updated xamarin.form version in PCL, Droid and IOS.
but due to this I am facing issue in Android in one of my page
{Java.Lang.NullPointerException: Attempt to invoke virtual method
'boolean android.graphics.Bitmap.isMutable()' on a null object
reference at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
[0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0 …}
I am using
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
Instead
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
because I want to scroll page even when keyboard is open. If keyboard is open then page can't be scroll in android this is the bug of "App Compact".
Now I don't understand what should I do?
Is there any other way to solve "The "XamlCTask" task failed unexpectedly" error without updating xamarin.forms version.
because all the issues arise due to xamarin.forms updation.
In one of other project I am using same xamarin.forms version but it works perfectly. What is actual reason of "XamlC task failed" error?
Although the cause seems different, it looks like it's a known bug. Maybe you could verify that upgrading to the version mentioned in the bug (2.3.5-pre) works for you, and then either disable XAML compilation for the time being, or work with the Xamarin pre-release packages.

Fatal signal 11 (SIGSEGV), code 2, fault addr 0x37acd7ac in tid 14358

I just run into s problem.When I changed my gradle version to 2.1.0(old version is 1.5.0),my code went wrong.And it's wierd there is no logcat,so I just don't know how to find the problem and the wrong part code. I have tryed to add android:allowClearUserData="true" in my AndroidManifest .it turns out not working. when I change my gradle version to the old one,it goes well.I am a new coder,and I use Retrofit to do the network job.plz just help me.Oh and I open the OpenGL stack in the logcat,It will call glGetError() then it goes crush.
From your description, I have no idea. If only upgrading AS, it should be not crashed, but for possible updated SDK or Build tool Env. If you back to 1.5, even no crash when using same platform sdk, support library sdk?
After upgrading 2.1.0, When was crash happened? launching app, or opening some Activity? If later, you should limit your code to some extension, then searching from Google.
From crash info, it should be related with JNI. if you use JNI,your app has a library path in the app installed directory to list all support ABI .so. You could found the differ btw woking machine and abnormal one. From this stackOverflow, you can try too.

Integrate GeckoView in Android

I'm facing problem in file upload in webview in Kitkat(4.4).
As per https://code.google.com/p/android/issues/detail?id=62220 it can't be done in 4.4 due to missing method in new version of webview.
Hence searched and found GeckoView(https://wiki.mozilla.org/Mobile/GeckoView) as alternative for webview.
I followed all steps specified at https://wiki.mozilla.org/Mobile/GeckoView, still project is not running in emulator as well as android device.
I tried downloading and importing sample project Geckobrowser in https://wiki.mozilla.org/Mobile/GeckoView, but it gives compile time error for getCurrentBrowser() method.
I'm using Windows OS. Can anyone please guide me through, not able to know what i'm missing. I'll really great-full for any lead in correct direction.
You must check cpu abi version, and change geckoview_library and geckoview_asset to match the abi.
http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/
From the link, you can download several kinds of geckoview library.
This is a sample.
[DIR] latest-mozilla-central-android-armv6/ 12-Dec-2013 11:50 -
[DIR] latest-mozilla-central-android-r7/ 12-Dec-2013 11:56 -
[DIR] latest-mozilla-central-android-x86/ 12-Dec-2013 11:56 -
[DIR] latest-mozilla-central-android/ 12-Dec-2013 11:56 -
In each folder, download geckoview_library and geckoview_asset.

Categories

Resources