Bug 27126 - WaitAll doesn't allow for animation to finish
Summary: WaitAll doesn't allow for animation to finish
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.3
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-17 04:38 UTC by Johan Karlsson
Modified: 2015-05-28 16:00 UTC (History)
4 users (show)

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


Attachments
Reproduction project (173.89 KB, application/zip)
2015-02-17 04:39 UTC, Johan Karlsson
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 INVALID

Description Johan Karlsson 2015-02-17 04:38:38 UTC
Using Xamarin Forms Animation Extensions for VisualElement and iOS 8.1.

If you define animation tasks and try to WaitAll using Task.WaitAll the animation freezes halfway through.

Reprod

1. Unzip the attached sample project
2. Run the project on iOS 8.1
3. Click the button
4. Animation freezes
Comment 1 Johan Karlsson 2015-02-17 04:39:36 UTC
Created attachment 9867 [details]
Reproduction project
Comment 2 Udham Singh 2015-02-17 05:34:07 UTC
I have checked this issue with the help of steps given in bug and able to reproduce the reported behaviour. Please refer the screencast : http://www.screencast.com/t/rJ8X3qARF

Ide Log : https://gist.github.com/Udham1/5294afc5084c5d4408f9
System Log : https://gist.github.com/Udham1/6fa83f3ec4fdde573a5a

Note : I have observed same behaviour (Animation freezes) for both android and iOS app.

Environment Info :

Xamarin.Forms : 1.3.4. 6331-pre4

=== Xamarin Studio ===

Version 5.7.2 (build 1)
Installation UUID: ce927b2a-2c07-44c5-b186-09cfdafba6dc
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/xamarin76/Desktop/android-sdk-macosx
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.2.19 (Business Edition)
Hash: d508c8e
Branch: 
Build date: 2015-02-15 22:17:46-0500

=== Xamarin.Mac ===

Version: 1.12.0.4 (Business Edition)

=== Build Information ===

Release ID: 507020001
Git revision: 103486e2547553077836a5ba20a973487b983830
Build date: 2015-02-13 11:56:36-05
Xamarin addins: 8dd5b934e86ef0595c022dd3930fd40e3376ab4c

=== Operating System ===

Mac OS X 10.9.5
Darwin Xamarin76s-Mac-mini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 3 Udham Singh 2015-02-17 05:40:47 UTC
An update to the above comment : 
iOS Designer Log : https://gist.github.com/Udham1/bf4e4cb37d4429756353
Comment 4 Seth Rosetter 2015-05-28 15:59:13 UTC
Your implementation is currently blocking the UI thread.

This implementation should help resolve your issue, assuming you would like the animations to execute at the same time and ensure their completion at a specific point.

theButton.Clicked += async (object sender, EventArgs e) => {
	var t1 = theButton.TranslateTo(-10, -150, 2000);
	var t2 = theButton.FadeTo(0, 2000);

	await Task.WhenAll(t1, t2);
	System.Diagnostics.Debug.WriteLine ("Completed!");
};

Hope this helps!

- Seth