Bug 42214 - Project crashes with NRE in Main.cs - Xamarin Studio
Summary: Project crashes with NRE in Main.cs - Xamarin Studio
Status: RESOLVED DUPLICATE of bug 40911
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-06-28 16:28 UTC by man_xam
Modified: 2016-08-26 22:08 UTC (History)
3 users (show)

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


Attachments

Description man_xam 2016-06-28 16:28:16 UTC
iOS project Main.cs - on line:  UIApplication.Main(args, null, "AppDelegate");
Xamarin Studio
on Mac El Capitan 10.11

System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Forms.Platform.iOS.Platform.DidAppear () [0x0000d] in <filename unknown>:0
  at Xamarin.Forms.Platform.iOS.PlatformRenderer.ViewDidAppear (Boolean animated) [0x00006] in <filename unknown>:0
  at at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/src/UIKit/UIApplication.cs:79
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/src/UIKit/UIApplication.cs:63
  at ContactManager.iOS.Application.Main (System.String[] args) [0x00008] in /Users/apple1/Downloads/aws-dynamodb-sdk-3.1.0.1/samples/AWSSDK.DynamoDB.Sample/ContactManager.iOS/Main.cs:17


Sample link:
https://www.dropbox.com/s/3qsur35hk5as7uj/samples.zip?dl=0

Steps to reproduce:

1. Download sample from dropbox and run in xamarin studio
2. Run iOS sample on simulator
3. enter FB credentials.
4. After login, you should see blank list of contact
5. App crashes with null reference.
Comment 1 man_xam 2016-06-28 19:03:54 UTC
More details about the app:

This is a simple MyContacts app provided with AWS SDK. This app authenticates user with Facebook and then displays data from contacts table hosted on AWS Cloud (DynamoDB). App crashes right after authentication. Interestingly this app works on my old iPhone5 but crashes on iPad 9.0 (newer iPad) also crashes on IPhone simulator. I tried to rebuild another sample with different table but encountered same issue. 

Thanks for your help.
Comment 2 man_xam 2016-06-28 22:26:49 UTC
Sample link updated (zip created on Mac):
https://www.dropbox.com/s/fjz9qd4fdrmbs6l/samples.zip?dl=0
Comment 3 E.Z. Hart [MSFT] 2016-07-07 20:00:02 UTC
With the provided test application, I am unable to reproduce the issue. After entering FB credentials, the following error appears:

"App Not Setup: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions."
Comment 4 man_xam 2016-07-07 20:28:47 UTC
Thanks for looking into it. Do you have a FB email so I can grant you permission to the app? Alternatively I will send you a private message with temporary credentials. What is your email ID?
Comment 5 tyjen 2016-07-20 06:33:24 UTC
I am having the same problem with my app. I started using the Auth0 component in my Xamarin Forms app on iOS and Android. Everything works fine in Android and iOS simulator, but crashes on a real device every single time. :(
Comment 6 E.Z. Hart [MSFT] 2016-08-26 22:08:59 UTC
This is the same bug as reported in https://bugzilla.xamarin.com/show_bug.cgi?id=40911 - the repro project in 40911 demonstrates the issue without having to hit an outside service (e.g., Facebook).

*** This bug has been marked as a duplicate of bug 40911 ***

Note You need to log in before you can comment on or make changes to this bug.