ClickAndQuery sample crashes when number of rows returned from query are over 70K

Apr 17, 2009 at 1:44 PM
Edited Apr 17, 2009 at 1:49 PM
Hi Lee

Thanks for making this wonderful control. I was trying ClickAndQuery sample app during prototyping and noticed that it crashes when number of rows returned from the query are over 70K. I was wondering if that's a limitation of the superlist or a bug in the sample app.
The query is simple
select top 70000 jobid from jobs

Tip:
You can reproduce it without having to create a large table

select top 70000 j.jobid from jobs j, jobs k -> this will produce Cartesian product of two tables job j and jobs k  (100 X 100 = 10000)

The crash dump shows
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at BinaryComponents.SuperList.Sections.ListSection.CalculateListItems() in ..\Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\Sections\ListSection.cs:line 1578
   at BinaryComponents.SuperList.Sections.ListSection.Layout(GraphicsSettings gs, Size maximumSize) in ..\Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\Sections\ListSection.cs:line 279
   at BinaryComponents.SuperList.Sections.ListSection.Layout() in ..\Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\Sections\ListSection.cs:line 1214
   at BinaryComponents.SuperList.Sections.ListSection.ListUpdated(Boolean lazyLayout) in ..\Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\Sections\ListSection.cs:line 802
   at BinaryComponents.SuperList.ListControl.UpdateListSection(Boolean lazyLayout) in ..\Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\ListControl.cs:line 587
   at BinaryComponents.SuperList.ItemLists.ItemList.ListUpdated(Boolean lazyLayout) in ..\Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\ItemList\ItemList.cs:line 147
   at BinaryComponents.SuperList.ItemLists.BufferedList.CheckForJobCompletionResults() in ..\Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\ItemList\BufferedItemList.cs:line 234
   at BinaryComponents.SuperList.ItemLists.BufferedList.DoHouseKeeping(Boolean runInBackground) in ..\Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\ItemList\BufferedItemList.cs:line 199
   at BinaryComponents.SuperList.ItemLists.BufferedList.DoHouseKeeping() in ..\Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\ItemList\BufferedItemList.cs:line 190
   at BinaryComponents.SuperList.ListControl._timer_Tick(Object sender, EventArgs e) in ..\Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\ListControl.cs:line 548
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Regards
Anil
May 18, 2012 at 11:37 AM

 

I encountered the same issue. 

error at  \Winforms\ListView\SuperList\Main\BinaryComponents.SuperList\Sections\ListSection.cs:line 1578

But i inserted the following line at line no 1578  and it worked.  Not sure it is correct (but as a shortcut it does what i required)

 if (_rowInformation == null)   _rowInformation = new List<RowIdentifier>(ItemList.Count);