Bug 13171 - UpdateAndroidResgen freezes when processing some resources in F# projects
Summary: UpdateAndroidResgen freezes when processing some resources in F# projects
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Tools and Addins ()
Version: 4.7.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2013-07-11 05:34 UTC by Stéphane Di Prizio
Modified: 2013-07-12 11:58 UTC (History)
1 user (show)

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


Attachments
Test case project (34.87 KB, application/zip)
2013-07-12 03:55 UTC, Stéphane Di Prizio
Details


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:
Status:
RESOLVED FIXED

Description Stéphane Di Prizio 2013-07-11 05:34:21 UTC
In some circumstances, when you add resources to a F# Xamarin.Android project, building or updating resources causes the build process to freeze at the _UpdateAndroidResgen step.

Xamarin Studio Alpha 4.1.5 build 2
Xamarin.Android 4.7.11 (Business Edition)

Step to reproduce the bug :
- Clone https://github.com/xamarin/monodroid-samples.git
- In the ActionBarPullRefresh solution, add an Ice Cream Sandwich application
- Set the Target Framework Android 4.0.3 (the default is set to Android 2 and it won't build if not set to ICS)
- Add a reference to ActionBarPullRefresh binding lib project
- Build
... it freezes

When you look at the error log, it hangs at the _UpdateAndroidResgen step.

Tried to check compile with MSBuild/XBuild -> freeze
Tried with Xamarin Studio Windows -> freeze.

When you compile the project in the terminal with xbuild ... it works.
Comment 2 Atsushi Eno 2013-07-12 01:55:39 UTC
A few days ago topgenorth noticed and figured out what was causing some build issue in ActionBarPullToRefresh. It contained some F# ProjectTypeGuid while it is entirely C# project.
https://github.com/xamarin/monodroid-samples/commit/61bdcdc

I guess there was some glitch in XS when I created it and does not seem to exist nowadays.

Hence I believe it builds now (as the commit log says so). Please reopen if it still doesn't.
Comment 3 Stéphane Di Prizio 2013-07-12 03:55:49 UTC
Created attachment 4332 [details]
Test case project

Test case project. Play with the F# project resources (add / edit / remove some resources to force the IDE to rebuild resources.designer.fs). At some point (two or three steps usually) it hangs.
I left a file in the value-fr folder that can be added removed for test purpose.
Comment 4 Stéphane Di Prizio 2013-07-12 04:10:02 UTC
Eno: The bug you mentioned is related to VS which cannot open some Xamarin Mac OS library projects due to incompatible projects GUIDs.

My reports is related to resource processing. I made some other tests using the ActionBarPullRefresh resources embedded in an F# project (see attachment), and thus eliminating any C# or library import problems.
If you play with resources it hangs after a random number of modifications. The IDE is still responsive, but after one action (ex. Quit), the IDE freezes completely. If you force quit and reopen the project, it will build, but any resource modifications ends with a freeze at some point.

Note that I used Xamarin Studio MAC OS version.

Log example :

Build started 12/07/2013 09:55:24.
__________________________________________________
Project "" (UpdateAndroidResources target(s)):
	
	Target _ComputeAndroidResourcePaths:
		  ResourceFiles:
		    Resources/layout/Main.axml
		    Resources/values/Strings.xml
		    Resources/drawable/Icon.png
		    Resources/drawable/ptr_progress_horizontal_holo_center.xml
		    Resources/drawable/ptr_progress_indeterminate_horizontal_holo.xml
		    Resources/drawable-hdpi/ptr_progress_primary_holo.9.png
		    Resources/drawable-hdpi/ptr_progressbar_indeterminate_holo1.png
		    Resources/drawable-hdpi/ptr_progressbar_indeterminate_holo2.png
		    Resources/drawable-hdpi/ptr_progressbar_indeterminate_holo3.png
		    Resources/drawable-hdpi/ptr_progressbar_indeterminate_holo4.png
		    Resources/drawable-hdpi/ptr_progressbar_indeterminate_holo5.png
		    Resources/drawable-hdpi/ptr_progressbar_indeterminate_holo6.png
		    Resources/drawable-hdpi/ptr_progressbar_indeterminate_holo7.png
		    Resources/drawable-hdpi/ptr_progressbar_indeterminate_holo8.png
		    Resources/drawable-xhdpi/ptr_progress_primary_holo.9.png
		    Resources/drawable-xhdpi/ptr_progressbar_indeterminate_holo1.png
		    Resources/drawable-xhdpi/ptr_progressbar_indeterminate_holo2.png
		    Resources/drawable-xhdpi/ptr_progressbar_indeterminate_holo3.png
		    Resources/drawable-xhdpi/ptr_progressbar_indeterminate_holo4.png
		    Resources/drawable-xhdpi/ptr_progressbar_indeterminate_holo5.png
		    Resources/drawable-xhdpi/ptr_progressbar_indeterminate_holo6.png
		    Resources/drawable-xhdpi/ptr_progressbar_indeterminate_holo7.png
		    Resources/drawable-xhdpi/ptr_progressbar_indeterminate_holo8.png
		    Resources/layout/default_header.axml
		    Resources/values/pull_refresh_strings.xml
		    Resources/values/styles.xml
		    Resources/layout/test.axml
		  IntermediateFiles:
	
	Target _GenerateAndroidResourceDir:
		Copying file from '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/Resources/layout/Main.axml' to '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/layout/main.xml'
		Copying file from '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/Resources/values/Strings.xml' to '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/values/strings.xml'
		Copying file from '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/Resources/drawable/ptr_progress_horizontal_holo_center.xml' to '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable/ptr_progress_horizontal_holo_center.xml'
		Copying file from '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/Resources/drawable/ptr_progress_indeterminate_horizontal_holo.xml' to '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable/ptr_progress_indeterminate_horizontal_holo.xml'
		Copying file from '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/Resources/layout/default_header.axml' to '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/layout/default_header.xml'
		Copying file from '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/Resources/values/pull_refresh_strings.xml' to '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/values/pull_refresh_strings.xml'
		Copying file from '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/Resources/values/styles.xml' to '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/values/styles.xml'
		Copying file from '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/Resources/layout/test.axml' to '/Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/layout/test.xml'
	
	Target _ResolveMonoAndroidSdks:
		MonoAndroid Tools: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/
		MonoAndroid Framework: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/platforms/android-14;/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1
		MonoAndroid Binaries: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/
		Android Platform API level: 14
		TargetFrameworkVersion: v4.0
		Android NDK: /
		Android SDK: /Users/sdiprizio/Library/Developer/Xamarin/android-sdk-mac_x86/
		Android SDK Build Tools: /Users/sdiprizio/Library/Developer/Xamarin/android-sdk-mac_x86/platform-tools/
		Java SDK: /usr/
	
	Target _ValidateAndroidPackageProperties:
		GetAndroidPackageName Task
		  ManifestFile: /Users/sdiprizio/Mono/ResGenHang/ResGenHang/Properties/AndroidManifest.xml
		  AssemblyName: ResGenHang
		  PackageName: ResGenHang.ResGenHang
	
	Target _BuildDependencies:
		Resolved library outputs: 
	
	Target _ExtractLibraryProjectImports:
		  Assemblies: 
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/mscorlib.dll
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.dll
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.Xml.dll
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/FSharp.Core.dll
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/platforms/android-14/Mono.Android.dll
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.Core.dll
		  Jars: 
		  ResolvedResourceDirectories: 
	
	Target _GetLibraryImports:
		  NativeLibraries: 
		  Jars: 
	
	Target _CheckDuplicateJavaLibraries:
		  JavaSourceFiles:
		  JavaLibraries:
	
	Target _GetAdditionalResourcesFromAssemblies:
		  Assemblies: 
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/mscorlib.dll
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.dll
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.Xml.dll
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/FSharp.Core.dll
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/platforms/android-14/Mono.Android.dll
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.Core.dll
	
	Target _UpdateAndroidResgen:
		  AdditionalResourceDirectories: 
		Tool /Users/sdiprizio/Library/Developer/Xamarin/android-sdk-mac_x86/platform-tools/aapt execution started with arguments: package -f -m -M /var/folders/0q/25gk16cn7mnd9l0drkr_0zkh0000gn/T/xgqioqvo.mgt/AndroidManifest.xml -J /var/folders/0q/25gk16cn7mnd9l0drkr_0zkh0000gn/T/xgqioqvo.mgt --custom-package resgenhang.resgenhang -F /var/folders/0q/25gk16cn7mnd9l0drkr_0zkh0000gn/T/xgqioqvo.mgt/resources.apk.bk -S obj/Debug/res/ -I /Users/sdiprizio/Library/Developer/Xamarin/android-sdk-mac_x86/platforms/android-14/android.jar --auto-add-overlay 
		  AdditionalResourceDirectories:
		  Resources:
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/layout/main.xml
		      [layout/Main.axml]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/values/strings.xml
		      [values/Strings.xml]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable/icon.png
		      [drawable/Icon.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable/ptr_progress_horizontal_holo_center.xml
		      [drawable/ptr_progress_horizontal_holo_center.xml]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable/ptr_progress_indeterminate_horizontal_holo.xml
		      [drawable/ptr_progress_indeterminate_horizontal_holo.xml]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-hdpi/ptr_progress_primary_holo.9.png
		      [drawable-hdpi/ptr_progress_primary_holo.9.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-hdpi/ptr_progressbar_indeterminate_holo1.png
		      [drawable-hdpi/ptr_progressbar_indeterminate_holo1.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-hdpi/ptr_progressbar_indeterminate_holo2.png
		      [drawable-hdpi/ptr_progressbar_indeterminate_holo2.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-hdpi/ptr_progressbar_indeterminate_holo3.png
		      [drawable-hdpi/ptr_progressbar_indeterminate_holo3.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-hdpi/ptr_progressbar_indeterminate_holo4.png
		      [drawable-hdpi/ptr_progressbar_indeterminate_holo4.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-hdpi/ptr_progressbar_indeterminate_holo5.png
		      [drawable-hdpi/ptr_progressbar_indeterminate_holo5.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-hdpi/ptr_progressbar_indeterminate_holo6.png
		      [drawable-hdpi/ptr_progressbar_indeterminate_holo6.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-hdpi/ptr_progressbar_indeterminate_holo7.png
		      [drawable-hdpi/ptr_progressbar_indeterminate_holo7.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-hdpi/ptr_progressbar_indeterminate_holo8.png
		      [drawable-hdpi/ptr_progressbar_indeterminate_holo8.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-xhdpi/ptr_progress_primary_holo.9.png
		      [drawable-xhdpi/ptr_progress_primary_holo.9.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-xhdpi/ptr_progressbar_indeterminate_holo1.png
		      [drawable-xhdpi/ptr_progressbar_indeterminate_holo1.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-xhdpi/ptr_progressbar_indeterminate_holo2.png
		      [drawable-xhdpi/ptr_progressbar_indeterminate_holo2.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-xhdpi/ptr_progressbar_indeterminate_holo3.png
		      [drawable-xhdpi/ptr_progressbar_indeterminate_holo3.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-xhdpi/ptr_progressbar_indeterminate_holo4.png
		      [drawable-xhdpi/ptr_progressbar_indeterminate_holo4.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-xhdpi/ptr_progressbar_indeterminate_holo5.png
		      [drawable-xhdpi/ptr_progressbar_indeterminate_holo5.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-xhdpi/ptr_progressbar_indeterminate_holo6.png
		      [drawable-xhdpi/ptr_progressbar_indeterminate_holo6.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-xhdpi/ptr_progressbar_indeterminate_holo7.png
		      [drawable-xhdpi/ptr_progressbar_indeterminate_holo7.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/drawable-xhdpi/ptr_progressbar_indeterminate_holo8.png
		      [drawable-xhdpi/ptr_progressbar_indeterminate_holo8.png]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/layout/default_header.xml
		      [layout/default_header.axml]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/values/pull_refresh_strings.xml
		      [values/pull_refresh_strings.xml]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/values/styles.xml
		      [values/styles.xml]
		    /Users/sdiprizio/Mono/ResGenHang/ResGenHang/obj/Debug/res/layout/test.xml
		      [layout/test.axml]
		  References:
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/mscorlib.dll
		      []
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.dll
		      []
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.Xml.dll
		      []
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/FSharp.Core.dll
		      []
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/platforms/android-14/Mono.Android.dll
		      []
		    /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1/System.Core.dll
		      []
		  - Remapping resource: Drawable.icon -> drawable/Icon
		  - Remapping resource: Drawable.ptr_progress_horizontal_holo_center -> drawable/ptr_progress_horizontal_holo_center
		  - Remapping resource: Drawable.ptr_progress_indeterminate_horizontal_holo -> drawable/ptr_progress_indeterminate_horizontal_holo
		  - Not remapping resource: Drawable.ptr_progress_primary_holo
		  - Remapping resource: Drawable.ptr_progressbar_indeterminate_holo1 -> drawable/ptr_progressbar_indeterminate_holo1
		  - Remapping resource: Drawable.ptr_progressbar_indeterminate_holo2 -> drawable/ptr_progressbar_indeterminate_holo2
		  - Remapping resource: Drawable.ptr_progressbar_indeterminate_holo3 -> drawable/ptr_progressbar_indeterminate_holo3
		  - Remapping resource: Drawable.ptr_progressbar_indeterminate_holo4 -> drawable/ptr_progressbar_indeterminate_holo4
		  - Remapping resource: Drawable.ptr_progressbar_indeterminate_holo5 -> drawable/ptr_progressbar_indeterminate_holo5
		  - Remapping resource: Drawable.ptr_progressbar_indeterminate_holo6 -> drawable/ptr_progressbar_indeterminate_holo6
		  - Remapping resource: Drawable.ptr_progressbar_indeterminate_holo7 -> drawable/ptr_progressbar_indeterminate_holo7
		  - Remapping resource: Drawable.ptr_progressbar_indeterminate_holo8 -> drawable/ptr_progressbar_indeterminate_holo8
		  - Not remapping resource: Id.myButton
		  - Not remapping resource: Id.progressBar1
		  - Not remapping resource: Id.ptr_content
		  - Not remapping resource: Id.ptr_progress
		  - Not remapping resource: Id.ptr_text
		  - Not remapping resource: Id.ptr_text_opaque_bg
		  - Not remapping resource: Id.quickContactBadge1
		  - Remapping resource: Layout.default_header -> layout/default_header
		  - Remapping resource: Layout.main -> layout/Main
		  - Remapping resource: Layout.test -> layout/test
		  - Not remapping resource: String.app_name
		  - Not remapping resource: String.hello
		  - Not remapping resource: String.pull_to_refresh_pull_label
		  - Not remapping resource: String.pull_to_refresh_refreshing_label
		  - Not remapping resource: String.pull_to_refresh_release_label
		  - Not remapping resource: Style.Widget_PullToRefresh_ProgressBar_Horizontal_Center
Comment 5 Atsushi Eno 2013-07-12 11:58:23 UTC
Thanks for clarification of the bug scope. I could reproduce and fix the issue for the next release.