Android emulator crash linux with error?

Issue

Basically, I’ve been using Ubuntu with Android Studio, I have a very simple App which I am attempting to run on an emulator.

Now, the app actually starts inside the emulator just fine but the issue arises when the on-screen keyboard shows up. Once it has shown up, and you click a key, the emulator crashes with this error:

emulator64-arm: ../../sdk/emulator/opengl//host/libs/Translator/include/GLcommon/GLutils.h:48: unsigned int SafeUIntFromPointer(const void*): Assertion `(uintptr_t)(ptr) == (unsigned int)(uintptr_t)(ptr)' failed.

I have tried engaging the keyboard outside the App, and the issue is still there so I think it is safe to assume it isn’t the app that is causing it.

Other things I’ve tried are:

  • noaudio (Started the emulator without audio, as I found a few posts suggesting it can cause freezing. This of course didn’t help)
  • Unticked ‘use host GPU’ (This actually caused the emulator to black-screen)

Anyone aware of any work-around?

Solution

This issue was fixed in the Android Open Source Project (AOSP) repo but hasn’t been ported to 4.0.3 yet so you will notice this issue when using emulators built with API 15.

The workaround is to turn off “Use Host GPU”

if you’re using android studio, then this option is here:

Turn off host GPU option in AVD settings for device

Of course, this really slows down the emulator but it’s better to have a slow emulator than one that is unusable because it constantly crashes. As of Dec 11, 2014, the latest update is:

we are going to release updates for older system image, stay tuned…

Answered By – gMale

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published