Score:0

Ubuntu 20.04 crashes randomly

ng flag

I have installed Ubuntu 20.04 on my laptop and have been using it for 3 weeks. In the beginning it crashed twice at random times, but I didn't face the problem till today, when It crashed 3 times while running Android Studio.

user535733 avatar
cn flag
Are there .crash files in your /var/crash directory?
Syed Ali Zain Shah avatar
us flag
Can you show us the error that it gives while crashing? or any help because it would be hard to guess because I also have been using android studio and it never happened. Also, share the system specs, maybe it crashed due to RAM. It may happen due to the load of android studio and emulator.
Raffles avatar
in flag
In addition to the above, we need to know a bit more about your system, are you dual-booting? How many drives do you have and how are they partitioned? Android Studio is quite a large application. Please edit the information into your question rather than posting a comment.
jpbrain avatar
ca flag
Hello @Dante, I faced the same problem. I think solution is simple. how much RAM do you have? Also, can you post free -h output?
karel avatar
sa flag
Does this answer your question? [Do I need to upgrade RAM from 4GB to 8GB for Android development?](https://askubuntu.com/questions/1014495/do-i-need-to-upgrade-ram-from-4gb-to-8gb-for-android-development)
Score:1
ca flag

Try this..

Add a dedicated swap file or partition of 2x ram.

In my case was solved by adding 16G of swap but later I decided to bought more ram.

if you already have a /swapfile it is about 2G by default. to disable it you need to execute..

sudo swapoff /swapfile

then do...

sudo dd if=/dev/zero of=/swapfile bs=1MiB count=$((16*1024))
sudo mkswap /swapfile
sudo swapon /swapfile

then add a line to /etc/fstab like this

/swapfile swap swap defaults 0 0

now you should be able to run Android Studio without problems.

try it. regards.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.