Closed Bug 1289226 Opened 8 years ago Closed 8 years ago

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

Categories

(Firefox for Android Graveyard :: Testing, defect, P2)

49 Branch
defect

Tracking

(firefox51 fixed)

RESOLVED FIXED
Firefox 51
Tracking Status
firefox51 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file)

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.
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.
See Also: → 1276564
:chmanchester had this problem today. He found that the image.sysdir.1= workaround worked for him.
See Also: → 1290627
image.sysdir.1= works for me in bug 1290627, thanks!
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+
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b614ddc26ff9
Update Android 4.3 and x86 AVDs for sdk 24+ emulator compat; r=jmaher
https://hg.mozilla.org/mozilla-central/rev/b614ddc26ff9
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: