enisn / Xamarin.Forms.InputKit

CheckBox, Radio Button, Labeled Slider, Dropdowns etc.
MIT License
579 stars 98 forks source link

Xamarin.iOS SystemArgumentNullException 'Value cannot be null' #365

Open sixtzain opened 5 months ago

sixtzain commented 5 months ago

Description The app throws a null reference exception when opening a view that uses this plugin's AutoCompleteEntry.

Expected behavior App should not crash

Stacktrace 2024-01-29 21:33:28.834173-0600 REMAINPLAST_Customer.iOS[11082:367472] Unhandled managed exception: Value cannot be null. Parameter name: source (System.ArgumentNullException) at System.Linq.Enumerable.Where[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) [0x00003] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.Linq/src/System/Linq/Where.cs:17 at Plugin.InputKit.Shared.Controls.AutoCompleteEntry+<>c.b__6_0 (System.String text, System.Collections.Generic.ICollection`1[T] options) [0x0000d] in :0 at Plugin.InputKit.Platforms.iOS.Controls.AutoCompleteTextField.UpdateTableViewData () [0x0000c] in :0 at Plugin.InputKit.Platforms.iOS.Controls.AutoCompleteTextField.Draw (UIKit.UIViewController viewController, CoreAnimation.CALayer layer, UIKit.UIScrollView scrollView, System.nfloat y) [0x002b4] in :0 at Plugin.InputKit.Platforms.iOS.AutoCompleteViewRenderer.Draw (CoreGraphics.CGRect rect) [0x0005b] in :0 at (wrapper managed-to-native) UIKit.UIApplication.xamarin_UIApplicationMain(int,intptr,intptr,intptr,intptr&) at UIKit.UIApplication.UIApplicationMain (System.Int32 argc, System.String[] argv, System.IntPtr principalClassName, System.IntPtr delegateClassName) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/src/Xamarin.iOS/UIKit/UIApplication.cs:58 at UIKit.UIApplication.Main (System.String[] args, System.Type principalClass, System.Type delegateClass) [0x0003b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/src/Xamarin.iOS/UIKit/UIApplication.cs:94 at REMAINPLAST_Customer.iOS.Application.Main (System.String[] args) [0x00001] in /Users/jallarg/repos/REMAINPLAST_Customer/REMAINPLAST_Customer/REMAINPLAST_Customer.iOS/Main.cs:17

Smartphone (emulator): Device: iPhone 15 Pro Max OS: iOS 17.2

Additional context I did some triage and I bvelieve the problem is in the function AutoCompleteEntry::GetInputEntry I couldn't figure out why honestly :c This issue occurs only on iOS on Android is doing good I'm using [v4.1.6]