|mach android-emulator| fails to start emulator, reports "basic_string::_S_construct null not valid"

RESOLVED FIXED in Firefox 51



Firefox for Android
2 years ago
2 years ago


(Reporter: gbrown, Assigned: gbrown)


49 Branch
Firefox 51

Firefox Tracking Flags

(firefox51 fixed)



(1 attachment)



2 years ago
This seems to be another failure related to Android SDK updates: The latest emulator behaves differently from older versions.

With the latest SDK updates, |mach android-emulator| may report it cannot verify that the emulator has started, and indeed, there is no emulator UI visible and no process running. The emulator log shows "basic_string::_S_construct null not valid".

Running "emulator -avd mozemulator-4.3" (or x86) provides the same information.

Running "emulator -avd mozemulator-4.3 -debug all" provides additional diagnostics that show the emulator is trying to get system.img from <sdk>/platforms/... -- if those images are not installed, the emulator fails.

Comment 1

2 years ago
3 known work-arounds:

 - edit ~/.mozbuild/android-device/avd/mozemulator-XXX.avd/config.ini and set "image.sysdir.1="; or
 - install the required image(s) in the sdk; or
 - use an emulator from an older sdk

This may also not happen if the emulator has run correctly on this avd in the past and created a hardware-qemu.ini with the correct paths.


2 years ago
See Also: → bug 1276564

Comment 2

2 years ago
:chmanchester had this problem today. He found that the image.sysdir.1= workaround worked for him.


2 years ago
See Also: → bug 1290627

Comment 3

2 years ago
image.sysdir.1= works for me in bug 1290627, thanks!

Comment 4

2 years ago
Created attachment 8777626 [details] [diff] [review]
update AVDs with image.sysdir.1 workaround

This updates the tooltool manifests for the Android 4.3 and Android x86 AVDs. The new AVDs are identical to the previous versions except that the image.sysdir.1 setting in config.ini is set to "", which appears to mean "search for images in the avd" on both old (circa sdk 18) and new (sdk 24/25) emulators.

A small logic change tags along here so that tooltool retrieval of AVDs uses the same algorithm as used for other android-device tooltool retrievals (hostutils, jimdb).

Once this lands, anyone still having trouble with 'mach android-emulator' should be able to refresh their AVDs and run the emulator successfully with 'mach android-emulator --force' -- I'll announce to the mobile dev list.
Attachment #8777626 - Flags: review?(jmaher)
Comment on attachment 8777626 [details] [diff] [review]
update AVDs with image.sysdir.1 workaround

Review of attachment 8777626 [details] [diff] [review]:

thanks for updating this!
Attachment #8777626 - Flags: review?(jmaher) → review+

Comment 6

2 years ago
Pushed by gbrown@mozilla.com:
Update Android 4.3 and x86 AVDs for sdk 24+ emulator compat; r=jmaher

Comment 7

2 years ago
Last Resolved: 2 years ago
status-firefox51: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51


2 years ago
Duplicate of this bug: 1290627
You need to log in before you can comment on or make changes to this bug.