Bug 17616 - [LLVM] async method with optional parameters don't complete execution (on real device)
Summary: [LLVM] async method with optional parameters don't complete execution (on rea...
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 7.0.6.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 7.2.1
Assignee: Bugzilla
Depends on:
Reported: 2014-02-05 11:01 UTC by Victor H. Maksimenko
Modified: 2014-03-21 06:00 UTC (History)
7 users (show)

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

test prj (6.39 KB, application/zip)
2014-02-05 11:04 UTC, Victor H. Maksimenko

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 Victor H. Maksimenko 2014-02-05 11:01:14 UTC
Hello there,

Since Xamarin.iOS 7.0.6, there seems to be a problem with execution of async methods that have optional parameters. 

This only occurs when testing on a real device... on the simulator it works as expected.

On Xamarin.iOS < 7.0.5, it also works as expected on a real device & the simulator

I'm attaching a simple test project that shows the problem.

Below is my About Xamarin Studio info (I'm currently on Stable Channel, but it also occurs on Beta & Alpha channels)

=== Xamarin Studio ===

Version 4.2.2 (build 2)
Installation UUID: 6a437fa0-502a-46be-bd1e-508d7177f4c8
	Mono 3.2.6 ((no/9b58377)
	GTK+ 2.24.23 theme: Raleigh
	GTK# (
	Package version: 302060000

=== Apple Developer Tools ===

Xcode 5.0.2 (3335.32)
Build 5A3005

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.10.2 (Indie Edition)
Android SDK: /Users/mm/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1 (API level 7)
		3.1 (API level 12)
		4.3 (API level 18)
		4.4 (API level 19)
Java SDK: /usr
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

=== Xamarin.iOS ===

Version: (Indie Edition)
Hash: 2ed9bc9
Build date: 2014-21-01 06:33:05-0500

=== Build Information ===

Release ID: 402020002
Git revision: c5f82958ae7d9af652b44b87ceff777b3ad19b91
Build date: 2013-11-19 15:35:40+0000
Xamarin addins: a4044fee09138f6fd031a9944b7caaeb51e57e80

=== Operating System ===

Mac OS X 10.9.2
Darwin Vics-MBP.local 13.1.0 Darwin Kernel Version 13.1.0
    Thu Jan 16 19:40:37 PST 2014
    root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
Comment 1 Victor H. Maksimenko 2014-02-05 11:04:21 UTC
Created attachment 5981 [details]
test prj
Comment 2 Prashant manu 2014-02-06 03:19:33 UTC
We have checked this on Device & simulator and observing same behavior.
It is showing Section Title screen correctly. Screencast for this:

Checked on device iPhone 5C.

Also could you please provide us the error details/screenshot for the same and which device you used?

Environment Info:
XS 4.2.2 (build 2)
Comment 3 Victor H. Maksimenko 2014-02-06 16:54:05 UTC

Sorry, I didn't mention that the error doesn't happens when the configuration is Debug. 

It only happens on the device when the configuration is set to Release or Ad-Hoc.  In the simulator it works on every configuration.

I've tested on two iPhone 5 (both A1428), one with 7.1 (beta 4-5), and one with 7.0.4.

In the test project (Release / Ad-Hoc), it just stays at the black 'Launch Image' (and it then returns to the springboard).

On real, more complex projects, it just pushes the uitableviewcontroller and then it just appears that the async method with optional param wasn't even called. In one project it doesn't even show the 'please wait" hud (BTProgressHUD) that's at the start of the async method... and in other project it doesn't show the activity indicator that is set as the uitableview footer when the async method starts...

Hope this info helps...

Let me know if you need any additional information.
Comment 4 Prashant manu 2014-02-07 04:26:38 UTC
We checked attached testprj with release configuration on device and getting errors as mentioned in comment 3.  

Checked with device: iPhone 4 (iOS 7.0)

Supplement info: 
iOS Device Log: https://gist.github.com/saurabh360/4cbbe4cd192b027b0651
Crash Report: https://gist.github.com/AkhileshKumar01/c9559b4053374c523508

Environment Info:
XS 4.2.2 (build 2)
Comment 5 Rolf Bjarne Kvinge [MSFT] 2014-02-11 06:06:33 UTC
This works once I disable LLVM in the release configuration.

Zoltan, can you have a look?

If you get an immediate startup crash, try to disable SGen (something seems to be broken in the latest mono version).
Comment 6 Zoltan Varga 2014-02-17 18:35:31 UTC
Should be fixed by mono 3f72288f578d4384c54066b878e2470be3ad886d/mt 06c31f622417d913ad013ee48423f7160fa9670c.
Comment 7 Rolf Bjarne Kvinge [MSFT] 2014-02-19 08:47:01 UTC
I can confirm this is fixed.
Comment 8 Shruti 2014-03-21 05:45:41 UTC
I have verified this fix with test project attached in comment 1. It has been tested in Release/Debug/Ad-Hoc configuration with enable and disable LLVM. It is working fine.

Environment Info:
XS 4.2.4 (build 32) 

Hence, Closing this issue.
Comment 9 Shruti 2014-03-21 06:00:16 UTC
Added comment for device, missing in comment8.

Test project has been tested with device iPhone-s.