Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio emulator: ERROR: detected a hanging thread QEMU2 main loop

Tags:

I use Android Studio 3.0.1 on Ubuntu 16.04.

Yesterday, Android Studio popped up a message saying that there's an update available, and I always click those. It then notified me that it had successfully updated the emulator.

My AVD worked perfectly before, but after the update finished, now when I launch it, it shows a black screen in the emulator window for 15 seconds and then crashes with the following error message:

ERROR: detected a hanging thread 'QEMU2 main loop'. No response for 15000 ms Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) 

I tried the solutions suggested in all the threads describing similar emulator problems. (I verified that the emulator is still installed via the SDK Manager, I tried switching between the software and the hardware graphics settings of the AVD, I tried replacing libstdc++ with a newer version 6.0.24, I tried instead to ln -sf my /usr/lib.. libstdc++ 6.0.21 into the SDK emulator lib64/libstdc++ folder, I even downloaded Android Studio and ran a fresh installation with its own new SDK folder with freshly downloaded SDKs, I tried creating new AVDs with different architectures (arm) and different API levels (24, 27), I tried restarting ADB, and even restarting the computer. Nothing helped.

My SDK tools menu doesn't have an entry for emulator accelerator (HAXM), though my PC has an Intel CPU: I shouldn't have to change this since my AVD worked just yesterday! What broke?

What's causing the 'QEMU2 main loop' to hang, and how can I fix it?

like image 709
fasti Avatar asked Dec 23 '17 23:12

fasti


1 Answers

This is what worked for me:

I have gone to Tools->AVD Manager->Edit(The particular emulator)>Show Advanced Settings

Then in the Emulated Performance section i had the Quick Boot selected, which i changed to Cold Boot and everything started working fine.

Hope this helps.

like image 84
Muhamed Krasniqi Avatar answered Oct 05 '22 15:10

Muhamed Krasniqi