Bug 28892 - [Visual Studio 2010] Intermittent hang when debugging on device
Summary: [Visual Studio 2010] Intermittent hang when debugging on device
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General (show other bugs)
Version: 3.9
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Dominic N [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-04-08 13:14 UTC by Dominic N [MSFT]
Modified: 2015-09-30 10:19 UTC (History)
7 users (show)

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


Attachments
Project files from customer (11.21 KB, application/zip)
2015-04-08 13:14 UTC, Dominic N [MSFT]
Details


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:
Status:
RESOLVED FIXED

Description Dominic N [MSFT] 2015-04-08 13:14:58 UTC
Created attachment 10676 [details]
Project files from customer

## Overview

A priority customer is experiencing an issue in VS2010 where Visual Studio hangs when deploying to device. The case is difficult to reproduce and I (and other members of the support team) have been unable to reproduce the issue.

The customer observed an index out of range exception while debugging on an Android Device in VS2010 with the following:

03-12 13:31:39.448 D/dalvikvm( 5384): GC_EXPLICIT freed 131K, 42% free 10561K/17923K, paused 2ms+3ms, total 34ms
03-12 13:31:39.448 D/Mono ( 5384): GC_OLD_BRIDGE num-objects 324 num_hash_entries 376 sccs size 376 init 0.00ms df1 0.95ms sort 0.15ms dfs2 0.85ms setup-cb 0.34ms free-data 0.18ms links 71/71/71/2 dfs passes 771/447
03-12 13:31:39.448 D/Mono ( 5384): GC_MAJOR: (user request) pause 11.38ms, total 11.81ms, bridge 39.77ms major 1456K/1360K los 26K/26K
System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
bei Mono.Debugging.Client.ObjectPath.get_Item(Int32 n)
bei Mono.Debugging.Client.ObjectValue.GetChild(String name, EvaluationOptions options)
bei Mono.Debugging.Client.ObjectValue.GetChild(String name)
bei Mono.Debugging.Client.ExceptionInfo.get_StackIsEvaluating()
bei Xamarin.VisualStudio.Debugger.ExceptionsAdapter.ResolveFullException(ExceptionInfo exception)
bei Xamarin.VisualStudio.Debugger.ExceptionsAdapter.GetExceptionInfo(Backtrace backTrace, EvaluationOptions options)
bei Xamarin.VisualStudio.Debugger.ExceptionsAdapter.OnUnhandledException(Object sender, TargetEventArgs args)
bei Mono.Debugging.Client.DebuggerSession.OnTargetEvent(TargetEventArgs args)
bei Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet(Event[] es, Boolean dequeuing)
bei Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(EventSet es)
bei Mono.Debugging.Soft.SoftDebuggerSession.EventHandler()
The program 'Mono' has exited with code 255 (0xff).

The customer indicates that they have general issues with VS2010 performance as well. They observed the error message System.IndexOutOfRangeException only once and unfortunately have not been able to repro. They do observe "a general instability of our Visual Studio 2010 within the Xamarin-plugin. Particularly, when starting debugging the VS2010 sometimes hang (about 1 time a day on average, sometimes more, sometimes no problem within one day). Even waiting for long time does not help. We need to start the Windows Task-Manager and kill the VS2010 process. Every developer in our company who uses Xamarin experience this issue - independently whether the Xamarin plugin has been recently updated or not. We just guess that the System.IndexOutOfRangeException is somehow connected ot the observed instability."

They also observed the following in the device monitor using the attached sample app: 

1. Start application and deploy to a real device in debug mode.
2. Open Android device monitor
3. Error message appears indicating "Unexpected error while parsing input: Invalid ui automator hierarchy file"
4. VS hangs and displays "Visual Studio is Busy" popup


## Version information 

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.5.50938 SP1Rel

Installed Version: Professional

Microsoft Office Developer Tools 01018-532-2002181-70959
Microsoft Office Developer Tools

Microsoft Visual Basic 2010 01018-532-2002181-70959
Microsoft Visual Basic 2010

Microsoft Visual C# 2010 01018-532-2002181-70959
Microsoft Visual C# 2010

Microsoft Visual C++ 2010 01018-532-2002181-70959
Microsoft Visual C++ 2010

Microsoft Visual F# 2010 01018-532-2002181-70959
Microsoft Visual F# 2010

Microsoft Visual Studio 2010 Team Explorer 01018-532-2002181-70959
Microsoft Visual Studio 2010 Team Explorer

Microsoft Visual Web Developer 2010 01018-532-2002181-70959
Microsoft Visual Web Developer 2010

Microsoft Windows Phone Developer Tools - DEU 01018-532-2002181-70959
Microsoft Windows Phone Developer Tools - DEU

Crystal Reports Templates for Microsoft Visual Studio 2010
Crystal Reports Templates for Microsoft Visual Studio 2010

Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB2529927) KB2529927
This hotfix is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2529927.

Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB2548139) KB2548139
This hotfix is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2548139.

Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB2549864) KB2549864
This hotfix is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2549864.

Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB2565057) KB2565057
This hotfix is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2565057.

Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB2736182) KB2736182
This hotfix is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2736182.

Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB2890573) KB2890573
This hotfix is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2890573.

Hotfix für Visual Studio 2010 Shell (isoliert) - DEU (KB2635973) KB2635973
Dieser Hotfix ist für Visual Studio 2010 Shell (isoliert) - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird der Hotfix automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/2635973.

Hotfix für Visual Studio 2010 Shell (isoliert) - DEU (KB3002340) KB3002340
Dieser Hotfix ist für Visual Studio 2010 Shell (isoliert) - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird der Hotfix automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/3002340.

Microsoft Visual Studio 2010 SharePoint Developer Tools 10.0.40219
Microsoft Visual Studio 2010 SharePoint Developer Tools

Microsoft XNA Game Studio 4.0
Microsoft XNA Game Studio 4.0
Build 4.0.20823.0

Sicherheitsupdate für Visual Studio 2010 Shell (isoliert) - DEU (KB2645410) KB2645410
Dieses Sicherheitsupdate ist für Visual Studio 2010 Shell (isoliert) - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird dieses Sicherheitsupdate automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/2645410.

Visual Studio 2010 Shell (isoliert) - DEU Service Pack 1 (KB983509) KB983509
Dieses Service Pack ist für Visual Studio 2010 Shell (isoliert) - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird das vorliegende Service Pack automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/983509.

Wichtiges Update für Visual Studio 2010 Shell (isoliert) - DEU (KB2938807) KB2938807
Dieses wichtige Update ist für Visual Studio 2010 Shell (isoliert) - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird das wichtige Update automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/2938807.

Xamarin 3.9.236.0 (d6a2cae)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android 4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS 8.6.0.0 (eb24bdcf5cba2c12b673a07e0a8cce368b9563b3)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration 1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 2 Shruti 2015-08-20 03:13:55 UTC
I have tried this issue at my end with builds  where user is facing this issue (3.9.236.0 ) and with latest build (3.11.884.0) and not able to reproduce it whether we have all detail regarding environment info and test case.

@Dominic, Can you please take followup from customer for same that still he is facing this issue.

Environment Info: 
Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.6.00081 SP1Rel

Installed Version: Ultimate

Microsoft Office Developer Tools   01019-532-2002102-70145
Microsoft Office Developer Tools

Microsoft Visual Basic 2010   01019-532-2002102-70145
Microsoft Visual Basic 2010

Microsoft Visual C# 2010   01019-532-2002102-70145
Microsoft Visual C# 2010

Microsoft Visual C++ 2010   01019-532-2002102-70145
Microsoft Visual C++ 2010

Microsoft Visual F# 2010   01019-532-2002102-70145
Microsoft Visual F# 2010

Microsoft Visual Studio 2010 Architecture and Modeling Tools   01019-532-2002102-70145
Microsoft Visual Studio 2010 Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Microsoft Visual Studio 2010 Code Analysis Spell Checker   01019-532-2002102-70145
Microsoft Visual Studio 2010 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Microsoft Visual Studio 2010 Team Explorer   01019-532-2002102-70145
Microsoft Visual Studio 2010 Team Explorer

Microsoft Visual Web Developer 2010   01019-532-2002102-70145
Microsoft Visual Web Developer 2010

Crystal Reports Templates for Microsoft Visual Studio 2010   
Crystal Reports Templates for Microsoft Visual Studio 2010

Microsoft Visual Studio 2010 SharePoint Developer Tools   10.0.40219
Microsoft Visual Studio 2010 SharePoint Developer Tools

Microsoft Visual Studio 2010 Ultimate - ENU Service Pack 1 (KB983509)   KB983509
This service pack is for Microsoft Visual Studio 2010 Ultimate - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/983509.

NuGet Package Manager   2.8.60318.667
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Update for Microsoft Visual Studio 2010 Ultimate - ENU (KB0000001)   KB0000001v2
This update is for Microsoft Visual Studio 2010 Ultimate - ENU.
If you later install a more recent service pack, this update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/0000001.

Visual Nunit   1.0
Visual Nunit is an integration package that enables running of Nunit tests in Visual Studio.

Xamarin   3.11.884.0 (54f9c11)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.5.3 (f98871a95a479f6d71b3067b7e5834d41fcb2118)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.10.4.0 (2c66d2fed40ae89b785ae3830b9555e4a3687ab7)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integrationa
Comment 3 Shruti 2015-08-20 03:19:22 UTC
More update on above bug: 

we have checked it with same environment and app which customer is using except device which customer is using.

I have checked it using Samsung Note 3.

@Dominic ,It would be great If you can confirm from user that which device he is using. Is he facing this issue with a specific device or more than 1 device ? 

this is only case which I observed that can help to reproduce this issue.

Thanks!!
Comment 4 Dominic N [MSFT] 2015-08-24 12:39:52 UTC
@Shruti:

From previous correspondence with the customer, it seems as he is using the following Android devices to test:

Motorola TC55
Samsung Galaxy Tab 3 (SM T210)
Samsung Galaxy S5
Samsung Galaxy SIII (GT 19300)

He indicates that he's testing on Android versions 4.1.2 and 4.4.2. I assume the Motorola TC55, Tab 3, and Galaxy SIII are all on 4.1 and the S5 is on 4.4.2.

Let me know if there's any additional information you need.
Comment 5 Enzo Heredia 2015-09-30 10:19:50 UTC
VS2010 no longer supported, anyway this behaviour should be fixed in alpha version.