Bug 45033 - Stack trace issues / Cycle 8
Summary: Stack trace issues / Cycle 8
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 10.0 (iOS10)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2016-10-05 00:30 UTC by manuel
Modified: 2016-12-23 05:59 UTC (History)
4 users (show)

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

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 manuel 2016-10-05 00:30:06 UTC
After upgrading to cycle 8 we've been experiencing some apparent issue with stack trace report. It is also possible that something new in our code is trigging this issue...
Nevertheless, something is crashing our app when we hide a controller and show another, which can execute a lot of different code. 

We do receive always the same stack trace:

System.NullReferenceException: Object reference not set to an instance of an object

  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/src/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/src/UIKit/UIApplication.cs:63 
  at XXXX.Application.Main (System.String[] args) [0x00009] in #####/Main.cs:87 

Note : Main.cs 87 is UIApplication.Main (args, null, "AppDelegate");




=== Xamarin Studio Community ===

Version 6.1.1 (build 15)
Installation UUID: c9aeb0c6-dfdc-4b35-ae00-01c52d42790e
	Mono 4.6.1 (mono-4.6.0-branch-c8sr0/abb06f1) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406010005

=== NuGet ===


=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: (Xamarin Studio Community)
Android SDK: /Users/XXXX/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)

SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

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)

Android Designer EPL code available here:

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 8.0 (11246)
Build 8A218a

=== Xamarin.Mac ===

Version: (Xamarin Studio Community)

=== Xamarin.iOS ===

Version: (Xamarin Studio Community)
Hash: ad1cd42
Branch: cycle8-sr0-xi
Build date: 2016-10-03 15:18:44-0400

=== Build Information ===

Release ID: 601010015
Git revision: fa52f02641726146e2589ed86ec4097fbe101888
Build date: 2016-09-22 08:03:02-04
Xamarin addins: 75d65712af93d54dc39ae4c42b21dfa574859fd6
Build lane: monodevelop-lion-cycle8-sr0

=== Operating System ===

Mac OS X 10.12.0
Darwin Manuels-MBP.home 16.0.0 Darwin Kernel Version 16.0.0
    Mon Aug 29 17:56:20 PDT 2016
    root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64
Comment 1 Timothy Risi 2016-10-05 18:31:54 UTC
Most likely something is happening on a different thread (e.g. async). Both the device logs and the (symbolicated) crash reports should have more details on where this happened.
Comment 2 manuel 2016-10-05 18:46:04 UTC
It is happening on main thread and not background. For example, if we do this

public override void ViewWillAppear (bool animated)
	base.ViewWillAppear (animated);

	throw new Exception("Dummy");

we will receive a System.Exception "Dummy" with no stack trace.

If we do it on Thread pool like, for example,

public async override void ViewWillAppear (bool animated)
	base.ViewWillAppear (animated);

	await Task.Run(()=>{
		throw new Exception("Dummy");


stack is reported as expected.
Comment 3 Manuel de la Peña [MSFT] 2016-10-13 12:33:38 UTC
Hello Manuel,

Do you have a small sample app that happens to reproduce the issue? I have written a dummy one and I was not able to do it.
Comment 4 Alex Soto [MSFT] 2016-12-23 05:59:16 UTC
We have not received the requested information. If you are still 
experiencing this issue please provide all the requested information 
and re-open the bug report. Thanks!
Comment 5 Alex Soto [MSFT] 2016-12-23 05:59:40 UTC
We have not received the requested information. If you are still 
experiencing this issue please provide all the requested information 
and re-open the bug report. Thanks!