5
Operating system: Mac OS X
                  13.2.1 22D68
CPU: arm64
     12 CPUs

GPU: UNKNOWN

Crash reason:  EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
Crash address: 0x202922776f646e51
Process uptime: 6125 seconds

Thread 0 (crashed)
 0  libc++.1.dylib + 0x1f40c

Android emulator (not my app) is randomly crashing on M2 chip with the error above, both for flutter apps and native apps.

I tried

  1. Reinstall android studio and emulators.
  2. Give android studio more heap size.
  3. Give emulator more heap size. (It took longer to crash)
  4. Create new emulator.
  5. Cold start emulator.
  6. Use different Android version
  7. Use different config (Ram screen size)
  8. Use different image.

This also has not helped OSX: Android Emulator Crashes

Issue is not happening on other developers using M1 chips, but I am unsure if it is related or not.

Full crash log: https://mclo.gs/7Dx06Ym (It is very long)

I'm using

macOS Ventura 13.2.1 (22D68)
Android Studio Flamingo | 2022.2.1
Build #AI-222.4459.24.2221.9862592, built on March 31, 2023
Runtime version: 17.0.6+0-17.0.6b802.4-9586694 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Emre Akcan
  • 982
  • 10
  • 27

1 Answers1

2

Launching and using the emulator inside the android studio, rather than standalone application worked for me.

Go to Settings -> Preferences -> Emulator -> check "Launch in a tool window". I don't like using the emulator on device manager but will stick with it for now.

Please comment why this solution works if you know.

Emre Akcan
  • 982
  • 10
  • 27
  • Found any better solution to it? I'm tired of using android studio I want to go back to vscode – Ahmad Hassan May 12 '23 at 10:17
  • @AhmadHassan no I'm afraid, just keep using the emulator in android studio. – Emre Akcan May 13 '23 at 11:20
  • 1
    @AhmadHassan I using the answer to this question for the workaround, https://stackoverflow.com/questions/70876404/android-emulator-stop-working-after-update-to-31-2-6-m1-apple-silicon following this instruction https://developer.android.com/studio/emulator_archive to downgrade the emulator version – Nanda R.M May 20 '23 at 12:03
  • Why not use it inside Android Studio rather than downgrading? – Emre Akcan May 26 '23 at 10:26
  • @EmreAkcan smaller screen overall because android studio has borders and all, less control and android studio is heavy too. It doesn't feels comfortable. – Ahmad Hassan May 27 '23 at 21:16