Android Studio Emulator: emulator64-crash-service quit unexpectedly

1

Configuration

I have a Macbook Pro (Retina, 13 inch, 2016) that is running macOS Big Sur 11.1

Bug Report

Android Studio always results in a crash (emulator64-crash-service quit unexpectedly.)

Before upgrading to macOS Big Sur, Android Emulator was working well. But since I upgraded the OS, Android emulators always crash.

Using both the AVD Manager in Android Studio and the Terminal, the AVD crashes with these logs:

./emulator -netdelay none -netspeed full -avd Pixel_API_28
emulator: Android emulator version 30.3.5.0 (build_id 7033400) (CL:N/A)
handleCpuAcceleration: feature check for hvf
emulator: WARNING: Running on a system with less than 6 logical cores. Setting number of virtual cores to 1
2021-01-21 11:51:29.242 qemu-system-x86_64[17602:214627] ApplePersistence=YES

The program exits without any additional logs so there is no way to identify the root cause.

And after that, a problem report is opened stating that emulator64-crash-service quit unexpectedly

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [17603]

VM Regions Near 0:
--> 
    __TEXT                      10f359000-1103a1000    [ 16.3M] r-x/rwx SM=COW  /Users/*/Library/Android/*

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libdispatch.dylib               0x00007fff201afaa6 dispatch_release + 4
1   com.apple.AppKit                0x00007fff236b66df -[NSPersistentUIManager dealloc] + 37
2   com.apple.AppKit                0x00007fff22c72880 -[NSPersistentUIManager initWithBundleID:] + 384
3   com.apple.Foundation            0x00007fff2118a04c _NSFaultInObject + 27
4   com.apple.HIToolbox             0x00007fff286c8ba9 _HIPersistentUICreatePersistentWindow + 46
5   com.apple.HIToolbox             0x00007fff286c8aba WindowStateSetMenuBarState(unsigned int, double, void const*) + 43
6   com.apple.HIToolbox             0x00007fff286b8ee5 MBWindows::CreateWindow(CGRect, unsigned int) + 373
7   com.apple.HIToolbox             0x00007fff286b8c69 MBWindows::GetWindowOnDisplay(unsigned int, unsigned char) + 183
8   com.apple.HIToolbox             0x00007fff286b8abd MenuBarInstance::ForEachWindowDo(unsigned char, bool (OpaqueWindowPtr*, unsigned int) block_pointer) + 183
9   com.apple.HIToolbox             0x00007fff286b89c3 MenuBarInstance::SetBoundsAndUpdateResolution() + 103
10  com.apple.HIToolbox             0x00007fff286b8571 MenuBarInstance::Show(MenuBarAnimationStyle, unsigned char, unsigned char, unsigned char, unsigned char) + 275
11  com.apple.HIToolbox             0x00007fff286b7fb8 MenuBarInstance::UpdateAggregateUIMode(MenuBarAnimationStyle, unsigned char, unsigned char, unsigned char) + 798
12  com.apple.HIToolbox             0x00007fff286b7bba MenuBarInstance::ForEachMenuBarDo(void (MenuBarInstance*) block_pointer) + 46
13  com.apple.HIToolbox             0x00007fff286b7b5a UpdateAllAggregateUIModes(MenuBarAnimationStyle, unsigned char) + 126
14  com.apple.HIToolbox             0x00007fff286b7ac6 SetSystemUIMode + 165
15  com.apple.AppKit                0x00007fff22fee43b -[NSApplication _setPresentationOptions:instance:flags:] + 1010
16  libqcocoa.dylib                 0x00000001133bfc14 QCocoaIntegration::QCocoaIntegration(QStringList const&) + 1796
17  libqcocoa.dylib                 0x00000001133bf23e QCocoaIntegrationPlugin::create(QString const&, QStringList const&) + 78
18  libQt5GuiAndroidEmu.5.12.1.dylib    0x0000000111c79c26 QPlatformIntegrationFactory::create(QString const&, QStringList const&, int&, char**, QString const&) + 198
19  libQt5GuiAndroidEmu.5.12.1.dylib    0x0000000111c85d69 QGuiApplicationPrivate::createPlatformIntegration() + 2473
20  libQt5GuiAndroidEmu.5.12.1.dylib    0x0000000111c8707b QGuiApplicationPrivate::createEventDispatcher() + 27
21  libQt5CoreAndroidEmu.5.12.1.dylib   0x000000011169e74f QCoreApplicationPrivate::init() + 1567
22  libQt5GuiAndroidEmu.5.12.1.dylib    0x0000000111c823c9 QGuiApplicationPrivate::init() + 57
23  libQt5WidgetsAndroidEmu.5.12.1.dylib    0x000000011238a4ba QApplicationPrivate::init() + 26
24  emulator64-crash-service        0x000000010f361ec5 main + 1285
25  libdyld.dylib                   0x00007fff20376621 start + 1

Thread 1:
0   libsystem_pthread.dylib         0x00007fff20357458 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib         0x00007fff20357458 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x011dffff8839de21  rbx: 0x00007f930b53ab10  rcx: 0x0080000000000000  rdx: 0x0100000000000000
  rdi: 0x0000000000000000  rsi: 0x00007fff7c59fd2c  rbp: 0x00007ffee08a5480  rsp: 0x00007ffee08a5480
   r8: 0x00000000000036be   r9: 0x00000000000036c2  r10: 0x00007fff8839de22  r11: 0x00007fff236b66ba
  r12: 0x0000000000000e6c  r13: 0x00007f930b523720  r14: 0x00007fff201f99a0  r15: 0x0000000000000000
  rip: 0x00007fff201afaa6  rfl: 0x0000000000010246  cr2: 0x0000000000000000
  
Logical CPU:     2
Error Code:      0x00000004 (no mapping for user data read)
Trap Number:     14

I looked up possible issues in Qt or Qemu but I have no idea what's the issue here and how it could be related to MacOS Big Sur

I tried uninstalling and reinstalling:

  • Android Studio
  • Intel x86 Emulator Accelerator (HAXM installer)

I also tried to Wipe data and cold boot the AVDs

Please advise if anyone has encountered this issue recently

android
qt
android-studio
android-emulator
qemu
asked on Stack Overflow Jan 21, 2021 by Saad Bahir

1 Answer

0

Try removing Android cache directory

/Users/[useraccountname]/.android

answered on Stack Overflow Jan 21, 2021 by emadhura

User contributions licensed under CC BY-SA 3.0