Bug 42358 - Can't debug crashes in Java.Interop
Summary: Can't debug crashes in Java.Interop
Status: RESOLVED ANSWERED
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-07-05 14:55 UTC by Jeremy Kolb
Modified: 2017-07-07 20:51 UTC (History)
2 users (show)

Tags:
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:
Status:
RESOLVED ANSWERED

Description Jeremy Kolb 2016-07-05 14:55:51 UTC
I am investigating https://github.com/MvvmCross/MvvmCross/issues/1379 by debugging the application located at https://github.com/Noires/MvxSIGSEVTest.

I can reproduce the crash in the bug but the application simply dies with:

07-05 10:31:12.649 E/mono-rt ( 9480): Stacktrace:
07-05 10:31:12.649 E/mono-rt ( 9480): 
07-05 10:31:12.649 E/mono-rt ( 9480):   at <unknown> <0xffffffff>
07-05 10:31:12.649 E/mono-rt ( 9480):   at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a (intptr,intptr&,intptr,intptr,intptr,Java.Interop.JniArgumentValue*) <IL 0x00010, 0x000bf>
07-05 10:31:12.649 E/mono-rt ( 9480):   at Java.Interop.JniEnvironment/InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference,Java.Interop.JniObjectReference,Java.Interop.JniMethodInfo,Java.Interop.JniArgumentValue*) [0x0008f] in /Users/builder/data/lanes/3415/7db2aac3/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12079
07-05 10:31:12.649 E/mono-rt ( 9480):   at Java.Interop.JniPeerMembers/JniInstanceMethods.InvokeNonvirtualVoidMethod (string,Java.Interop.IJavaPeerable,Java.Interop.JniArgumentValue*) [0x00022] in /Users/builder/data/lanes/3415/7db2aac3/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:41
07-05 10:31:12.649 E/mono-rt ( 9480):   at Android.Widget.TextView.set_TextFormatted (Java.Lang.ICharSequence) [0x0001e] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Widget.TextView.cs:2787
07-05 10:31:12.649 E/mono-rt ( 9480):   at Android.Widget.TextView.set_Text (string) [0x00013] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Widget.TextView.cs:2798
07-05 10:31:12.649 E/mono-rt ( 9480):   at MvxSIGSEVTest.Droid.MvxTextViewTextTargetBinding2.SetValueImpl (object,object) [0x00010] in C:\Projects\test\MvxSIGSEVTest\MvxSIGSEVTest\MvxSIGSEVTest.Droid\Setup.cs:132
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (object) [0x00088] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\Target\MvxConvertingTargetBinding.cs:61
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.MvxFullBinding/<>c__DisplayClass23_0.<UpdateTargetFromSource>b__0 () [0x0000f] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\MvxFullBinding.cs:176
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Droid.Views.MvxAndroidMainThreadDispatcher.RequestMainThreadAction (System.Action) <IL 0x0001f, 0x001a3>
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (object,System.Threading.CancellationToken) [0x0004f] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\MvxFullBinding.cs:169
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.MvxFullBinding.<CreateSourceBinding>b__19_0 (object,System.EventArgs) [0x00018] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\MvxFullBinding.cs:98
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.SourceSteps.MvxSourceStep.SendSourcePropertyChanged () [0x00000] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\SourceSteps\MvxSourceStep.cs:117
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.SourceSteps.MvxCombinerSourceStep.SubStepOnChanged (object,System.EventArgs) [0x00000] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\SourceSteps\MvxCombinerSourceStep.cs:107
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.SourceSteps.MvxSourceStep.SendSourcePropertyChanged () [0x00000] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\SourceSteps\MvxSourceStep.cs:117
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.SourceSteps.MvxPathSourceStep.SourceBindingOnChanged (object,System.EventArgs) [0x00000] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\SourceSteps\MvxPathSourceStep.cs:73
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.Source.MvxSourceBinding.FireChanged () [0x00000] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\Source\MvxSourceBinding.cs:35
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.Source.Leaf.MvxLeafPropertyInfoSourceBinding.OnBoundPropertyChanged () [0x00000] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\Source\Leaf\MvxLeafPropertyInfoSourceBinding.cs:29
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Binding.Bindings.Source.MvxPropertyInfoSourceBinding.SourcePropertyChanged (object,System.ComponentModel.PropertyChangedEventArgs) [0x00020] in C:\vcs\git\MvvmCross\MvvmCross\Core\Binding\Bindings\Source\MvxPropertyInfoSourceBinding.cs:88
07-05 10:31:12.650 E/mono-rt ( 9480):   at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object_object (object,intptr,intptr,intptr) <IL 0x0005d, 0x00146>
07-05 10:31:12.650 E/mono-rt ( 9480):   at <unknown> <0xffffffff>
07-05 10:31:12.650 E/mono-rt ( 9480):   at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <IL 0x00016, 0x000b4>
07-05 10:31:12.650 E/mono-rt ( 9480):   at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00038] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
07-05 10:31:12.650 E/mono-rt ( 9480):   at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/reflection/methodbase.cs:229
07-05 10:31:12.650 E/mono-rt ( 9480):   at MvvmCross.Platform.WeakSubscription.MvxWeakEventSubscription`2<TSource_REF, TEventArgs_REF>.OnSourceEvent (object,TEventArgs_REF) [0x0000f] in C:\vcs\git\MvvmCross\MvvmCross\Platform\Platform\WeakSubscription\MvxWeakEventSubscription.cs:75
07-05 10:31:12.650 E/mono-rt ( 9480):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00073, 0x00151>
07-05 10:31:12.651 E/mono-rt ( 9480):   at MvvmCross.Core.ViewModels.MvxNotifyPropertyChanged/<>c__DisplayClass10_0.<RaisePropertyChanged>b__0 () <IL 0x0001c, 0x000eb>
07-05 10:31:12.651 E/mono-rt ( 9480):   at MvvmCross.Droid.Views.MvxAndroidMainThreadDispatcher.RequestMainThreadAction (System.Action) <IL 0x0001f, 0x001a3>
07-05 10:31:12.651 E/mono-rt ( 9480):   at MvvmCross.Platform.Core.MvxMainThreadDispatchingObject.InvokeOnMainThread (System.Action) [0x00000] in C:\vcs\git\MvvmCross\MvvmCross\Platform\Platform\Core\MvxMainThreadDispatchingObject.cs:18
07-05 10:31:12.651 E/mono-rt ( 9480):   at MvvmCross.Core.ViewModels.MvxNotifyPropertyChanged.RaisePropertyChanged (System.ComponentModel.PropertyChangedEventArgs) <IL 0x00044, 0x00347>
07-05 10:31:12.651 E/mono-rt ( 9480):   at MvvmCross.Core.ViewModels.MvxNotifyPropertyChanged.RaisePropertyChanged (string) <IL 0x00009, 0x000e4>
07-05 10:31:12.651 E/mono-rt ( 9480):   at MvvmCross.Core.ViewModels.MvxNotifyPropertyChanged.RaisePropertyChanged<int> (System.Linq.Expressions.Expression`1<System.Func`1<int>>) <IL 0x0000a, 0x000bb>
07-05 10:31:12.651 E/mono-rt ( 9480):   at MvxSIGSEVTest.Models.ListItem.set_Count (int) [0x00008] in C:\Projects\test\MvxSIGSEVTest\MvxSIGSEVTest\MvxSIGSEVTest\Models\ListItem.cs:19
07-05 10:31:12.651 E/mono-rt ( 9480):   at MvxSIGSEVTest.ViewModels.RecyclerViewTestViewModel2.Update () [0x00036] in C:\Projects\test\MvxSIGSEVTest\MvxSIGSEVTest\MvxSIGSEVTest\ViewModels\RecyclerViewTestViewModel2.cs:45
07-05 10:31:12.651 E/mono-rt ( 9480):   at MvxSIGSEVTest.Droid.Fragments.RecyclerViewTestFragment2.OnViewCreated (Android.Views.View,Android.OS.Bundle) [0x0000a] in C:\Projects\test\MvxSIGSEVTest\MvxSIGSEVTest\MvxSIGSEVTest.Droid\Fragments\RecyclerViewTestFragment2.cs:29
07-05 10:31:12.651 E/mono-rt ( 9480):   at Android.Support.V4.App.Fragment.n_OnViewCreated_Landroid_view_View_Landroid_os_Bundle_ (intptr,intptr,intptr,intptr) <IL 0x0001c, 0x0018a>
07-05 10:31:12.651 E/mono-rt ( 9480):   at (wrapper dynamic-method) object.c5a94ab7-49de-4fb4-b43b-8a3f87d3479d (intptr,intptr,intptr,intptr) <IL 0x0001d, 0x00041>
07-05 10:31:12.651 E/mono-rt ( 9480):   at (wrapper native-to-managed) object.c5a94ab7-49de-4fb4-b43b-8a3f87d3479d (intptr,intptr,intptr,intptr) <IL 0x00020, 0x000bb>
07-05 10:31:12.651 E/mono-rt ( 9480):   at <unknown> <0xffffffff>
07-05 10:31:12.651 E/mono-rt ( 9480):   at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_call_boolean_method (intptr,intptr&,intptr,intptr) <IL 0x0000c, 0x000ad>
07-05 10:31:12.651 E/mono-rt ( 9480):   at Java.Interop.JniEnvironment/InstanceMethods.CallBooleanMethod (Java.Interop.JniObjectReference,Java.Interop.JniMethodInfo) [0x0006b] in /Users/builder/data/lanes/3415/7db2aac3/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11300
07-05 10:31:12.651 E/mono-rt ( 9480):   at Android.Runtime.JNIEnv.CallBooleanMethod (intptr,intptr) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:114
07-05 10:31:12.651 E/mono-rt ( 9480):   at Android.Support.V4.App.FragmentManagerInvoker.ExecutePendingTransactions () <IL 0x00038, 0x00187>
07-05 10:31:12.651 E/mono-rt ( 9480):   at MvvmCross.Droid.Support.V4.MvxCachingFragmentPagerAdapter.FinishUpdate (Android.Views.ViewGroup) <IL 0x00022, 0x0013f>
07-05 10:31:12.651 E/mono-rt ( 9480):   at Android.Support.V4.View.PagerAdapter.n_FinishUpdate_Landroid_view_ViewGroup_ (intptr,intptr,intptr) <IL 0x00013, 0x0012f>
07-05 10:31:12.651 E/mono-rt ( 9480):   at (wrapper dynamic-method) object.4563bd99-1d1d-4fd0-99d2-84eddb16d46f (intptr,intptr,intptr) <IL 0x00017, 0x00039>
07-05 10:31:12.651 E/mono-rt ( 9480):   at (wrapper native-to-managed) object.4563bd99-1d1d-4fd0-99d2-84eddb16d46f (intptr,intptr,intptr) <IL 0x0001f, 0x000b2>
07-05 10:31:12.651 E/mono-rt ( 9480): 
07-05 10:31:12.651 E/mono-rt ( 9480): Attempting native Android stacktrace:
07-05 10:31:12.651 E/mono-rt ( 9480): 


The debugger will not catch the exception and there doesn't appear to be a way to get any more information out of this crash.  I had hoped that installing the Xamarin debug runtime from Tools -> Options would help but it didn't make a difference.

Is there any way to get more information out of what causes this crash?  Too often Xamarin apps simply exit and there's no way to debug further.
Comment 1 Cody Beyer (MSFT) 2017-07-07 20:51:34 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Android. You should be able to dig in with the full open source Xamarin.Android

https://github.com/xamarin/xamarin-android