Bug 53585 - aapt.exe is continuously spawning and freezing Visual Studio 2015 IDE
Summary: aapt.exe is continuously spawning and freezing Visual Studio 2015 IDE
Status: RESOLVED DUPLICATE of bug 53817
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bill Holmes
Depends on:
Reported: 2017-03-20 20:36 UTC by Jeremy Kolb
Modified: 2017-03-23 00:55 UTC (History)
7 users (show)

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

Xamarin Logs (1.72 KB, application/x-zip-compressed)
2017-03-20 20:36 UTC, Jeremy Kolb

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 or GitHub 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 Jeremy Kolb 2017-03-20 20:36:30 UTC
When I open a project the IDE is constantly freezing.  Bringing up the Windows Taks Manager shows aapt.exe spawning every 10 or so seconds, running for another 10 and hogging CPU.  It will continuously respond for minutes at a time.
Comment 1 Jeremy Kolb 2017-03-20 20:36:45 UTC
Created attachment 20474 [details]
Xamarin Logs
Comment 2 Jeremy Kolb 2017-03-20 20:42:00 UTC
Not only does this block the IDE but if I'm running Update-Package -reinstall in the nuget console the output will be blocked by apt.exe continuously responing. HOWEVER if I manage to kill apt.exe before it completes in the task manager it will move progress along.  It does not appear to progress until I kill at least one of the apt processes.
Comment 5 David Warburton 2017-03-22 18:23:56 UTC
I'm having the same issue on VS2017.  Aapt.exe is called about 20 times on our project when either (a) the solution is loaded or (b) when starting the debugger on Android.  Note that during the actual build & deploy phase of our APK it's only called once.  When VS goes into the cycle of calling aapt.exe over and over again, it's called each time with the same parameters differing only in the path of the temp directory the output is targeting. 

The results of this aapt.exe execution are not used during these cycles, I'm working around the problem by replacing aapt.exe with a stub that does nothing but return 0 from main().  I put the stub in place when loading the solution or starting the debugger, and swap it back to the real one during build, and this works fine. Without the stub, VS will lock up for 5 minutes or so when entering this cycle.
Comment 6 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-23 00:55:55 UTC
I was able to replicate this symptom locally today in a small sample test case and was able to verify a candidate fix from Bug 52967, Comment 23 in that scenario.

I filed a new bug to provide a clean description of the current status of that particular issue.  I will tentatively mark this bug as a duplicate for bookkeeping.  If the original reporter of this bug (from Comment 0) sees similar performance issues after updating to Xamarin.Build.Download 0.4.3-beta2 or higher, please do reply back with additional details about what might be different in your project compared to the test case on Bug 53817.  If possible, please also collect a sample minidump or two from the busy instance of Visual Studio (similar to Bug 53817, Comment 1).  You can then set the bug status to REOPENED.  Thanks!

(If any other user who is not the original reporter from Comment 0 sees similar performance issues after updating the NuGet package, please file submit a new bug with the details.  Thanks!)

*** This bug has been marked as a duplicate of bug 53817 ***