Bug 42815 - MasterDetail Resources+NotFoundException:
Summary: MasterDetail Resources+NotFoundException:
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 42813 42816 48862 ()
Depends on:
Blocks:
 
Reported: 2016-07-26 20:01 UTC by abel_vilalta
Modified: 2017-11-30 06:03 UTC (History)
16 users (show)

Tags: AC
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 for Bug 42815 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description abel_vilalta 2016-07-26 20:01:17 UTC
Hi,

I have this bug on a MasterDetail that appears when I move from a page with a  MasterDetail  control to a page which hasn't...Specifically I have a start page, then I move to a MasterDetail page, and then I go back to that initial page. The error on resource not is misleading since all resources are there but something happens on the disposal of the MasterDetail. 

Unfortunatelly I tried to reproduce that on a simple project with the same flow but I wasn't able to do it...Looks something related particular to my project...



[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] Android.Content.Res.Resources+NotFoundException: Unable to find resource ID #0x2
[MonoDroid]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
[MonoDroid]   at Java.Interop.JniEnvironment+InstanceMethods.CallBooleanMethod (JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00084] in /Users/builder/data/lanes/3415/7db2aac3/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11304 
[MonoDroid]   at Android.Runtime.JNIEnv.CallBooleanMethod (IntPtr jobject, IntPtr jmethod) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:114 
[MonoDroid]   at Android.Support.V4.App.FragmentManagerInvoker.ExecutePendingTransactions () [0x00033] in <filename unknown>:0 
[MonoDroid]   at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.Dispose (Boolean disposing) [0x00083] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:126 
[MonoDroid]   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:203 
[MonoDroid]   at Xamarin.Forms.Platform.Android.MasterDetailContainer.DisposeChildRenderers () [0x0000f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:105 
[MonoDroid]   at Xamarin.Forms.Platform.Android.MasterDetailContainer.Dispose (Boolean disposing) [0x00009] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:81 
[MonoDroid]   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:203 
[MonoDroid]   at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.Dispose (Boolean disposing) [0x0003a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:171 
[MonoDroid]   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:203 
[MonoDroid]   at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x0003f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:224 
[MonoDroid]   at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.InternalSetPage (Xamarin.Forms.Page page) [0x0001a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:343 
[MonoDroid]   at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.AppOnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs args) [0x00012] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:296 
[MonoDroid]   at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\BindableObject.cs:137 
[MonoDroid]   at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Element.cs:370 
[MonoDroid]   at Xamarin.Forms.Application.set_MainPage (Xamarin.Forms.Page value) [0x0008b] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Application.cs:88 
[MonoDroid]   at SocialDare.Portable.AppLoader+<ResetStack>d__9.MoveNext () [0x000c3] in C:\git\SocialDare.Portable\AppLoader.cs:164 
[MonoDroid] --- End of stack trace from previous location where exception was thrown ---
[MonoDroid]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
[MonoDroid]   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
[MonoDroid]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
[MonoDroid]   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
[MonoDroid]   at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
[MonoDroid]   at SocialDare.Portable.App+<>c__DisplayClass5_0+<<OnResume>b__3>d.MoveNext () [0x00026] in C:\git\SocialDare.Portable\App.xaml.cs:132 
[MonoDroid] --- End of stack trace from previous location where exception was thrown ---
[MonoDroid]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
[MonoDroid]   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (System.Object state) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
[MonoDroid]   at Android.App.SyncContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:18 
[MonoDroid]   at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36 
[MonoDroid]   at Java.Lang.IRunnableInvoker.n_Run (IntPtr jnienv, IntPtr native__this) [0x00009] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.IRunnable.cs:81 
[MonoDroid]   at (wrapper dynamic-method) System.Object:a74b78c3-63be-4b91-af01-b38759f5790b (intptr,intptr)
[MonoDroid]   --- End of managed exception stack trace ---
[MonoDroid] android.content.res.Resources$NotFoundException: Unable to find resource ID #0x2
[MonoDroid] 	at android.content.res.Resources.getResourceName(Resources.java:1773)
[MonoDroid] 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1059)
[MonoDroid] 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
[MonoDroid] 	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)
[MonoDroid] 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
[MonoDroid] 	at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:570)
[MonoDroid] 	at android.support.v7.app.AlertDialog_IDialogInterfaceOnClickListenerImplementor.n_onClick(Native Method)
[MonoDroid] 	at android.support.v7.app.AlertDialog_IDialogInterfaceOnClickListenerImplementor.onClick(AlertDialog_IDialogInterfaceOnClickListenerImplementor.java:30)
[MonoDroid] 	at android.support.v7.app.AlertController$ButtonHandler.handleMessage(AlertController.java:157)
[MonoDroid] 	at android.os.Handler.dispatchMessage(Handler.java:102)
[MonoDroid] 	at android.os.Looper.loop(Looper.java:136)
[MonoDroid] 	at android.app.ActivityThread.main(ActivityThread.java:5017)
[MonoDroid] 	at java.lang.reflect.Method.invokeNative(Native Method)
[MonoDroid] 	at java.lang.reflect.Method.invoke(Method.java:515)
[MonoDroid] 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
[MonoDroid] 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
[MonoDroid] 	at dalvik.system.NativeStart.main(Native Method)
[Xamarin.Insights] Warning: Unhandled exception: Android.Content.Res.Resources+NotFoundException: Unable to find resource ID #0x2
[Xamarin.Insights]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
[Xamarin.Insights]   at Java.Interop.JniEnvironment+InstanceMethods.CallBooleanMethod (JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00084] in /Users/builder/data/lanes/3415/7db2aac3/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11304 
[Xamarin.Insights]   at Android.Runtime.JNIEnv.CallBooleanMethod (IntPtr jobject, IntPtr jmethod) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:114 
[Xamarin.Insights]   at Android.Support.V4.App.FragmentManagerInvoker.ExecutePendingTransactions () [0x00033] in <filename unknown>:0 
[Xamarin.Insights]   at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.Dispose (Boolean disposing) [0x00083] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:126 
[Xamarin.Insights]   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:203 
[Xamarin.Insights]   at Xamarin.Forms.Platform.Android.MasterDetailContainer.DisposeChildRenderers () [0x0000f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:105 
[Xamarin.Insights]   at Xamarin.Forms.Platform.Android.MasterDetailContainer.Dispose (Boolean disposing) [0x00009] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:81 
[Xamarin.Insights]   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:203 
[Xamarin.Insights]   at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.Dispose (Boolean disposing) [0x0003a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:171 
[Xamarin.Insights]   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:203 
[Xamarin.Insights]   at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x0003f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:224 
[Xamarin.Insights]   at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.InternalSetPage (Xamarin.Forms.Page page) [0x0001a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:343 
[Xamarin.Insights]   at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.AppOnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs args) [0x00012] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:296 
[Xamarin.Insights]   at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\BindableObject.cs:137 
[Xamarin.Insights]   at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Element.cs:370 
[Xamarin.Insights]   at Xamarin.Forms.Application.set_MainPage (Xamarin.Forms.Page value) [0x0008b] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Application.cs:88 
[Xamarin.Insights]   at SocialDare.Portable.AppLoader+<ResetStack>d__9.MoveNext () [0x000c3] in C:\git\SocialDare.Portable\AppLoader.cs:164 
[Xamarin.Insights] --- End of stack trace from previous location where exception was thrown ---
[Xamarin.Insights]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
[Xamarin.Insights]   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/Tas
[Mono] DllImport searching in: '__Internal' ('(null)').
[Mono] Searching for 'java_interop_jnienv_get_long_field'.
[Mono] Probing 'java_interop_jnienv_get_long_field'.
[Mono] Found as 'java_interop_jnienv_get_long_field'.
[Mono] DllImport searching in: '__Internal' ('(null)').
[Mono] Searching for 'java_interop_jnienv_call_long_method_a'.
[Mono] Probing 'java_interop_jnienv_call_long_method_a'.
[Mono] Found as 'java_interop_jnienv_call_long_method_a'.
**SOCIALDARE MAIN ACTIVITY EXCEPTION**
Android.Content.Res.Resources+NotFoundException: Unable to find resource ID #0x2
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
  at Java.Interop.JniEnvironment+InstanceMethods.CallBooleanMethod (JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00084] in /Users/builder/data/lanes/3415/7db2aac3/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11304 
  at Android.Runtime.JNIEnv.CallBooleanMethod (IntPtr jobject, IntPtr jmethod) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:114 
  at Android.Support.V4.App.FragmentManagerInvoker.ExecutePendingTransactions () [0x00033] in <filename unknown>:0 
  at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.Dispose (Boolean disposing) [0x00083] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:126 
  at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:203 
  at Xamarin.Forms.Platform.Android.MasterDetailContainer.DisposeChildRenderers () [0x0000f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:105 
  at Xamarin.Forms.Platform.Android.MasterDetailContainer.Dispose (Boolean disposing) [0x00009] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:81 
  at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:203 
[Mono] [0xba3fc608] hill climbing, change max number of threads 4
  at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.Dispose (Boolean disposing) [0x0003a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:171 
  at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:203 
  at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x0003f] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:224 
  at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.InternalSetPage (Xamarin.Forms.Page page) [0x0001a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:343 
  at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.AppOnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs args) [0x00012] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:296 
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\BindableObject.cs:137 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Element.cs:370 
  at Xamarin.Forms.Application.set_MainPage (Xamarin.Forms.Page value) [0x0008b] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Application.cs:88 
  at SocialDare.Portable.AppLoader+<ResetStack>d__9.MoveNext () [0x000c3] in C:\git\SocialDare.Portable\AppLoader.cs:164 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at SocialDare.Portable.App+<>c__DisplayClass5_0+<<OnResume>b__3>d.MoveNext () [0x00026] in C:\git\SocialDare.Portable\App.xaml.cs:132 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (System.Object state) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
  at Android.App.SyncContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:18 
  at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36 
  at Java.Lang.IRunnableInvoker.n_Run (IntPtr jnienv, IntPtr native__this) [0x00009] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.IRunnable.cs:81 
  at (wrapper dynamic-method) System.Object:a74b78c3-63be-4b91-af01-b38759f5790b (intptr,intptr)
  --- End of managed exception stack trace ---
android.content.res.Resources$NotFoundException: Unable to find resource ID #0x2
	at android.content.res.Resources.getResourceName(Resources.java:1773)
	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1059)
	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)
	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
	at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:570)
	at android.support.v7.app.AlertDialog_IDialogInterfaceOnClickListenerImplementor.n_onClick(Native Method)
	at android.support.v7.app.AlertDialog_IDialogInterfaceOnClickListenerImplementor.onClick(AlertDialog_IDialogInterfaceOnClickListenerImplementor.java:30)
	at android.support.v7.app.AlertController$ButtonHandler.handleMessage(AlertController.java:157)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:136)
	at android.app.ActivityThread.main(ActivityThread.java:5017)
	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:779)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
	at dalvik.system.NativeStart.main(Native Method)



Thanks
Comment 1 abel_vilalta 2016-07-26 20:07:06 UTC
*** Bug 42816 has been marked as a duplicate of this bug. ***
Comment 2 Rui Marinho 2016-08-10 15:53:30 UTC
Thank you for taking the time to submit the bug. We tried to reproduce the issue you reported but were unable given the description. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue, we would very much appreciate it.

For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d 

Warm regards, 

Xamarin Forms Team
Comment 3 abel_vilalta 2016-08-19 14:33:19 UTC
Hi,

Like I said I tried to reproduce on a simple project, with no luck...Looks like is something really nested when setting the master page to a normal one (through MainPage) and then the dispose of the Master fails for whatever the underlying reason it is...

Thx
Comment 4 Tim Brand 2016-09-20 08:55:15 UTC
I'm also experiencing this issue, at least in Release mode. In Debug mode the issue does not occur.

Not having more information at the moment, this is from my logcat:

09-20 10:50:59.133 22924 22924 W ResourceType: No package identifier when getting name for resource number 0x00000002
09-20 10:50:59.133 22924 22924 D AndroidRuntime: Shutting down VM
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: Warning: Unhandled exception: Android.Content.Res.Resources+NotFoundException: Unable to find resource ID #0x2
09-20 10:50:59.173 22924 22924 W Xamarin.Insights:   --- End of managed Android.Content.Res.Resources+NotFoundException stack trace ---
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: android.content.res.Resources$NotFoundException: Unable to find resource ID #0x2
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at android.content.res.Resources.getResourceName(Resources.java:2329)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1059)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at android.os.Handler.handleCallback(Handler.java:739)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at android.os.Handler.dispatchMessage(Handler.java:95)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at android.os.Looper.loop(Looper.java:148)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at android.app.ActivityThread.main(ActivityThread.java:5461)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at java.lang.reflect.Method.invoke(Native Method)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
09-20 10:50:59.173 22924 22924 W Xamarin.Insights: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
09-20 10:50:59.251 22924 22924 W rtment.myapp: type=1400 audit(0.0:18342): avc: denied { read } for name="mem" dev="debugfs" ino=10438807 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0
09-20 10:50:59.251 22924 22924 W rtment.myapp: type=1400 audit(0.0:18343): avc: denied { read } for name="mem" dev="debugfs" ino=10438807 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0
09-20 10:50:59.341 22924 22924 E AndroidRuntime: FATAL EXCEPTION: main
09-20 10:50:59.341 22924 22924 E AndroidRuntime: Process: com.app_artment.klasbord, PID: 22924
09-20 10:50:59.341 22924 22924 E AndroidRuntime: Theme: themes:{}
09-20 10:50:59.341 22924 22924 E AndroidRuntime: android.content.res.Resources$NotFoundException: Unable to find resource ID #0x2
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at android.content.res.Resources.getResourceName(Resources.java:2329)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1059)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5461)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
09-20 10:50:59.341 22924 22924 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Comment 5 davide 2016-10-04 06:04:13 UTC
It took a while to figure out but now the issue is quite simple to reproduce and from my finding it start happening when adding a NavigationPage on the Master or Detail property of the MasterDetail page.

An example solution can be found here: https://dl.dropboxusercontent.com/u/136135/ReproducingBug.zip

Hope this helps.

Davide
Comment 7 Giusepe Casagrande 2016-10-12 15:00:14 UTC
There's any workaround?

This is a real problem to me as I'm about to release and I can't pass the login on Android.
Comment 8 adrianknight89 2016-11-26 20:58:05 UTC
Davide,

I can't download the project. Looks like the link is down. Can you attach it here instead?

Possibly related fixes:

https://github.com/xamarin/Xamarin.Forms/pull/527
https://github.com/xamarin/Xamarin.Forms/pull/505
Comment 9 davide 2016-11-28 10:26:24 UTC
Adrian sorry, I put the file back
Comment 10 Stephane Delcroix 2017-01-25 08:29:16 UTC
*** Bug 42813 has been marked as a duplicate of this bug. ***
Comment 11 Marek Habersack 2017-03-27 20:07:31 UTC
*** Bug 48862 has been marked as a duplicate of this bug. ***
Comment 12 ivo.ventura88 2017-05-18 14:34:23 UTC
Any update on this issue ? Any workaround ?
Comment 13 Marek Mierzwa 2017-06-02 09:05:26 UTC
Do you have any updates on this issue?
Comment 14 abel_vilalta 2017-06-10 13:04:07 UTC
Hi,

Im am the original poster of this bug...It's been almost an year since this bug was posted... My app still crashes like Chris McBride explains on the duplicate Bug 48862 description.... 

I'd be nice at least to have some answers from you Xamarin guys about ETA's on this...

Thanks
Comment 15 Pete Schmitz 2017-09-04 16:57:59 UTC
We have a few users that have (very infrequently) crashed with similar stacktraces -

System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<13d2410763c843bc9957e51ebcad3f79>:0
Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod(JniObjectReference instance, JniObjectReference type, JniMethodInfo method, JniArgumentValue* args)<3e6e1843d2bf46fcb7b11f325ac5ce17>:0
Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod(string encodedMember, IJavaPeerable self, JniArgumentValue* parameters)<3e6e1843d2bf46fcb7b11f325ac5ce17>:0
Android.App.Activity.OnDestroy()<64737d66512249258078769b90f016cb>:0
Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnDestroy()<3364a2d206a142d8a54cb7a9b77626da>:0
iSurvey.Android.MainActivity.OnDestroy()<e70e56afa672485c8753d0d0cb0b3fec>:0
Android.App.Activity.n_OnDestroy(IntPtr jnienv, IntPtr native__this)<64737d66512249258078769b90f016cb>:0
at (wrapper dynamic-method) System.Object:c268f80a-278e-4cda-9221-0a71e021ae14 (intptr,intptr)
--- End of managed Java.Lang.RuntimeException stack trace ---
android.content.res.Resources$NotFoundException: Unable to find resource ID #0xd
at android.content.res.Resources.getResourceName(Resources.java:2238)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1059)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at android.support.v4.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:2082)
at android.support.v4.app.FragmentController.dispatchDestroy(FragmentController.java:244)
at android.support.v4.app.FragmentActivity.onDestroy(FragmentActivity.java:369)
at android.support.v7.app.AppCompatActivity.onDestroy(AppCompatActivity.java:193)
iSurvey.Android.MainActivity.n_onDestroy(Native Method)
at iSurvey.Android.MainActivity.onDestroy(MainActivity.java:114)
at android.app.Activity.performDestroy(Activity.java:6430)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1165)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3855)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3886)
at android.app.ActivityThread.-wrap5(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1411)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5459)
java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Comment 16 Chris McBride 2017-11-08 00:57:23 UTC
This is still one of our top Insights crashes. It sounds like there is a simple repro cases (as reported by Davide) has there been any headway on this bug?