Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

qemu-system-i386 quit unexpectedly when starting AVD (Android Virtual Device) on a Mac (illegal instruction 4)

I installed Android Studio on my Mac (Macbook Pro, August 2017, OSX 10.12.4), then started up, created a hello world project and created an AVD (Android Virtual Device, Nexus 5) to run my project on it.

The error shows when I try to run my project on the simulator (pressing the play button) or when I try to start up the emulator itself.

Here's a screenshot of the error: AVD error

Here's the beginning of the stack trace:

Process:               qemu-system-i386 [5779]
Path:                  /Users/USER/Library/Android/*/qemu-system-i386
Identifier:            qemu-system-i386
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        studio [4683]
Responsible:           qemu-system-i386 [5779]
User ID:               502

Date/Time:             2017-08-22 13:20:02.612 +0100
OS Version:            Mac OS X 10.12.4 (16E195)
Report Version:        12
Anonymous UUID:        A816A6BA-C97F-6831-E59F-1431A005F23C

Sleep/Wake UUID:       48F2FC89-DF11-4A13-ACEB-E81AF10174B0

Time Awake Since Boot: 15000 seconds
Time Since Wake:       7900 seconds

System Integrity Protection: enabled

Crashed Thread:        4

Exception Type:        EXC_CRASH (SIGILL)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   qemu-system-i386 [5779]

And here is the full stack trace: https://pastebin.com/raw/Btt2igX4

like image 657
Emilio Rodriguez Avatar asked Aug 23 '17 09:08

Emilio Rodriguez


2 Answers

Disabling / Uninstalling CylancePROTECT solved this issue for me.

sudo launchctl remove com.cylance.agent_service

The same software was also preventing me from compiling go programs.

Some memory protection is at the source of the problem. Here is the relevant article for some fine tuning of CylancePROTECT that could resolve the issue with uninstalling completely the software: runtime: bsdthread_register fatal error (CylancePROTECT)

like image 190
Olivier Avatar answered Sep 18 '22 12:09

Olivier


I solved it by go to ADV manager -> Select Virtual Device -> edit icon -> Select Graphics to Software GELS-2.0

I solved it by:

like image 39
Shumon Pal Avatar answered Sep 21 '22 12:09

Shumon Pal