Xcode 8.1 SourceKitService loads CPU completely - sourcekitservice

SourceKitService eats CPU resource. Sometimes it loads the processor completely, when I work in Xcode 8.1 (Version 8.1 (8B62)). MacBook (macOS Sierra 10.12.1 (16B2555)) slows down and gets very hot.
How to fix it?
If I remove SourseKitservise how it will affect the work of Xcode?

I have decided this problem by reinstalling Xcode 8.1:
Open Application folder in Finder.
Find Xcode file and Move to Trash, then empty the Trash
Go to App Store Find "Xcode" in Search
Install Xcode
After installation, no need to enter Apple IDs in Preference>Account (but You should check whether all okay)
After reinstalling Xcode 8.1 SourseKitservise loads the processor on 15-20% (see screenshot)

Just force quit SourceKitService, it will restart again, without any issues.

Related

Why does latest Android Studio emulator crash or get stuck

Since I upgraded my Android Studio installation to Bumblebee, the emulator has become unusable. It either crashes during startup or gets itself stuck so that the UI is unresponsive and the debugger either cannot install or cannot launch an app. The way in which it fails varies from time to time for no reason that I can understand. although different virtual devices seem to behave differently. I tried deleting my old virtual devices and creating new ones, but that didn't help.
I can't debug my code on a real phone because of a different problem, see my recent answer to Source code does not match the bytecode for Android's View.java.
When it crashes I send a crash report to Google, but they don't seem to be fixing it. The problems started with the first official Bumblebee release 2021.1.1, which seemed to have a complete new version of the emulator, and I'm now on the latest stable version 2021.1.1 Patch 2.
My environment is a Dell Precision M4800 with 16GB of RAM and an 8-core Intel processor, using an external 4K monitor and an external full-size keyboard, running Linux openSUSE Leap 15.3 with all recommended patches installed.
Does anyone have any suggestion short of throwing away my entire Android Studio installation and reverting back to Arctic Fox? Has anyone else seen similar problems?
Tintin's answer didn't work for me: Device Frame wasn't enabled anyway because I had noticed that it had caused problems before.
However the following sequence rather surprisingly, at least to me, did fix the problem.
First make sure that the toolbar is visible at the top of the emulator window: if it isn't, click on the gear settings icon at the top right of the emulator window and enable Show Toolbar.
Start up an emulated virtual device, and before it crashes click on the three dots at the right hand end of the toolbar: this will bring up the extended controls window.
Choose Settings from the list at the left of the extended controls list.
Set the OpenGL ES renderer to Desktop native OpenGL, and the OpenGL ES API to Compatibility (OpenGL ES 1.1/2.0).
Close the extended controls window and then close the Android Emulator window.
Check if there are any zombie emulator or qemu processes still running. If there are, kill them: you'll need kill -9 on Linux.
Try to cold boot an emulated virtual device: it will probably crash before it even gets started up properly.
Close the Android Emulator window and repeat step 6
Try to cold boot an emulated virtual device again, but click on the three dots quickly before it crashes.
When the extended controls list comes up, choose Settings from the list at the left.
Set the OpenGL ES renderer back to SwiftShader, and the OpenGL ES API back to Renderer maximum (up to OpenGL ES 3.1).
Repeat steps 5 and 6.
Now try to boot up an emulated virtual device again. It should work: at least it does for me.
If it doesn't work on your configuration, try all possible combinations of the OpenGL ES settings: you may find one that works.
Logically, changing the OpenGL ES settings and then changing them back again shouldn't do anything, but it does. My guess is that perhaps some needed bit of initialisation for the OpenGL isn't being done by the installer, but it gets done when you change the configuration.
I also faced this problem in both updates in 2021.1.1 it was not working at all. Updated to patch 2 again faced problems turned off Enabled Device Frame it is working OK now

Can't Deploy React Native to iPhone from Xcode 13 Beta 2 running on Virtual Machine running Big Sur 11.4

I have a Mac running Catalina with Xcode 12. This month, my iPhone upgraded to iOS 14.6, which requires Xcode 13. Xcode 13 requires Big Sur. Unfortunately, I don't have the money right now to upgrade my Mac to one with the hardware the Big Sur requires.
I installed VMWare Fusion 12 on this Mac and created a Virtual Machine running MacOS Big Sur 11.4. Then I installed Xcode 13 Beta 2, installed its dependencies, added the provisioning profile required to deploy, and selected my iPhone in Xcode as the target. When I build and attempt to deploy to the device, there are no errors, though it hangs/stalls right near the end of the process, around the time that Xcode says: "Preparing Editor Functionality". MetroBundler starts correctly and I see no issues in Terminal, Console, or Xcode. It just stops compiling/deploying.
I'm not super savvy when it comes to Xcode or the deployment process. I was hoping someone might be able to give me some tips as to how to figure out what's preventing the app from deploying to the device. Does Xcode have logs somewhere (other than Device Logs) that might help inform what's hanging?
Thank you for your time and I'm happy to provide screenshots or further information upon your suggestions.

Multiple Android Studio lockups with Apple M1 chip

I have the MacBook Pro with the new M1 chip with 8GB ram running Big Sur V11.1 and Android Studio 4.1.2. Over the course of a couple hours of work in Android Studio I can get 4 or so spinning beachballs of death where I need to do a force quit and occasionally Android Studio blinks out of existence all together.
I am not using the emulator. The lockups always seem to occur while I am in the middle of editing code.
I have run the Mac in safe mode and that might have slowed down the frequency of lockups, but not eliminate them. (I am not keeping count.)
I did do a data migration from my old Mac (a 10yr old Intel machine that never had this problem, just got to be too slow). Don't know if that has anything to do with the problem.
The only good aspect is that the machine is fast so I have been submitting a crash report every time!
Just wondering if anyone has any words of wisdom to fix this.
Even with increased memory I faced similar issue. However managed to solve it by changing JDK used by Android Studio to M1 compatible JDK. I used Azul JDK.
Make sure to set both JAVA_HOME & STUDIO_JDK variables. Also change the project sdk to M1 compatible JDK.
I use Azul 15.0.2+7 ARM 64-bit macOS version.
Update 23 May 2021 ******
I've switched to latest intelliJ, which has M1 support and installed all android plugins. So far my experience has been exceptional. Debugging can get slow at times, but rest is just fine.
I had the same problem and after a little search i could fix it very easily...
The problem of crashing comes because is not allocated enough memory to the “JVM”.
Go to: Finder->Applications.
Right click on Android Studio. Select "Show package contents"
Go to : Contents->bin.
Right click on "studio.vmoptions". Select "open with"-> "textEdit".
Copy the Text somewhere for backup, just in case you mess it up.
Just change the numbers as shown on the 3 line below. Leave everything else as it is.
-Xmx6154m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=200m
That should fix the crashes.
I was facing the same issue, the way I solved this is I just deleted Android Studio and installed IntelliJ IDEA ultimate.
Jetbrains have an IntelliJ IDEA version special for M1 processor and it works like a charm on my MacBook Air (8gb RAM). The only downside is you can only use IntelliJ IDEA ultimate for free if you're a student, if you're not you'll only get one month of free trial.

Trouble installing HAXM in Android Studio (Windows 10)

Brand new to app development and am having a bit of trouble activating an Android Virtual Device (AVD) for Android Studio (Windows 10). I am trying to install HAXM but receive the attached message.
Upon going into my /installed programs/ directory to uninstall Microsoft Hyper-V, the program is not listed. Would the Hyper-V program be listed under another name, or rather, could anyone please provide feedback as to resolving this message? Any feedback would be greatly appreciated!
For AMD system, you can use Windows Hypervisor Platform (WHPX) under Windows 10 since Version 1803:
To enable Windows Hypervisor Platform (WHPX) do the following steps:
From the Windows desktop, right-click the Windows icon and select Apps and features.
Under Related settings, click Programs and Features.
Click Turns Windows Features on or off.
Select Windows Hypervisor Platform
click ok and reboot.
Now create a new Android Virtual Device (AVD).
Yes the same was here too,
Ok there are 2 ways of solving this ,
First you can go to BIOS and disable the Hyper V and enable the VT x for intel. If you had not the VTx or with disabling Hyper v nothing has solved then come to Second solution.
The second is there is not a solution available for you and your computer just like me. Your cpu and computer cant install HAXM which mean you cant install and run emulator , but hang on, google has added new property to emulators to run without HAXM and you need to install those package of SDK api which has Amd virtualization or non HAXM, also even this one has not helped me, so if you were like me then you can use physical device for testing or installing linux instead of windows and use Hyper v to run emulator in android studio instead of HAXM, and i prefer Lubuntu cause of speed it will gives you if you wantes to install.

Android Studio freezes entire computer upon pressing 'Play'? (Ubuntu)

Pretty self-explanatory. Whenever I try to press 'play', as in the green play button to try and test run the app, my ENTIRE computer freezes. (Otherwise Android Studio seems to work fine, if a bit laggy.) I can't even move the cursor--even if I wait for more than fifteen minutes, it's frozen. The only option is to shut down the entire computer using the button on the outside of the computer. In my research, I couldn't find anything else with the same problem, let alone a solution.
I've tried installing an earlier version of android studio, but it did not help. Same problem. I'm thinking I might have to do a fresh install of Ubuntu and see if that works, which is a pain because I have GBs and GBs of data on this one. Help?
Specs: Running an Acer Aspire with 8GB of RAM, 64bit, Intel® Celeron(R) CPU N2840 # 2.16GHz × 2. Can't check the RAM at time of the error, because the entire computer gets frozen.

Resources