Bug 22070 - Error getting android log entry
Summary: Error getting android log entry
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 3.5
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-08-13 13:39 UTC by Jon Douglas [MSFT]
Modified: 2016-12-22 20:40 UTC (History)
8 users (show)

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

Dev Env Log (351.60 KB, application/octet-stream)
2014-08-13 13:39 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 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 Jon Douglas [MSFT] 2014-08-13 13:39:09 UTC
Created attachment 7677 [details]
Dev Env Log

I am getting the following output in my "General" output window:

Error getting android log entry

System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at Xamarin.VisualStudio.Android.LogCatEntry.Parse(LogCatEntry obj, String entry)
at Xamarin.VisualStudio.Android.LogCatControl.listView1_RetrieveVirtualItem(Object sender, RetrieveVirtualItemEventArgs e)

This behavior makes debug output unusable, because every time I switch to debug output window, visual studio flips me back to the general window because a new instance of the output above has appeared.

Sounds like these people are complaining about the same problem:


Microsoft Visual Studio Professional 2013
Version 12.0.30501.00 Update 2
Microsoft .NET Framework
Version 4.5.50938

Installed Version: Professional

LightSwitch for Visual Studio 2013 06177-004-0444002-02238
Microsoft LightSwitch for Visual Studio 2013

Office Developer Tools - May 2014 Update ENU 06177-004-0444002-02238
Microsoft Office Developer Tools for Visual Studio 2013 - May 2014 Update ENU

Team Explorer for Visual Studio 2013 06177-004-0444002-02238
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013 06177-004-0444002-02238
Microsoft Visual Basic 2013

Visual C# 2013 06177-004-0444002-02238
Microsoft Visual C# 2013

Visual C++ 2013 06177-004-0444002-02238
Microsoft Visual C++ 2013

Visual F# 2013 06177-004-0444002-02238
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker 06177-004-0444002-02238
Microsoft® Visual Studio® 2013 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.

ASP.NET and Web Tools 2013.2.50425
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Windows Azure Web Sites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows Azure

ASP.NET Web Frameworks and Tools 2012.2 4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.1.20409.0
For additional information, visit http://www.asp.net/

Common Azure Tools 1.1
Provides common services for use by Azure Mobile Services and Windows Azure Tools.

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

PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools 12.0.30919.1
Microsoft SQL Server Data Tools

Windows Azure Mobile Services Tools 1.1
Windows Azure Mobile Services Tools

Windows Azure Tools 2.2
Windows Azure Tools for Microsoft Visual Studio 2013 - v2.2.11003.1601

Windows Azure Tools 2.3
Windows Azure Tools for Microsoft Visual Studio 2013 - v2.3.20320.1602

Windows Phone 8.1 SDK Integration 1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin (0b2a123923812a88ed3091909478dbe9e0111f00)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android
Comment 1 Arpit Jha 2014-08-25 05:59:35 UTC
I have checked this issue and unable to reproduce it.

Could you please provide us sample project or Steps and build info  when you are facing it.
Screencast: http://screencast.com/t/WDKXYnd27

Environment Info :
Comment 2 Jon Douglas [MSFT] 2014-08-26 12:15:28 UTC
It seems this issue is more of an annoyance for users who rely on the output window to debug their applications. It is being clogged with useless logcat errors on certain android devices such as the Galaxy S5.
Comment 3 Chris Atkinson 2014-08-28 18:40:43 UTC
It's not just the debug window behavior that is annoying. The affect it is having in making VS (in my case 2013) become very sluggish, is probably the bigger issue.

I have tried this on a Samsung Galaxy Mini running Android 4.1.2 and I have not seen the behavior. However, when I test with the Sony Xperia Z1 running Android 4.4.4, the problem occurs. I wonder if it could be related to the version of Android running on the devices.
Comment 5 Alejandro 2014-09-17 14:57:04 UTC
I get this too. Our code has a lot of trace we write to the output window and this bugs is rendering our ability to debug impossible. This needs to be fixed right away. I am using Visual Studio 2013 with a Samsung note 3 device. At a minimum this exception should be caught and written to a Xamarin log and to the output window.
Comment 6 Jose Gallardo 2016-12-22 20:40:30 UTC
As we've introduced several improvements on the Android Device Log (changes for VS 2015 Update 3 or newer), I'll mark the bug as resolved fixed.
Please feel free to reopen it if you can still reproduce the issue with current bits.