I'm getting an intermittant null reference expception in
ListView.InsertItem. Since the top of the call stack is in winforms
code, I am not able to tell what is actually null. Here's the top of
the stack:

System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Windows.Forms.ListView.InsertItem(Int32 displayIndex,
ListViewItem item)
at System.Windows.Forms.ListViewItemCollection.Add(ListViewItem
value)

Has anyone experienced this before? Any ideas on what might be going
on here?

thanks for any help!

Re: Null reference Exception in ListView.InsertItem by Atul

Atul
Tue Sep 20 23:09:24 CDT 2005

Most probably, the ListViewItem object being passed to InsertItem is null.

-Atul, Sky Software http://www.ssware.com
Shell MegaPack For ActiveX & .Net - Windows Explorer Like Shell UI Controls




"nlaunceford NO SPAM gmail DOT com" <nlaunceford@gmail.com> wrote in message
news:1127237058.450390.10700@g14g2000cwa.googlegroups.com...
> I'm getting an intermittant null reference expception in
> ListView.InsertItem. Since the top of the call stack is in winforms
> code, I am not able to tell what is actually null. Here's the top of
> the stack:
>
> System.NullReferenceException: Object reference not set to an instance
> of an object.
> at System.Windows.Forms.ListView.InsertItem(Int32 displayIndex,
> ListViewItem item)
> at System.Windows.Forms.ListViewItemCollection.Add(ListViewItem
> value)
>
> Has anyone experienced this before? Any ideas on what might be going
> on here?
>
> thanks for any help!
>