Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I have a program which makes reasonable usage of async/await and worked up until last Thursday 10-Feb-2015.
Suddenly the entire app is crashing out from every option on the main menu, and awaits don't seem to be working as they did before. I've dissected an activity and ran it down to the following section of code:
public async override void OnAttachedToWindow ()
await RefreshList ();
GenerateMenu(); //Point C
RootElement Root1=new RootElement("Productives");
List<string> employeesClockedOn=new List<string>();
if (employees != null & employeesClockedOn != null)
foreach (EmployeeListEmployee e in employees)
SelectProductiveTableCell newElement=new SelectProductiveTableCell(e,employeesClockedOn.Contains(e.Name), UpdateMenu, SelectedEmployeeCallBack);
this.Root = Root1;
async Task<bool> RefreshList()
WorkingAlert working=new WorkingAlert();
await working.Show("Syncing Data, Please Wait."); //Point A
List<EmployeeListEmployee> newEmployees=await GetEmployeesAsync(); //Point B
Intent intent=new Intent(this,typeof(YesNoAlert));
What was happening before last Thursday was that at point A the system would await the showing of an alertdialog, then when the async call returned the program would continue processing at point B. Execution would continue through the RefreshList function, retrieving the data from the server, saving the data and regenerating the menu (or displaying an error and showing the previous info, if any is available).
From Thursday onwards, what is happening is that at point A the system would await the showing of an alertdialog, then when the async call returned the program would continue processing at point C - way up the call stack at OnAttachedToWindow, not as expected at point B. As a result, we attempt to generate the menu before we have any data (and possibly may never even attempt to retrieve data, as all the code from point B onwards is not run). My iOS version does not exhibit the same issues with awaits, when the awaited async call returns it returns back to the next line following the await.
Delete bin/obj folders
Delete app from device
Delete runtime from device
Uninstalling/Reinstalling Android SDK using Xamarins Installer
Reverting to previous versions of SDK-Tools
I have tried to reproduce this issue but unable to reproduce the reported behavior at my end.
Could you please provide the sample test app with the bug so that I can reproduce the reported behavior at our end?
Also provide the IDE Log, Android Device Log, Build Info and Application Output along with Exception.
IDE Log via Help-> Open Log Directory.
Android Device Log via->View-> Android Log.
Build Info:Xamarin Studio-> About Xamarin Studio-> Show Details.
=== Xamarin Studio ===
Version 5.7.1 (build 17)
Installation UUID: 93e693b0-b53d-40f4-b29c-b61ff5cbe892
Mono 3.12.0 ((detached/de2f33f)
GTK+ 2.24.23 (Raleigh theme)
Package version: 312000076
=== Apple Developer Tools ===
Xcode 6.1 (6604)
=== Xamarin.Mac ===
Version: 126.96.36.199 (Enterprise Edition)
=== Xamarin.Android ===
Version: 188.8.131.52 (Enterprise Edition)
Android SDK: /Users/xamarin23/Desktop/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
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_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
=== Xamarin.iOS ===
Version: 184.108.40.206 (Enterprise Edition)
Build date: 2015-02-11 04:37:05-0500
=== Build Information ===
Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0
=== Operating System ===
Mac OS X 10.10.0
Darwin 800BC.local 14.0.0 Darwin Kernel Version 14.0.0
Fri Sep 19 00:26:44 PDT 2014
I tried this morning to make a sample app but couldn't get the issue to replicate outside of the current project.
I've since found an issue elsewhere in my code - Type.GetEvents is returning 0 events on types known to have events, my code didn't trap for this - and it seems that is now causing an exception within many of the async events (it's in a pop-up dialog which is used in many places), and it's this exception that's causing it to jump about on its call stack a fair bit.
As it stands, I think this bug report should be closed, I'm pretty sure the bug as described is being caused by something else, and I'm looking into the something else.
Closing as per comment #2.