Bug 5027 - VS is crashing after build, when selecting device to run
Summary: VS is crashing after build, when selecting device to run
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: Macintosh Windows
: High normal
Target Milestone: ---
Assignee: Dominique Louis
Depends on:
Reported: 2012-05-11 06:40 UTC by Paul DB
Modified: 2016-08-03 15:22 UTC (History)
7 users (show)

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

Recursive error occurring in 4.2.2 (224.11 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-05-27 07:47 UTC, Paul DB

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 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 Paul DB 2012-05-11 06:40:07 UTC
Have upgraded to latest 4.2 Alpha and Visual Studio now crashes when it comes to the device selection dialog after successful build.
My device serial number/ID does not show up, its just a blank highlighted line where the serial would normally show, with the device icon on it in the dialog.
The dialog flickers a bit then VS crashes.

I have checked if I can access the device via ddms.bat, and that works fine - I can see the device and view the device log fine in ddms.

I have restarted my machine and tried unplugging and plugging back in the USB connection to the device, with no luck.

I have a Samsung Galaxy S2, running VS 2010 on Win 7 in VMWare Fusion on a 2012 Macbook Air 13.
I have not had any such crashing problems with MfA 4.0.6.

Crash log is below:

Problem signature:
  Problem Event Name:	CLR20r3
  Problem Signature 01:	devenv.exe
  Problem Signature 02:	10.0.40219.1
  Problem Signature 03:	4d5f2a73
  Problem Signature 04:	Mono.AndroidTools
  Problem Signature 05:
  Problem Signature 06:	4fa9b914
  Problem Signature 07:	cf
  Problem Signature 08:	72
  Problem Signature 09:	System.AggregateException
  OS Version:	6.1.7601.
  Locale ID:	3081

Additional information about the problem:
  LCID:	1033
Comment 1 Paul DB 2012-05-11 07:10:47 UTC
I have just uninstalled MfA 4.2 Alpha and gone back to MfA 4.0.6 P2, and am no longer having the VS crashes mentioned above.  
My setup remains exactly the same aside from reverting MfA.

So the issue is definitely to do with MfA 4.2 Alpha - hope you can figure it out from the little info I have been able to give!
Comment 2 Jonathan Pobst 2012-05-11 15:05:01 UTC
Unfortunately, that's not enough to go on.  We now do everything in System.Threading.Tasks, so any exception is turned into an AggregateException.

I'll look into adding more generic error handling.
Comment 3 Paul DB 2012-05-11 15:18:26 UTC
Fair enough - wish I could give you more to go on...

Let me know if/when the improved error handling/reporting goes into an iteration of Mono for Android.
Unfortunately until then, I will have to stay away from 4.2 given I cannot test at all due to this crashing issue.
Comment 4 Jonathan Pobst 2012-05-24 11:42:40 UTC
We've fixed various things that could potentially have caused this, and we've added better logging so that things shouldn't crash and should give a better error message for 4.2.2.

If you are still hitting errors in 4.2.2, please file a bug or reopen this one, hopefully we'll at least provide you with a better error message!
Comment 5 Paul DB 2012-05-24 16:36:30 UTC
Thanks, I'll get hold of 4.2.2 soon and let you know if the issue persists :)
Comment 6 Paul DB 2012-05-27 07:46:26 UTC
Hi guys,

Sorry to say, but 4.2.2 is still a road block for me.

The attached error message shows many, many times - I've probably clicked through about 100 of these.
This message shows when I try to run a debug against my device.

Looks like my sim card name is an issue?

Back to 4.0.6 I go :/
Comment 7 Paul DB 2012-05-27 07:47:16 UTC
Created attachment 1968 [details]
Recursive error occurring in 4.2.2
Comment 8 Paul DB 2012-05-28 11:44:25 UTC
Another update on this issue - I have now tested out MfA 4.2.2 using MonoDevelop on Mac OSX without the same issue occurring.

So it would appear to be Windows specific.  
I also booted directly into Windows (was previously running Win7 from VMWare Fusion), and was able to duplicate the issue upon upgrading to MfA 4.2.2

For now I can proceed with MfA 4.2 using Mac OSX, but it would be great if the issue could be resolved on Windows.

Comment 9 Jonathan Pobst 2012-05-31 10:56:05 UTC
Excellent, now we have an error we can work with:
Unknown property format: '[gsm.sim.operator.alpha]: [Virgin'

Turn on "Extension debug logging" in Tools -> Options -> Mono for Android, restart VS and try again.

A log called monodroid.log will get written to your desktop.  This should have the full output of getprop.

Please attach that log so I can ensure our property parsing code handles whatever it is finding on your device.
Comment 10 Dominique Louis 2013-06-05 13:03:27 UTC
Is this still an issue?
Comment 11 PJ 2013-11-19 17:04:35 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 12 Paul DB 2013-11-19 17:25:00 UTC
Sorry folks, completely forgot about these bug reports.
I've moved over to developing on Mac, so not have not used VS with Xamarin for a long time now.
Feel free to close this bug.
Comment 13 PJ 2013-12-05 18:34:43 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.