locked
Visual Studio freezes when debugging on the Xamarin Android Player (XAP) RRS feed

  • Question

  • User50108 posted

    From time to time the Visual Studio freezes when debugging on the XAP emulator. Funny thing, in 50% of cases, it runs well when using Nexus 4 (Jelly Bean), but only in 5% cases works when using Nexus 4 (KitKat). The app works and debug well on the device. In the beginning of the app development, the emulators worked great. Once we added features in the app, the emulator began to fail. I am not sure whether these events (adding features and failing emulators) are related or not.

    In order to fix this, I cleanup the solution and sometimes I need to manually uninstall the app from the emulator. This increases the chances to properly use the emulator with about 80% (this approach doesn't solve the issue all the time, so I don't even know that this is a real solution or just a luck). It's also worth saying that if I do not clean the solution before debugging next time, there's almost no chance to use the emulator because the VS will freeze again.

    I don't know whether this is related or not, but from time to time I got an exception which says that the application doesn't support the emulator architecture (something like that; when I got this message again, I will return with the exact message). This happens when the VS wants to deploy to emulator [so the app is properly compiled, the old app is removed from the emulator and, instead of installing the app, the VS displays this message]. I fix this by cleaning up the solution and trying again.

    Another useful information: the applications generally starts properly, the first view (login) is displayed on the emulator. Once I log in, the VS freezes and the next view is never pushed.

    PS: I did not test what happens from Xamarin Studio and I can do that only if you think that this might help figuring out how to fix this. I do not intend to migrate to Xamarin Studio or to use both IDEs, one for development and the other for testing on the emulator.

    Any help is appreciated. Thank you in advance!

    Thursday, January 29, 2015 7:48 AM

All replies

  • User50108 posted

    Updates: If I click anywhere in the VS window, I see the following message: "Microsoft Visual Studio is Busy. Microsoft Visual Studio is waiting for an internal operation to complete. If you regularly encounter this delay during normal usage, please report this problem to Microsoft."

    Thursday, January 29, 2015 12:04 PM
  • User50108 posted

    I tested with Xamarin Studio and I have no issue, so most probably the issue is related either to Visual Studio or there's an incompatibility between VS and XAP. So maybe the Xamarin team still needs to investigate this.

    Thursday, January 29, 2015 2:46 PM
  • User104037 posted

    I believe the exact same thing is happening to me... OvidiuCaba, thank you for suggestion about Jelly Bean. 50% is better then 5%. Works for me.

    Friday, January 30, 2015 6:09 AM
  • User50108 posted

    @DeveloperGlobaxi , do you use Azure Messaging component in your app? I noticed that after adding this library and using it, the VS/emulator failures became more frequent.

    Friday, January 30, 2015 6:24 AM
  • User209 posted

    Had the same problem on the beta, updating to the alpha release helped with that problem.

    Friday, January 30, 2015 12:21 PM
  • User104037 posted

    @OvidiuCaba No, I don't.

    Monday, February 2, 2015 5:15 AM
  • User50108 posted

    @Cheesebaron , thank you for your answer. I didn't tested yet your solution. Anyway, honestly speaking, I would rather encourage Xamarin team to fix the bug instead of downgrading the XAP. :P Unfortunatelly, I didn't find a way to report issues in Xamarin yet. Once I find a way to do that, I will report the bug.

    Anyway, as a temporary solution I've chosen to keep both Xamarin Studio (XS) and VS opened, XS for debugging and VS for coding.

    Wednesday, February 4, 2015 7:40 AM
  • User57571 posted

    I am having the same problem using latest stable versions (5.9) I have updated Android SDK, Projects nugets, packages and components, I have tried to update Xamarin but there are no beta nor alpha releases and this is very annoying, any ideas? (This is only happening on debug mode using visual studio)

    Thursday, May 7, 2015 11:42 PM
  • User50108 posted

    @15mgm15 , I personally gave up trying to fix that issue and now I'm using a device for testing/debugging.

    In order to update to Alpha, follow the steps below:

    1. Open Xamarin Studio
    2. Click Help \ Check for updates
    3. Change the update channel to Alpha [I don't know whether you'll see the updates immediately or you need to wait a while; I never tried it]

    However, I don't believe this will fix your problem because most probably the Alpha version that Cheesbaron mentioned before [in January] is already part of a stable release.

    PS: You can try using GenyMotion.

    Friday, May 8, 2015 5:18 AM
  • User4727 posted

    This is happening for me on both iOS and Android when initiating the debugging process from Windows/Visual Studio 2013. This is something that was not happening prior to the 5.9 update.

    Very annoying, I have still not found a way around this happening or how to properly reset things.

    I have to use processexplorer to kill Visual Studio and then it is broken. Until

    • ios / android emu reset
    • restart mac
    • visual studio kill
    • visual studio clean
    • pc restart

    After all this I get one debugging session and then on the next initiation of a debug session VS hangs again.

    Friday, May 8, 2015 11:28 AM
  • User57571 posted

    Exactly the same thing happening to me.

    Friday, May 8, 2015 2:10 PM
  • User76049 posted

    Genymotion now hangs when running the app since the last stable release update. Stables releases are breaking stuff like this to often.

    Friday, May 8, 2015 2:21 PM
  • User13824 posted

    The most common recent cause of this issue (as it turns out, that the VS debugger is waiting for the soft debugger to return thread information, when in fact the soft debugger isn't always able to provide that information for every thread) is now fixed as of the current Alpha channel builds of XamarinVS.

    See the release thread for Visual Studio (currently announced in the VS forum): http://forums.xamarin.com/discussion/40277/alpha-service-release-xamarinvs-3-11-507-bug-fixes-for-3-11-445/p1

    • Bug 29133 - [XamarinVS] [iOS] [Android] Visual Studio hangs with when debugging some iOS and Android applications that use multiple threads.
    Friday, May 8, 2015 7:39 PM
  • User65404 posted

    I'm struggling with this issue - both genymotion and visual studio are incredibly unstable in the latest stable release. Every other attempt to debug I'm either rebooting visual studio, genymotion or both

    Sunday, May 10, 2015 7:12 PM
  • User11701 posted

    I've just run up against this issue and had to finish my updates using Xamarin Studio - which appears to work fine, but as I don't use it all the time my productivity was severely impacted.

    This really needs to be fixed or I may as well 'drop' to a lower licence band and get up to speed with Xamarin Studio instead of paying the extra to use Visual Studio - which may or may not work.

    Sunday, May 17, 2015 10:51 AM
  • User13824 posted

    The most common recent cause of this issue (as it turns out, that the VS debugger is waiting for the soft debugger to return thread information, when in fact the soft debugger isn't always able to provide that information for every thread) is now fixed as of the current Alpha channel builds of XamarinVS.

    See the release thread for Visual Studio (currently announced in the VS forum): http://forums.xamarin.com/discussion/40277/alpha-service-release-xamarinvs-bug-fixes-for-3-11-445/p1

    • Bug 29133 - [XamarinVS] [iOS] [Android] Visual Studio hangs with when debugging some iOS and Android applications that use multiple threads.
    Monday, May 18, 2015 8:24 PM
  • User80438 posted

    I am experiencing the same issue. Are we all expected to run against an Alpha release??

    We are paying you to be Alpha Testers????

    Wednesday, May 20, 2015 4:12 PM
  • User62190 posted

    Same issue.

    Thursday, May 21, 2015 4:25 PM
  • User53128 posted

    Seems this problem has been around for months. Not impressed at all.

    Microsoft Visual Studio Professional 2012 Version 11.0.61030.00 Update 4 Microsoft .NET Framework Version 4.5.51209

    ...

    Xamarin 3.11.458.0 (7acdedd) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    Xamarin.Android 5.1.1.0 (3518c4ceb984ffea1f5d972ea9c09eb27738d565) Visual Studio plugin to enable development for Xamarin.Android.

    Xamarin.Forms Intellisense 1.0 Provides intellisense for Xamarin.Forms in the XML editor.

    Xamarin.iOS 8.10.0.0 (7741cc495ab0baf04ff0405d0604bc27f0ecae2e) Visual Studio extension to enable development for Xamarin.iOS.

    Xamarin.iOS Unified Migration 1.0 Automated migration for Xamarin iOS Classic projects to Unified

    Xamarin.TestCloud.Integration 1.0 Early preview of Xamarin Test Cloud integration

    Friday, May 22, 2015 10:49 AM
  • User125615 posted

    Same issue here... last Visual Studio 2013 / Xamarin versions...

    I'm not sure to understand, can I downgrade to a specific (stable) version ? My priority is to debug my simple app... If yes, wich one ?

    Thanks Julien

    Tuesday, May 26, 2015 1:00 PM
  • User13824 posted

    The most common recent cause of this issue (as it turns out, that the VS debugger is waiting for the soft debugger to return thread information, when in fact the soft debugger isn't always able to provide that information for every thread) is now fixed as of the current Beta and Alpha channel builds of XamarinVS.

    See the release thread for Visual Studio (currently announced in the VS forum): http://forums.xamarin.com/discussion/37275/stable-release-xamarinvs-3-11-445-new-features-and-bug-fixes/p1

    Bug 29133 - [XamarinVS] [iOS] [Android] Visual Studio hangs when debugging some iOS and Android applications that use multiple threads. Now fixed in the Alpha and Beta channels.

    That thread also lists downgrade links for the previous stable versions if you'd prefer to downgrade rather than switch to the current Beta.

    Wednesday, May 27, 2015 6:09 AM
  • User128295 posted

    Xamarin, I am having this issue as well, this is very disappointing. This issue is killing my productivity BIG TIME. On top of that, I also have intermittent issue connecting to iOS Build Host. I hope these issues get fixed ASAP.

    Sunday, May 31, 2015 4:38 AM
  • User132166 posted

    I have the same thing!

    Monday, June 1, 2015 8:23 PM
  • User50108 posted

    @BrendanZagaeski , you should release this kind of bug fixes right away, without waiting for another stable release. This is a really big issues which kills the productivity; at the beginning the developer just restart VS, then restart his computer, then check for solutions over Internet and hopefully they get here - but the solution is hard to be found and this kills the productivity; Xamarin definitely NEEDS to change the strategy for the regressions, especially these kind of regressions. We pay money and we expect quality for the payed money. Right now I had a problem with my computer, I had to reinstall the OS. Then I installed the current version of Xamarin, then downgrade. I should have installed the right version, not a bugged one then downgrade. This is absolutely unprofessional from your side. So, please do something and fix this for your customers.

    Tuesday, June 2, 2015 9:00 AM
  • User13824 posted

    At least in theory, yes, it probably would have been possible to release a hotfix for this specific issue directly to the Stable channel earlier than today (the service release that contains the fix for Bug 29133 is being promoted to the Stable channel at this very moment). That said, deciding whether a particular bug should be hotfixed is complicated. For example, in this case if Xamarin had released a hotfix just for Bug 29133, it still would have left Bug 29628 un-fixed, so customers would have still run into a problem where breakpoints would not work within PCL projects referenced by iOS apps.

    Releasing any fix directly to the Stable channel also increases the risk that the fix might introduce a new regression that hasn't yet been discovered. It could possibly even make things worse than the original problem. On top of that, each additional hotfix release extends the timeline for releasing the next "full" bugfix release. (In this particular example, a hotfix release for Bug 29133 would have further delayed today's Stable "service release," delaying the release of many additional fixes for regressions in the original 3.11.445 release.).

    To present an alternate hypothesis, perhaps the bigger problem in this case is that bugs like Bug 29133 (and Bug 29628 for that matter) should be detectable by the Xamarin Alpha and Beta testing process before they ever hit Stable. See my comment on the 3.11.445 release thread for the extent of my knowledge about Xamarin's efforts to mitigate the number of similar situations in the future: http://forums.xamarin.com/discussion/comment/121989/#Comment_121989.

    There are also on-going efforts to improve the visibility of known issues in the Stable Channel releases. The forum release announcements are the first step in that direction.

    Tuesday, June 2, 2015 7:12 PM
  • User53128 posted

    I got around this issue quite a while ago by switching to the Beta feed. Has been working great here for a few weeks now. I'm running:

    Microsoft Visual Studio Professional 2012 Version 11.0.61030.00 Update 4 Microsoft .NET Framework Version 4.5.51209

    Installed Version: Professional

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

    Xamarin.Android 5.1.2.0 (2485523223ffb88567f101866d5f73da7a37ca53) Visual Studio plugin to enable development for Xamarin.Android.

    Xamarin.Forms Intellisense 1.0 Provides intellisense for Xamarin.Forms in the XML editor.

    Xamarin.iOS 8.10.1.0 (b39367de851067678f8b6fe4ab8a37ff97515cf8) Visual Studio extension to enable development for Xamarin.iOS.

    Xamarin.iOS Unified Migration 1.0 Automated migration for Xamarin iOS Classic projects to Unified

    Xamarin.TestCloud.Integration 1.0 Early preview of Xamarin Test Cloud integration

    Thursday, June 4, 2015 4:08 PM
  • User84071 posted

    I am plagued by this issue. I keep the Windows Task Manager open just so I can more easily kill Visual Studio. This is no way to live.

    I solved it for about 12 hours by switching to the Alpha feed, but then something must have changed in Alpha and my app would no longer get passed the Splash Screen, so back to the "Stable" version that freezes Visual Studio every other time I deploy via debug. "Stable"

    I'll try the Beta version. But am I really paying Xamarin to be a Beta tester?

    Friday, June 26, 2015 7:51 PM
  • User53128 posted

    Yup. I'm in the same boat and I've been asked to test two beta builds in the last two days alone due to my issues.

    I'm getting ready to ask for damn refund, I currently feel like an external extension of the Xamarin test team ... paying to be part of that team ...

    Saturday, June 27, 2015 8:56 AM
  • User60652 posted

    I am sure my problem is related. My Visual Studio is hanging for minutes (user interface turns gray). But it happens even when I am working on solutions with no Xamarin projects. The only difference between me and my team members (who do not have that issue) is that I have the Xamarin plugins installed (Xamarin 3.11.590.0 and Xamarin.Android 5.1.3.1).

    Is there any easy way to disable/enable them in Visual Studio?

    Best regards Nyrup

    Thursday, July 2, 2015 7:06 AM
  • User161480 posted

    Same issue. Need to kill Visual Studio 2015 after running the XamarinFormsSample... (I'm far away from developing complex apps..)

    Did work with Xamarin.iOS and Xamarin.Android sample without problem.

    Switching to Beta did NOT resolved the problem. :expressionless: Switching to Alpha channel finally resolved the problem, but I have to wait for a very long time some time after Visual Studio to get back on track.

    Monday, October 19, 2015 3:15 PM
  • User68480 posted

    My VS is hanging again when trying to debug using VS. The same apps debug correctly in XS. However, to add in the mix, XS cannot manage Nuget 3.0/VS 2015 PCLs because of what seems to be a stalemate regarding netcore targeting issues with NuGet and Xamarin Studio. So, now I have to close XS to manage NuGet packages in VS, and then I close VS and reopen in XS to be able to debug. Since I am developing my own PCLs, this is my dev cycle for every single change:

    1. Make change in custom PCL.
    2. Close app solution in Xamarin Studio.
    3. Open app solution in VS > Manage Nuget packages > update PCL.
    4. Close app solution in VS and reopen in Xamarin Studio.
    5. Debug in XS.

    Fortunately, just using Xamarin awesomeness is saving me a ton of work in the first place, so I'm still ahead of the game. But these kinds of dev cycle problems between VS and XS do get frustrating sometimes.

    EDIT: I should note that this is not with the XAP, but with VS (debugger set to Xamarin Debugger) on a physical device (Samsung S4) via adb TCP.

    Wednesday, December 9, 2015 4:03 PM
  • User68480 posted

    In addition to the physical device via adb TCP, the VS Android Emulator on my host (via adb TCP) also hangs. Xamarin Studio works well with this emulator as well.

    Wednesday, December 9, 2015 5:10 PM
  • User210506 posted

    I'm starting to have this issue now and I am on the beta release. The first run of the app always works but subsequent runs always freeze Visual Studio. The last message in the Build output window is: C:\Program Files (x86)\Android\android-sdk\platform-tols\adb.exe -s [ipaddress] shell getprop ro.product.cpu.abi. Visual Studio is completely locked up. I have to go to task manager to kill the process and run it again.

    Friday, May 6, 2016 2:40 AM
  • User57846 posted

    I am currently having the same problem. Please fix it as it is very annoying. Need to kill visual studio every 15 minutes.

    Monday, May 9, 2016 7:10 AM
  • User13824 posted

    Thanks!

    Monday, May 9, 2016 8:07 PM
  • User284361 posted

    Same problem, just delete bin and obj folder, that's worked for me...

    Friday, December 16, 2016 1:26 AM
  • User288484 posted

    Same problem, some times it works fine for a long time but some days I can't debug apk at all

    Wednesday, February 15, 2017 5:24 PM