MvvmCross: set_TextFormatted leads to app crash
Steps to reproduce
- We have multiple bindings.
- Raise property change for them is raised with high frequency (~50-100ms)
- Rotations of the device lead from time to time to app crash with exception listed below.
Expected behavior
Device rotation doesn’t lead to app crash
Actual behavior
Application is crashed with error:
   at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a (intptr,intptr&,intptr,intptr,intptr,Java.Interop.JniArgumentValue*) <0x00053>
   at Java.Interop.JniEnvironment/InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference,Java.Interop.JniObjectReference,Java.Interop.JniMethodInfo,Java.Interop.JniArgumentValue*) <0x000ab>
   at Java.Interop.JniPeerMembers/JniInstanceMethods.InvokeNonvirtualVoidMethod (string,Java.Interop.IJavaPeerable,Java.Interop.JniArgumentValue*) <0x0009f>
   at Android.Widget.TextView.set_TextFormatted (Java.Lang.ICharSequence) <0x00137>
   at Android.Widget.TextView.set_Text (string) <0x00057>
   at MvvmCross.Binding.Droid.Target.MvxTextViewTextTargetBinding.SetValueImpl (object,object) <0x00087>
   at MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (object) <0x001c7>
   at MvvmCross.Binding.Bindings.MvxFullBinding/<>c__DisplayClass24_0.<UpdateTargetFromSource>b__0 () <0x000d7>
   at MvvmCross.Droid.Views.MvxAndroidMainThreadDispatcher.RequestMainThreadAction (System.Action) <0x00067>
   at MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (object,System.Threading.CancellationToken) <0x00193>
   at MvvmCross.Binding.Bindings.MvxFullBinding.<CreateSourceBinding>b__20_0 (object,System.EventArgs) <0x000b3>
   at MvvmCross.Binding.Bindings.SourceSteps.MvxSourceStep.SendSourcePropertyChanged () <0x0004b>
   at MvvmCross.Binding.Bindings.SourceSteps.MvxPathSourceStep.SourceBindingOnChanged (object,System.EventArgs) <0x0001b>
   at MvvmCross.Binding.Bindings.Source.MvxSourceBinding.FireChanged () <0x0004b>
   at MvvmCross.Binding.Bindings.Source.Leaf.MvxLeafPropertyInfoSourceBinding.OnBoundPropertyChanged () <0x00013>
   at MvvmCross.Binding.Bindings.Source.MvxPropertyInfoSourceBinding.SourcePropertyChanged (object,System.ComponentModel.PropertyChangedEventArgs) <0x0008f>
   at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object_object (object,intptr,intptr,intptr) <0x000f7>
Configuration
Version: 4.2.2
Platform: Android
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 59 (32 by maintainers)
Commits related to this issue
- Explicitly remove views from the RecyclerView when it is detached This clears out the visible view holders which nulls the DataContext (but keeps a cached copy in the view holder). It does not clear ... — committed to kjeremy/MvvmCross by kjeremy 8 years ago
- Explicitly remove views from the RecyclerView when it is detached (#1536) This clears out the visible view holders which nulls the DataContext (but keeps a cached copy in the view holder). It does ... — committed to MvvmCross/MvvmCross by kjeremy 8 years ago
@Cheesebaron thank you. Works like a charm