Bug 56730 - Android blank screen async OnCreate
Summary: Android blank screen async OnCreate
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-05-22 17:58 UTC by Andrew
Modified: 2017-06-26 15:00 UTC (History)
4 users (show)

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


Attachments
Sample app (134.07 KB, application/zip)
2017-05-22 17:58 UTC, Andrew
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 for Bug 56730 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Andrew 2017-05-22 17:58:08 UTC
Created attachment 22363 [details]
Sample app

I added a Task.Delay(1000) to simulate a delay in launching the Forms Screen.  If you remove this, there is no blank screen before loading the main forms page is loaded. 

It seems to be if OnCreate is async and takes too long loading, you get a blank screen before the application loads. 

If I remove "async" and run everything sync it works.  

Sample attached.

Xamarin Forms: 2.3.4.247



=== Visual Studio Enterprise 2017 for Mac ===

Version 7.0 (build 3146)
Installation UUID: 92386895-40cc-4380-bd33-d471ee0a8590
Runtime:
	Mono 5.0.0.100 (2017-02/9667aa6) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 500000100

=== NuGet ===

Version: 4.0.0.2323

=== .NET Core ===

Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/4.8.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.4
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.Android ===

Version: 7.3.1.1 (Visual Studio Enterprise)
Android SDK: /Users/mccorma/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		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)
		5.1    (API level 22)
		6.0    (API level 23)
		7.0    (API level 24)
		7.1    (API level 25)

SDK Tools Version: 26.0.2
SDK Platform Tools Version: 25.0.5
SDK Build Tools Version: 25.0.3

Java SDK: /usr
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Not Installed

=== Xamarin.Mac ===

Version: 3.4.0.33 (Visual Studio Enterprise)

=== Xamarin.iOS ===

Version: 10.10.0.33 (Visual Studio Enterprise)
Hash: 3e5ac5ff
Branch: d15-2
Build date: 2017-05-05 18:11:38-0400

=== Build Information ===

Release ID: 700003146
Git revision: 7553fda2e327d15807298d444007896e5b975dba
Build date: 2017-05-09 12:12:36-04
Xamarin addins: c3d580752be79fc902422f1d55d1cdc2d8b98799
Build lane: monodevelop-lion-d15-2

=== Operating System ===

Mac OS X 10.11.6
Darwin 15.6.0 Darwin Kernel Version 15.6.0
    Tue Apr 11 16:00:51 PDT 2017
    root:xnu-3248.60.11.5.3~1/RELEASE_X86_64 x86_64
Comment 1 Paul DiPietro [MSFT] 2017-05-30 03:33:13 UTC
Also occurs against the nightly build.
Comment 2 adrianknight89 2017-06-24 16:32:14 UTC
Can you put your delay in SplashActivity instead?

protected override async void OnResume ()
{
    base.OnResume ();
    await Task.Delay(10000); // for 10 secs
    LoadMainActivity();
}

I'm not sure why it's not working for MainActivity.
Comment 3 Andrew 2017-06-26 15:00:01 UTC
I went to all sync. Reported it because it was a bug.