{"id":965,"date":"2012-07-04T15:33:48","date_gmt":"2012-07-04T20:33:48","guid":{"rendered":"http:\/\/www.familytidings.com\/blog\/?p=965"},"modified":"2012-07-04T15:33:48","modified_gmt":"2012-07-04T20:33:48","slug":"android-emulator-wont-start","status":"publish","type":"post","link":"https:\/\/www.familytidings.com\/blog\/?p=965","title":{"rendered":"Android Emulator Won&#8217;t Start"},"content":{"rendered":"<p>The Android SDK has a device emulator. \u00c2\u00a0I use it in Eclipse with the Android JUnit test framework. \u00c2\u00a0A few days ago, the emulator refused to start.<\/p>\n<p>From Window -&gt; AVD Manager, I started one of the devices. \u00c2\u00a0A dialog titled &#8220;Starting Android Emulator&#8221; came up. \u00c2\u00a0Inside it, a progress bar ticked off ten seconds. \u00c2\u00a0Then, nothing. \u00c2\u00a0This behavior was the same for all my devices, from Android version 1.5 through version 4.0.3.<\/p>\n<p>To see if the problem was related to Eclipse, I started the emulator from the command line. \u00c2\u00a0To do this, you need the name of the AVD:<\/p>\n<pre>android list avd<\/pre>\n<p>Using my Android 1.5 virtual device, I tried to start it:<\/p>\n<pre>emulator -avd OldAndroid<\/pre>\n<p>And the result was &#8220;Segmentation fault&#8221;. \u00c2\u00a0I turned on &#8220;verbose&#8221; and ran again:<\/p>\n<pre>emulator -verbose -avd OldAndroid<\/pre>\n<p>This prints out what&#8217;s happening. \u00c2\u00a0The last line before the seg fault was: \u00c2\u00a0&#8220;emulator: Initializing hardware OpenGLES emulation support&#8221;. \u00c2\u00a0Next, I tried to see which system call failed:<\/p>\n<pre>strace emulator -avd OldAndroid<\/pre>\n<p>The last line there is a futex call with operation FUTEX_WAIT and no timeout. \u00c2\u00a0This call was unfinished, resulting in the seg fault. \u00c2\u00a0From the manual page for futex: \u00c2\u00a0&#8220;This operation atomically verifies that the futex address uaddr still contains the value val,\u00c2\u00a0and sleeps awaiting FUTEX_WAKE on this futex address.&#8221; \u00c2\u00a0The address appears in the lines above.<\/p>\n<p>A bug report was filed today about this issue: \u00c2\u00a0<a href=\"http:\/\/code.google.com\/p\/android\/issues\/detail?id=34233\">http:\/\/code.google.com\/p\/android\/issues\/detail?id=34233<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Android SDK has a device emulator. \u00c2\u00a0I use it in Eclipse with the Android JUnit test framework. \u00c2\u00a0A few days ago, the emulator refused to start. From Window -&gt; AVD Manager, I started one of the devices. \u00c2\u00a0A dialog titled &#8220;Starting Android Emulator&#8221; came up. \u00c2\u00a0Inside it, a progress bar ticked off ten seconds. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-965","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=965"}],"version-history":[{"count":4,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/965\/revisions"}],"predecessor-version":[{"id":975,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/965\/revisions\/975"}],"wp:attachment":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}