Bug 44420 - [Papercut - Windows]Large Package Name Lengths cause Debugger to not attach and crash application
Summary: [Papercut - Windows]Large Package Name Lengths cause Debugger to not attach a...
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 7.0 (C8)
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Jonathan Pryor
: 52576 ()
Depends on:
Reported: 2016-09-16 16:03 UTC by Jon Douglas [MSFT]
Modified: 2017-06-27 15:03 UTC (History)
3 users (show)

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

logcat of VS Simulator (15.06 KB, text/plain)
2016-09-16 16:03 UTC, Jon Douglas [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 for Bug 44420 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Jon Douglas [MSFT] 2016-09-16 16:03:32 UTC
Created attachment 17545 [details]
logcat of VS Simulator


It seems that there's a maximum package length that plays nicely with attaching the debugger. However if you exceed that maximum, the debugger has problems attaching. For example:

A) Aaaaaa.Bbbbbbbb.Cccccccc.Dddddddd.Aaaaaa.Bbbbbbbb.Cccccccc (58 characters)

B) Aaaaaa.Bbbbbbbb.Cccccccc.Dddddddd.Aaaaaa.Bbbbbbbb.Cccccccccccccccccccccccccccccccccc (84 characters)

In the first scenario A) the debugger attaches and all is well.

In the second scenario B) the debugger fails to attach and actually crashes the application.

I tested this on both a physical device and emulator:

Physical Device - Nexus 5 - 6.0.1

VS Emulator - 6.0


[Ensure you are on a Windows PC with the latest stable as defined in *Version below]

1) File -> New Blank Android Application

2) Change the Package Name inside Android Manifest options to A) and B) to see the differences

*Expected Behavior:

The debugger should attach and be able to resolve a simple breakpoint with a long package name. Or it should be validated on the Windows side to enforce any Windows policies.

*Version Information:

Microsoft Visual Studio Professional 2015
Version 14.0.25421.03 Update 3
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Professional

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

Xamarin.Android (0e59c36)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS (6c3fee4)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 John Miller [MSFT] 2017-06-26 15:32:52 UTC
I was able to reproduce this issue with the following version:

Microsoft Visual Studio Enterprise 2017 
Version 15.2 (26430.12) Release
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Enterprise

Xamarin (1be4f0c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK (9dbc4c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK (4cffddf)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 2 Tom Opgenorth 2017-06-27 15:03:27 UTC
*** Bug 52576 has been marked as a duplicate of this bug. ***