Bug 31514 - [XVS C5SR2] Visual Studio hangs during second attempt to debug on Samsung Galaxy S4, Android 5.0
Summary: [XVS C5SR2] Visual Studio hangs during second attempt to debug on Samsung Gal...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 3.11 (C5)
Hardware: PC Windows
: Normal normal
Target Milestone: 4.3.0 (C9)
Assignee: Bugzilla
Depends on:
Reported: 2015-06-30 16:54 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2016-12-27 14:21 UTC (History)
6 users (show)

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

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 Brendan Zagaeski (Xamarin Team, assistant) 2015-06-30 16:54:01 UTC
I am copying the available information so far into a bug report for tracking.

From: http://forums.xamarin.com/discussion/comment/136280/#Comment_136280:

> I just installed this release, and for some reason visual studio is hanging
> again, when debugging on a real device. It will build and deploy just fine the
> first time, and I can run and debug the app. But the second time, it will hang
> every time on "Copying application to device".
> It does copy the new app over, but visual studio hangs. This happens every
> time.
> I'm using a samsung galaxy s4 with lollipop...

## Possible regression status: regression between Cycle 5 SR 1 and Cycle 5 SR 2
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2015-06-30 17:42:30 UTC
As a first quick test, I attempted to reproduce the issue using an LG Optimus L9, Android 4.1.2. I used a very simple test case: a "new from template" Xamarin.Forms app.

So far every deployment has succeeded without error, the application has started successfully each time, and Visual Studio has remained responsive.

## Additional information that would be helpful to add to this bug report for anyone who can reproduce this issue

(See also https://kb.xamarin.com/customer/portal/articles/1910343-when-and-how-should-i-file-a-bug-report-.)

A. Can you reproduce the problem using a "new from template" Android app or Xamarin.Forms app? If not, then if you would be able to zip up and attach a minimal test case that shows the problem on this bug report, that would be perfect. (See the KB article link above for some tips about minimizing a test case.)

B. Have any users seen this error on any devices other than Samsung Galaxy S4, Android 5.0?

C. If any user can reliably reproduce the problem, please collect and attach back a "clean" set of log files and version information:

1. Run `adb logcat -c` (see also [1]) with the testing device attached. This will clear the Android log file on the device.
> [1] https://kb.xamarin.com/customer/portal/articles/1675684#adb-logcat

2. Delete the XamarinVS log folder: %LOCALAPPDATA%\Xamarin\Log

3. Reproduce the problem.

4. Follow the steps in [1] to collect the `adb logcat` log from the device.

5. Copy and paste your complete Visual Studio version information from "Help -> About Microsoft Visual Studio -> Copy Info [button]" into a text file.

6. Zip up the adb logcat output from step 4, plus the version information from step 5, as well as the whole XamarinVS log folder (%LOCALAPPDATA%\Xamarin\Log).

7. Attach the zip file from step 6 to this bug report.

D. As a final question, are any users who are hitting this issue in Visual Studio also able to reproduce the problem when they run the same app from Xamarin Studio on Windows?

Xamarin Customer Support
Comment 4 Michał Wróblewski 2015-07-03 10:48:58 UTC
I'm having the same issue here. I noticed that only when making changes to XML Android files with second attempt I have Visual Studio hanging. I'll send logs on Monday.
Comment 5 Michał Wróblewski 2015-07-03 10:50:33 UTC
I don't use Xamarin.Forms, just regular Xamarin.Android with latest release "stable" version.
Comment 6 Brendan Zagaeski (Xamarin Team, assistant) 2015-07-03 16:37:01 UTC
@Michał, the comment about "changes to XML Android files" sounds similar to Bug 31519, so it might be worth double-checking your Android tools versions against the versions listed in Bug 31519, Comment 2.

Of course if all of those versions looks good, and you still see Visual Studio hanging during "Copying application to device", then any additional log files you can add from Comment 1 (part C) will be excellent. Thanks!
Comment 7 Jose Gallardo 2016-12-22 22:32:12 UTC
As we've added several improvements to our build system and deploying/debugging mechanism since the bug was reported, I'm resolving it tentatively as Fixed.
That said, if you're still facing this issue with current bits, please feel free to reopen the bug.