Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
786 views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...