migueldeicaza / MonoTouch.Dialog

Tools to simplify creating dialogs with the user using MonoTouch
MIT License
430 stars 211 forks source link

Index sample NullReferenceException #139

Closed aberbenni closed 10 years ago

aberbenni commented 12 years ago

When I try to search, typing first letter gives me a NullReferenceException.

System.NullReferenceException: Object reference not set to an instance of an object at Sample.IndexedViewController.m16 (MonoTouch.Dialog.Section section) [0x00000] in /MonoTouch.Dialog/Sample/DemoIndex.cs:36 at System.Linq.Enumerable+cIterator1D2[MonoTouch.Dialog.Section,System.String].MoveNext () [0x00059] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:2269 at System.Collections.Generic.List1[System.String].AddEnumerable (IEnumerable1 enumerable) [0x0001a] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Collections.Generic/List.cs:126 at System.Collections.Generic.List1[System.String]..ctor (IEnumerable1 collection) [0x0002f] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Collections.Generic/List.cs:63 at System.Linq.Enumerable.ToArray[String] (IEnumerable1 source) [0x00029] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:2874 at Sample.IndexedViewController.GetSectionTitles () [0x0000b] in /MonoTouch.Dialog/Sample/DemoIndex.cs:37 at Sample.IndexedViewController+IndexedSource.SectionIndexTitles (MonoTouch.UIKit.UITableView tableView) [0x00000] in /MonoTouch.Dialog/Sample/DemoIndex.cs:50 at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr) at MonoTouch.UIKit.UITableView.ReloadData () [0x0000b] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UITableView.g.cs:166 at MonoTouch.Dialog.DialogViewController.ReloadData () [0x0004e] in /MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs:615 at MonoTouch.Dialog.DialogViewController.PerformFilter (System.String text) [0x000c4] in /MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs:247 at MonoTouch.Dialog.DialogViewController+SearchDelegate.TextChanged (MonoTouch.UIKit.UISearchBar searchBar, System.String searchText) [0x00000] in /MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs:276 at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29 at Sample.Application.Main (System.String[] args) [0x00000] in /MonoTouch.Dialog/Sample/Main.cs:15

lbowers commented 11 years ago

I'm seeing this too. Did you ever resolve it?

danmiser commented 9 years ago

I believe #213 is a different issue than #203. #203 is still open and still causes this specific issue. Can you please reopen?