Bug 35197 - Android crash at start up in release
Summary: Android crash at start up in release
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.5.1
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-10-23 09:09 UTC by Dagfinn
Modified: 2016-04-13 19:09 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 Dagfinn 2015-10-23 09:09:02 UTC
We are getting the exception below when the android version of the app starts when the MainActivity inherits from FormsApplicationActivity, but not when it inherits from Activty. It also only occurs in Release mode, both with and without linking. What could be causing this?

Process: com.companyname.norskprisbook.droid, PID: 1613
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
	at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:515)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
	... 2 more
Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x00027>
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (object) <0x0002b>
at Android.App.SyncContext/<Post>c__AnonStorey0.<>m__0 () <0x0001b>
at Java.Lang.Thread/RunnableImplementor.Run () <0x00027>
at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) <0x00034>
at (wrapper dynamic-method) object.a93de828-fd35-4aba-8fb7-ddfc8de3bc12 (intptr,intptr) <0x0001f>
	at mono.java.lang.RunnableImplementor.n_run(Native Method)
	at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29)
	at android.os.Handler.handleCallback(Handler.java:733)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:136)
	at android.app.ActivityThread.main(ActivityThread.java:5001)
	... 5 more
Comment 1 Paul DiPietro [MSFT] 2015-10-26 14:11:20 UTC
Could you possibly upload a reproduction project as well as system information in order to help investigate the issue?
Comment 2 Samantha Houts [MSFT] 2016-04-13 19:09:41 UTC
Thank you for your bug report. As we have not received the information requested, we cannot properly triage your bug and are marking it resolved.

Warm regards,
Xamarin Forms Team