VS 2012 slows down or even freezes after debugging session or after running without debug

After I finish debugging (nevermind successfully or not) on device VS 2012 becomes slower ("eats" over 20% total processor time) or even freezes. This happens only on MonoDroid projects, usual C# WinForms projects never break VS 2012.
The version of Mono for Android is 4.4.38

Posts

  • ledzledz USMember

    I also had this problem, but after the latest updates (Visual Studio 11.0.51106.01 and Mono for Android 4.4.41) seems to have disappeared.

  • t0likt0lik RUMember
    edited December 2012

    Thanks, Goncalo!
    I'll try 4.4.41 (VS already updated) and write down here about results.
    I saw notification about this version but as I understand it fixes only one problem:
    "This release will fix a regression in TimeZoneInfo." That's why I decided not to install this fix. Ok, I'll try it anyway.

  • t0likt0lik RUMember

    The results are bad: VS still freezes and slows down periodically after debug session or run without debug.

  • t0likt0lik RUMember

    The solution is to kill the process adb.exe

  • StuartLodgeStuartLodge USBeta ✭✭✭

    That's interesting t0lik - I've seen similar problems - e,g, needing to restart VS every 10 or so debug sessions - I was also wondering if it was down to the plugins I had installed in addition to resharper, but I'd never thought of killing/restarting adb to get performance back - will give it a go.

  • t0likt0lik RUMember

    Stuart, this is only workaround and not the real solution. I strongly hope Xamarin guys will fix this bug soon. Can you also (like me) write down to Xamarin support about this problem and this workaround?

  • DeanEllisDeanEllis USXamarin Team Xamurai

    Hi

    There is an open issue https://bugzilla.xamarin.com/show_bug.cgi?id=9416 which seems to describe the same problem. Also this thread http://forums.xamarin.com/discussion/comment/6830#Comment_6830 references the same issue and the same work around.

    I will be taking a look at this issue , the first step is going to be replicating it. Does this always happen in VS2012 only or has it occurred in VS2010 as well? What Size project does it happen on?

    Dean

  • softlionsoftlion FRBeta ✭✭✭
    edited March 2013

    In VS2K12, i have concluded that the problem comes from the "Android Device Logging" window which never stops filling/updating, even after debugging. Clic the stop logging button when you don't need logging, and it will work much much better.

  • DeanEllisDeanEllis USXamarin Team Xamurai

    Softlion, thanks for the info I will check into that and see if that helps me replicate the issue.

  • PerdeFlonPerdeFlon SEMember

    I experience the same problem on VS 2010

  • PerdeFlonPerdeFlon SEMember

    Oh, and I'm using
    Xamarin.Android 4.6.00049
    with
    Microsoft Visual Studio 2010
    Version 10.0.40219.1 SP1Rel
    Microsoft .NET Framework
    Version 4.5.50709 SP1Rel

  • PerdeFlonPerdeFlon SEMember

    In my case, today I've experienced this annoying behavior at 4 occasions, each time I end up with VS allocating almost 3 GB of total 4 GB RAM, leaving my machine in an non useful state.
    Forced to restart VS, but everything just takes too long.

  • DeanEllisDeanEllis USXamarin Team Xamurai

    Hi

    Are you debugging against devices or emulators?

    Dean

  • DeanEllisDeanEllis USXamarin Team Xamurai

    I installed the trial of resharper and while I don't get a Hang in VS I am beginning to see a long CPU Spike after stopping debugging. In the Task Manager on Win 8 I can see the VS Icon change to the resharper icon during this high CPU usage period.

    Is anyone getting the hang and not using resharper?

  • rmaciasrmacias USBeta, University ✭✭✭✭✭

    I see this behavior as well. After a few hours of working, VS 2012 becomes extremely slow and unresponsive. I've usually had to kill VS 2012 in the task manager and restart it. And then after a few hours, it starts to slow down again. When this happens VS will usually take up about 30% of the processor and just hand there until I kill it. The UI becomes unresponsive.

  • AwakenDeveloperAwakenDeveloper USMember

    Debugging in VS 2012 on android devices is extremely painful. It's gotten to the point where I have to kill adb.exe after every debug session. Lots of random problems. Sometimes, after starting the debug session, the device reboots itself. Once in debug mode and traversing the app and hitting a breakpoint, the VS IDE freezes for 30 seconds or more. Now, if I don't kill adb.exe after I stop debugging, it sometimes becomes impossible to type code. I'll type a character, then it freezes for 30 seconds, then it will give me a few more seconds of typing before freezing again.

    I too can confirm that the Android Device Logging window continues to log a ton of stuff during and after debugging the app. It's like it never shuts off. While I can't say this is the reason for the problems with the environment, I would suspect it is at least a big part of it.

    I am currently on Xamarin.Android 4.6.00049

  • heladohelado USMember ✭✭
    edited July 2013

    Im experiencing very similar problems, whenever debugging execution is extremely slow (step execution is almost impossible)
    System:
    VS12 11.0.60610.01 Update 3
    Xamarin.Android 4.6.08007
    Re#er

  • This is also a problem in VS 2013/Xamarin.Android 4.10.1.

  • Has this been looked at /resolved in the meantime ? I still experience it on VS2013 (as well as on 2012) Android plugin V4.10.2014. Killing adb.exe is the only way to solve. Stopping logging doesn't help. High CPU (50% on a quadcore i7 2670QM) starts immediately after Xamarin Android project gets loaded (so even without having had a single debug session or without any devices/emulators attached !). Suspending resharper doesn't make a difference.

  • Interesting observation : on my system it's not so much the adb logging that seems to create the load, it's NIS (Norton Internet Security) that does it when the adb server is activated. When it's used, NIS CPU draw goes through the roof. When you kill adb, NIS load falls back to almost nothing ...
    I'm going to try to uninstall NIS now as there's no way you can stop this service while it's active... and continuously killing adb server while debugging to avoid CPU overheat isn't exactly my idea of smooth workflow !

  • BernardLimBernardLim USMember

    So DeanEllis from Team Xamarin, has this issue been resolved?

  • AlMansoriAlMansori USMember
    edited August 2015

    I landed/Googled here even though I have NOT done Xamarin/Android projects for the last month. Just re-opening a Windows.Form or WPF solution will cause all 8 CPU cores to shoot up.
    I am using VS 2013 4.5.511209
    I don't recall seeing CPU loading while doing Android a month ago except for the notorious "Android running out of memory" debugging :)
    (thinking before submitting.....)
    Wait a second a let me check my recent JavaScript and BootStrap VS extensions. Yup, one or all of these are culprits, because the moment I disabled a JS outliner, a JS parser, couple Bootstrap extensions and "Microsoft Insights Tools" extension the CPU is calmed down (after VS restart)
    So in my case it has nothing to do with adb.exe which even when invoked with adb.exe kill-server will get restarted (I assume by VS)
    Same goes for Android Device logger which was not open and not logging.
    I don't have time right now to narrow it down to which extension(s) but thought someone will find this useful.
    As much as I wanted to blame Xamarin or Android garbage platform cannot do it today :)

Sign In or Register to comment.