Bug 2819 - After Starting Emulator, Select Device window does not refresh with the active device
Summary: After Starting Emulator, Select Device window does not refresh with the activ...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: unspecified
Hardware: PC All
: Normal minor
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-01-09 18:48 UTC by PJ
Modified: 2016-08-03 15:37 UTC (History)
8 users (show)

Is this bug a regression?: ---
Last known good build:

Log files from approximately when issue occurred (40.39 KB, application/x-zip-compressed)
2014-08-08 13:32 UTC, Kent Green [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description PJ 2012-01-09 18:48:52 UTC
Open any MfA solution file.


Start an Emulator (When 'Select Devices' window appears, select an emulator and click 'Start Emulator')

Expected behavior:
After the Emulator initializes, the 'Select Device' window updates with the chosen emulator active, giving the ability to select the correct emulator and hit ok.

Actual behavior:
The 'Select Device' window does not update for at least 5 minutes after the Emulator is initialized.

 --Workaround: Using 'Refresh' on the 'Select Device' window will update to show the emulator as active (correctly).

 --Bonus problem: If, while you have one emulator initialized, you use 'Start Emulator' from the 'Select Devices' window on the same emulator, you will start up a second instance of the Andoid emulator. If you then 'Refresh' during the initialization of the second Emulator, you crash MonoDevelop.

Please let me know if these problems are distinct enough to have separate bugs. I figured that since you can't get to the 'Bonus' problem using expected behavior, it might not be designed to act any differently.
Comment 1 PJ 2012-01-09 19:08:06 UTC
On Windows, the device list does automatically refresh for me.

When producing the problem, I was on:
MAC 10.7.2
Monodevelo 2.8.6
Mono 2.10.8
Mono for Android 4.0.2
Comment 2 lindsey.driscoll 2012-03-01 17:42:08 UTC
For what it's worth, the message log in MD gives the following exception when you select an AVD to start in the emulator and then click "start emulator"


Error - 5:39:48 PM - Error in device tracker
System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.AndroidTools.AndroidDeviceProperties.TryGetValue (System.String key, System.String& value) [0x00000] in /Users/builder/data/lanes/monodevelop-mac- 
  at MonoDevelop.MonoDroid.Gui.DeviceChooserDialog.OnDevicesUpdated (System.Object sender, System.EventArgs e) [0x00085] in /Users/builder/data/lanes/monodevelop-mac- 
  at MonoDevelop.MonoDroid.DeviceManager.OnChanged (System.Object sender, System.EventArgs e) [0x00055] in /Users/builder/data/lanes/monodevelop-mac- 
  at MonoDevelop.MonoDroid.DeviceManager.<CreateTracker>m__2C (System.Collections.Generic.List`1 list) [0x00011] in /Users/builder/data/lanes/monodevelop-mac- 
  at MonoDevelop.MonoDroid.AdbTrackDevicesOperation.OnGotResponse (System.String response) [0x00015] in /Users/builder/data/lanes/monodevelop-mac- 
  at MonoDevelop.MonoDroid.AdbOperation.OnGotResponseWithLength (IAsyncResult ar) [0x00020] in /Users/builder/data/lanes/monodevelop-mac-
Comment 3 Alan McGovern 2012-03-02 13:20:14 UTC
Bonus problem appears to be fixed already.  I cannot click the 'Start' button on a running emulator. I do experience the NullReferenceException though, so i'll look into what's causing that.
Comment 4 PJ 2012-03-02 16:28:38 UTC
This issue was just reported on Windows using Visual Studio. Here is a screencast of the issue: 


You can see that the emulator never shows up in the device list (even though it's partially obscured, if it were in the list the line would be highlighted green)

Assistly case 8056 

Unfortunately, the workaround for the issue using VS is more complicated because there is no built-in ADB refresh.
Comment 5 Alan McGovern 2012-04-13 06:06:23 UTC
The MonoDevelop side of this is fixed as much as is possible right now. Does this need to be reassigned to the visual studio addin now?
Comment 6 Alan McGovern 2012-04-16 09:28:11 UTC
If this is no longer an issue for Visual Studio, please close this as it no longer affects MonoDevelop.
Comment 7 PJ 2012-04-18 11:16:08 UTC
This bug is being seen on on the latest 2.9.5 build in MD with every attempt to deploy on Windows 7.

The full issue is described in bug 4270, comment 5

MFA 4.1.1: 4d6c42291ac0a0061ce17a50642a60fe0ccd6244
MD 2.9.5: f87f5acaa553514dd7f64ad5ae9f7ef8beae2f81
Windows 7

Additionally, this issue is still seen on Mac but it is intermittent and without running into 4270 the workaround is very simple (hit refresh). I have not seen this behavior change
Comment 8 Jonathan Pobst 2012-04-20 15:58:23 UTC
I don't think this bug ever mentions VS, moving to MD.
Comment 9 Alan McGovern 2012-04-20 21:13:04 UTC
Comment 4 says that the issue was reported using visual studio and has a screencast linked. If it doesn't affect VS anymore, feel free to close the bug. This issue has definitely been dealt with completely on the monodevelop side.
Comment 10 Jonathan Pobst 2012-04-21 00:47:43 UTC
Wow, I totally missed that.  The code for this has been completely rewritten since then (for 4.2), so I think I'm going to close this until we see it again.
Comment 11 PJ 2012-04-23 10:47:57 UTC
Reproduced this morning on the 4.1.1 RC-4 build and Visual Studio 2010:

Comment 12 PJ 2012-04-25 14:14:14 UTC
Cannot reproduce on RC6 (the real one) in Visual Studio.

Can still reproduce on MonoDevelop for Mac: http://screencast.com/t/K9P6uTn8v

Note: The list has all the currently connected devices shown as active when the dialog first opens. When I press [Start Emulator], the list refreshes to just show the AVDs (the connected devices no longer appear). 

Refreshing after the emulator fully loads shows the devices and the emulator as expected. 

Not sure why it would get into a state where it won't even show my my connected devices without refreshing.

2.9.5 Alpha MD
MFA RC6  (

This issue is no longer part of a set of blocking bugs for either platform, however, so the severity remains minor.
Comment 14 Mohit Kheterpal 2013-07-09 08:25:12 UTC
Regression Status: Not a Regression. 

Today we have checked this issue on following builds:

XS 4.0.9 (build 15)
Mono 3.1.1

There are two issues :

Case 1 : Initialized emulator is not active in select device window. Select device window is updated when we click on refresh button.

Case 2 :  Now Xamarin Studio does not Crash. If, while we have one emulator initialized, we use 'Start Emulator' from the 'Select Devices' window on the same emulator, we will start up a second instance of the Andoid emulator. If then we click on'Refresh' during the initialization of the second Emulator.

Hence Case 2 is resolved. But case 1 still exist.
Comment 15 PJ 2013-11-19 16:38:25 UTC
This bug was targeted for a past milestone, moving to the next active non-hotfix milestone.
Comment 16 Kent Green [MSFT] 2014-08-08 13:32:49 UTC
Created attachment 7637 [details]
Log files from approximately when issue occurred

The Xamarin Studio log files in the attachment are gathered from this morning when I encountered the bug.

I recorded this video showcasing the bug at approximately 8:30 am this morning:

Restarting the Genymotion emulator didn't resolve the issue, but restarting Xamarin Studio did.

--Build info--
=== Xamarin Studio ===

Version 5.2 (build 386)
Installation UUID: 7d1f6346-03b4-4b5f-b01b-a16d3a1c25a0
	Microsoft .NET 4.0.30319.18444
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.25

=== Xamarin.Android ===

Version: 4.14.0 (Business Edition)
Android SDK: C:\Program Files (x86)\Android\android-sdk
	Supported Android versions:
		2.2   (API level 8)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode)

=== Build Information ===

Release ID: 502000386
Git revision: e6a54dee5376e6e7a2d9982695b060fddc09e65d
Build date: 2014-08-04 14:07:09-04
Xamarin addins: 2b5a5c26ac2ee74c6e91a8d24ef44d0ca9cb74d0

=== Operating System ===

Windows 6.1.7601.65536 (64-bit)