Forum Visual Studio

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Droid - Debugging - Visual Studio Is Busy

ScottParilloScottParillo USMember, University

I have been developing in Xamarin for about 4 months (VS2012/mono-android-4.8.03015) and there's some kind of bug that happens rather frequently where you're debugging, hit a breakpoint, and VS is no longer responding. The IDE process isn't dead but you will see a "Visual Studio is Busy" notification on the taskbar. It's beyond annoying because you pretty much have to kill the IDE via Task Manager.

Is Xamarin aware of this bug? Is there something I can do or kill to get around this?

«13

Posts

  • I'm seeing the same issue :(

  • qwertylolmanqwertylolman USMember
    edited January 2015

    updated Xamarin today and got the same issue.

    Microsoft Visual Studio Ultimate 2013
    Version 12.0.31101.00 Update 4
    Microsoft .NET Framework
    Version 4.5.50938

    Installed Version: Ultimate

    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

  • GerryHallGerryHall USMember

    I reported this issue to Xamarin support yesterday and a bugzilla issue has been added. I'd encourage you guys to maybe add to the issue in order to maybe get it prioritized for a fix. https://bugzilla.xamarin.com/show_bug.cgi?id=26025

  • GerryHallGerryHall USMember

    I reported this issue to Xamarin support yesterday and a bugzilla issue has been added. I'd encourage you guys to maybe add to the issue in order to maybe get it prioritized for a fix. https://bugzilla.xamarin.com/show_bug.cgi?id=26025

  • qwertylolmanqwertylolman USMember

    any way to rollback update?

  • StephenWilkinsonStephenWilkinson USMember ✭✭
    edited January 2015

    Brendan posted a guide how to rollback in one of the iOS threads relating to this Visual Studio is Busy problem. It might help you.

    http://forums.xamarin.com/discussion/comment/97053/#Comment_97053

  • GerryHallGerryHall USMember

    This is an absolute nightmare developing with Xamarin right now on Visual Studio.

  • This issue is killing my development right now too. I am not sure what more I can add to the bug though... it is pretty much all there.

  • I rolled back to version 3.8.15 of Xamarin and everything is working for me again.

  • Xamarin-IanXamarin-Ian USMember, Xamarin Team Xamurai

    Apologies you guys are hitting this bug. I have a repo of this case on Android, but I'd like to confirm the exact issue you are facing can you please send me / provide me your solution file where you are clearly seeing this issue. I want to confirm the fix we have addresses this specific bug.

  • NilsWidmarkNilsWidmark SEMember
    edited January 2015

    I'm having the same problem here since the latest Android update. The hang doesn't happen every time, but occasionally.
    I've seen it in the following situations:

    • When hitting a breakpoint
    • When continuing from a breakpoint
    • On random, when I navigated Up in my app (I'm guess it had to recreate the view)
    • I also briefly tried VS2015 and it hanged once when pressing stop debugging

    I've tried to recreate my project, change to the latest android sdk api version and many other things, and nothing really helps.
    I've never experienced these hangs on Xamarin Android prior to the latest update.

    Edit: I'm using Visual Studio 2013 Update 4

  • Xamarin-IanXamarin-Ian USMember, Xamarin Team Xamurai

    Hi Nils\all. We've been looking into this issue...and we believe the issue is related to Resharper. ReSharper 9.0 Update 1 Build 9.0.20141219.130142. Can you please disable Resharper and let us know if you are still seeing the issue?

    We are going to work to figure out a solution that works with this new version of Resharper.

  • NilsWidmarkNilsWidmark SEMember

    Hi Ian

    Unfortunally I don't run any other extension than Xamarin.

    I'm not sure if it's relevant, but I very often have to delete the .suo file, otherwise Visual Studio hangs on loading the solution. However, I also had to do this with previous versions of Xamarin, but debugging worked properly then.

  • DanielPDanielP USMember ✭✭

    +1

    My team upgraded to the latest version so we can migrate to unified and now this happens. Can't do anything on a real device for days now. This is a huge disappointment really. Every now and then my projects grind to a halt because of a bad Xamarin update.
    Rolling back is not an option because of the lacking unified support. And no, I'm not using resharper.

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    Same problem here!
    To do the update to XF 1.3.1 (unified API), I have updated XF on MAC and XF-Integration to VS to the latest "stable"-versions (from stable-channel).
    I don't use Resharper... so.. this problem is not related to Resharper

    After doing that, I am not able to debug in Android (like described in the postings here, also with hangs of VS, so that I have to shutdown VS from Taskmanager).
    I further also have problems with iOS like described here:

    forums.xamarin.com/discussion/29715/ios-visual-studio-locks-up-on-launching-application-for-debugging#latest

    The only platform, where debugging works now, is WP.

    So once again... it would me (more then) nice, if the VS-Integration would start to really work and not to break after every update to every peace of software... (fortunately the hope dies last)

  • Xamarin-IanXamarin-Ian USMember, Xamarin Team Xamurai

    Hello Everyone.

    We believe we've identified the root cause of the issue you are facing with the Visual Studio Hangs on Android, and I've personally messaged all of the individuals who have posted here on this forum.

    We have a hotfix candidate and we have internally been able to verify that the issue is addressed.

    I am looking for candidates that would be willing to install the hotfix on their machines in order to verify that the issue is entirely resolved.

    The VS configuration and extensions installed on your machine may cause the issue to be more prevalent and so we are widening the matrix of configurations we are testing on....in the mean time please reach out if you have the ability to install a private hotfix that should resolve this issue.

    My contact details are below.

    Thanks,
    Ian Ceicys
    :: Visual Studio QA Software Engineer @ Xamarin - title
    :: [email protected] - email
    :: (440)724-6721 - phone.mobile

  • PaulFitzpatrickPaulFitzpatrick GBMember ✭✭

    Are you able to give an ETA on the fix?

  • I am having this issue too. Ian, I have sent you an email requesting the hotfix so I can get back to work.

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    Installed 3.9.274 from GoogleDrive-Link...
    Same behavior!
    Not able to debug iOS, not able to debug Android (VS hangs -> I had to shutdown VS in Taskmanager).

    Annoying...

  • DannyOhDannyOh USMember
    edited January 2015

    Hi guys,

    In my case, creating too many background threads causes this issue.
    This problem happens on iOS and Android but not WP.
    I think it's because each os has different resource capacity like total thread count for an app.
    If there are many extensions and the extensions run many background threads, it may easily cause this problem.

    This is the code causing this issue.

    // this bg task is run by valueChanged event of Entry
    // when I enter 20 more charaters in the Entry, this problem happens.

    public void Validate()
    {
    Task.Factory.StartNew(() =>
    {
    // delay to run after 5 seconds
    Task.Delay(5000).Wait();

        // if entering value is not completed, cancel this task.
        if (!valueChangeCompleted)
               return;
    
        // run something if entering value is completed.
       .....
       .....
    }
    

    }

    Anyway, even if the code causes the problem, Xamarin should show the exact reason instead of "Visual Studio is busy".

  • Xamarin-IanXamarin-Ian USMember, Xamarin Team Xamurai

    Hi Folks, we are continuing to investigate reports of hangs on Android devices and we believe that Xamarin.VisualStudio_3.9.274 contains the necessary fixes for the Android hangs and that the debugger successfully attaches.

    We have seen customer have success when they attempt to debug the application in VS a second time. This resolves any cached/stale results.

    We have have several customers successfully install this hotfix and have seen the hang issues be resolved for Android.

    After installing this hotfix build i'd like to ask you to send everyone to please send me a quick mail indicating if you've seen the hang issue being resolved or if it is in fact NOT resolved. any additional feedback/issues you are seeing would be very much appreciated so I can make additional improvements.

    Ian Ceicys :: Visual Studio QA Software Engineer @ Xamarin - title :: [email protected] - email :: (440)724-6721 - phone.mobile

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    Hi Ian (and others)

    As I write in my last posting, the update definitely don't work for me.
    Actual behavior (after install update and reboot MAC):
    Android:

    • A few minutes ago, I was able to debug Android two times
    • Now (third time), VS hangs with a spinning wheel since a few minutes
      => I have to shutdown VS in Taskmanager (once again)
      iOS:

    • I can deploy to iPhone

    • Debugger is started and holds on first breakpoint
      - If I the go further in code, the debugger lost the connection
      WP:

    • Seems to work (only platform, that works)

    Ian: As I have sent you my whole project, I hope you can comprehend the problem...

  • XamarinNoobXamarinNoob USMember

    Myself and my co-worker are having Visual studio lock up as well. We dont use resharper. This is REALLY killing my development time. This has to be a top priority...

  • XamarinNoobXamarinNoob USMember
    edited January 2015

    ...

  • FaltysMartinFaltysMartin CHUniversity ✭✭

    Where can I get Xamarin.VisualStudio_3.9.274?

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Here's a link to the experimental preview build that many users have reported to be helpful. As a caution, keep in mind that this build includes new untested changes, so even if it helps with the hanging problem it's possible it might introduce some other issues.

    That warning out of the way, here's the build for anyone who might like to try it:
    http://xvs.xamarin.com/Xamarin.VisualStudio_3.9.274.msi

    These changes will also be included in an upcoming service release (tentatively scheduled for release to the Alpha channel before the end of the month).

  • mikescandymikescandy ITBeta, University ✭✭

    Just tested the updated msi, and for me is thumbs up!
    Before this I had to kill adb after every debug session to make visual studio responsive again, and eventually restart visual studio anyway. It seems it's working much better now. I'll keep on working on this for the rest of the day and see if there's any major issue.
    Oh, by any chance, is sketches for visual studio in this release? (joking ;))

  • DirkWalkowiakDirkWalkowiak DEMember, University
    edited January 2015

    Same problem here: after I manually updated my solution to iOS Unified debugging problems started.

    Also see this thread:

    https://forums.xamarin.com/discussion/27775

    Setup: Xamarin.Forms PCL solution, current stable versions of Xamarin.Forms, Xamarin Studio and Visual Studio Xamarin add-on, Visual Studio 2013 Update 4, Windows 8.1 Update 64bit, NuGet packages: Json.NET 6.0.8, RestSharp 105.0.1, SQLite.NET PCL 2.5.

    Starting iOS debugging is not a problem, but it's almost for sure that while debugging at some point Visual Studio freezes saying "Visual Studio is busy" when trying to activate its window and also the app in the iOS Simulatur hangs. This happens e.g. when just clicking on a SwitchCell in my app that causes a RestSharp call using a binding like "On='{Binding ...}'".

    I then have to force quit Visual Studio 2013 via Task Manager.

    I also tried to wait and see what happens when let Visual Studio open after its freeze. After approximately 12 minutes Visual Studio got force quit by the OS. See attached file for the last entry in the %LOCALAPPDATA%\Xamarin\Log\12.0\devenv....log at that time.

    Please fix this annoying issue as soon as possible! Alas, I am not such a man of genius that I do not need to debug in order to develop...

    Thanks in advance!

  • Whilst the experimental build appears to reduce the incidence of VS is busy dialogs, it has introduced a new issue.

    I am now finding that VS is now simply locked after stopping debugging. This is happening around 20% of the time. I have to kill VS via task manager and reload the project.

    In addition, it also does appear to have caused the app i'm working on to run more slowly when I'm debugging.

    I do not have resharper nor any other plug-ins installed. I'm running VS Premium 2013 Update 3.

    As everyone else has stated, this is a significant issue and really should never happen for a "stable" release.

    This issue is grinding a very time-sensitive project to an almost complete halt.

    Happy to provide the Xamarin logs or any other debug info that would be helpful

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @DarrenChapman‌:
    See also this thread: forums.xamarin.com/discussion/comment/99519#Comment_99519

    The only platform, that works for me right now is WP.

    But it seems as the problem is depending on the environment (some other users say, that their problems are solved with the update).

  • mikescandymikescandy ITBeta, University ✭✭

    After a few days of testing, it seems to me that the package alleviates the issue but it's not a definitive fix. After a few rounds of deployment/debug, I still have to kill adb in order to regain control of visual studio. Looking at process monitor/netstat, it seems that visual studio become very "chatty" with adb.

  • heladohelado USMember ✭✭

    Another issue that I and my team suffer from on Visual Studio (13 ultimate + pro), is VS hangs every time I try to create a new file, regardless of it's type.
    I did not upgrade to the beta build yet since I cannot risk loosing more work days on Xamarin bugs...
    Thanks

  • CliffCawleyCliffCawley AUMember

    I too have been getting this problem. It seems to be a common thing now with Xamarin. Update to the latest stable version, something else is broken that makes it difficult or wastes days trying to get working while work deadlines are looming. Makes it really frustrating considering the amount of money it costs to use Xamarin in the first place.

    Android debugging has totally ground to a halt for me now because of this bug. I've tried both Xamarin Player and the Intel emulator, both do the same.

    I'm using Resharper 7.1.2 in Visual Studio 2012.

    I'm hesitant to try the 3.9.274.msi for fear it's going to break even more and stop me from something else.

    I also find the versioning used by Xamarin utterly confusing. Each component has it's own version which seems to have no parity to other components and then it's different again depending on the host system you're installing on.

    E.g, Xamarin.Android for OS X is 4.2, Xamarin.Android for Windows is 3.9.236
    Xamarin.iOS for OS X is 8.6, Xamarin.iOS for Windows is 3.9.236

    How do I know which version can be used with which other version to successfully downgrade? I can't even use the date because for example Xamarin.Android for windows was released on Jan 13th with version 3.9.236 and OS X was 4.2 on Nov 21!?

    Sorry for the rant, it's been building up for months now with each broken 'Stable' release.

  • CliffCawleyCliffCawley AUMember
    edited January 2015

    From the logs it seems to be spamming:
    Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-01-28 12:49:14.1] -- Starting Process - 01/28/2015 12:49:14 -- Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-01-28 12:49:14.1] Executable: C:\Users\Nimble\AppData\Local\Android\ANDROI~1\tools\android.bat Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-01-28 12:49:14.2] Arguments: list avd Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-01-28 12:49:15.0] -- Process Finished [-1] --

    I've attached the log from a recent session before I terminated VS

  • CliffCawleyCliffCawley AUMember

    Just to add to this, it appears to also be happening from VS when you debug iOS. You launch, try to do something in the app, and VS freezes.

    The interesting thing about that is that it looks like even though I'm running iOS, it's still spamming list avd.

    Xamarin.VisualStudio.IOS.XamarinIOSPackage Information: 0 : [2015-01-28 14:22:24.1] [28-Jan-2015 14:22:24] Request handled in 2.929ms Xamarin.VisualStudio.IOS.XamarinIOSPackage Information: 0 : [2015-01-28 14:22:25.6] [28-Jan-2015 14:22:26] Request handled in 3.32ms Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-01-28 14:22:26.9] -- Starting Process - 01/28/2015 14:22:26 -- Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-01-28 14:22:26.9] Executable: C:\Users\Nimble\AppData\Local\Android\ANDROI~1\tools\android.bat Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-01-28 14:22:27.0] Arguments: list avd Xamarin.VisualStudio.IOS.XamarinIOSPackage Information: 0 : [2015-01-28 14:22:27.1] [28-Jan-2015 14:22:27] Request handled in 2.677ms Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-01-28 14:22:27.9] -- Process Finished [-1] -- Xamarin.VisualStudio.IOS.XamarinIOSPackage Information: 0 : [2015-01-28 14:22:28.6] [28-Jan-2015 14:22:29] Request handled in 2.365ms Xamarin.VisualStudio.IOS.XamarinIOSPackage Information: 0 : [2015-01-28 14:22:30.1] [28-Jan-2015 14:22:30] Request handled in 2.241ms Xamarin.VisualStudio.IOS.XamarinIOSPackage Information: 0 : [2015-01-28 14:22:31.6] [28-Jan-2015 14:22:32] Request handled in 3.367ms Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-01-28 14:22:31.9] -- Starting Process - 01/28/2015 14:22:31 -- Xamarin.VisualStudio.ProcessWrapper Verbose: 0 : [2015-01-28 14:22:32.0] Executable: C:\Users\Nimble\AppData\Local\Android\ANDROI~1\tools\android.bat

  • AlecTucker.2208AlecTucker.2208 AUInsider, University, Developer Group Leader mod

    Same problem here on Android. I've tried the 3.9.274 update (link is in the thread referenced in the first post in this thread) - it hasn't helped. I don't have resharper installed. I get the same results whether I'm using an Xamarin Android Player or a device (HTC Desire).

    It's been some time now since a Xamarin update broke things like this.

    Hoping for a speedy fix...

  • DarrenChapmanDarrenChapman AUMember
    edited January 2015

    Just a heads-up to anyone struggling with this and related issues. Just in case you have missed the post by @mikescandy‌, I can confirm that there are two scenarios where killing the adb process will give you back Visual Studio:

    1] Visual Studio is Busy (never to return)

    2] Visual Studio is opening a file (never to return)

    Thanks @mikescandy‌!

  • RodyRody USMember ✭✭

    I am also having this same issue where VS 2013 hangs right after the Android app I am working on starts up on either a real device or simulator. My coworker is also experiencing this same issue on the iOS side as well. This bug is really making it difficult for us to do our jobs as software developers. Please release a fix as soon as possible.

  • RodyRody USMember ✭✭

    The latest alpha build 3.9.289 is working good so far.

Sign In or Register to comment.