[Mono-bugs] [Bug 684773] New: Crash if ListView does not have focus and I remove all items from it
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Apr 3 14:06:50 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=684773
https://bugzilla.novell.com/show_bug.cgi?id=684773#c0
Summary: Crash if ListView does not have focus and I remove all
items from it
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: 64bit
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: SeLoGM at googlemail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=422922)
--> (http://bugzilla.novell.com/attachment.cgi?id=422922)
Exsample Project
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.16)
Gecko/20110323 Ubuntu/10.10 (maverick) Firefox/3.6.16
Crash if ListView does not have focus and I remove all items from it
Reproducible: Always
Steps to Reproduce:
1. Add Items in ListView (in run time)
2. Select Item in ListView
3. Lost Focus by Selecting other controls (ex. Textedit)
4. Remove all Items in ListView (in runtime)
5. Crash
Code for remove all Items:
foreach (ListViewItem obj in listView1.Items.Cast<ListViewItem>().ToList()) {
listView1.Items.Remove(obj);
}
---------------
Error:
mono '/home/sergej/Desktop/WindowsFormsApplication1.exe'
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
at System.Windows.Forms.ListView+ListViewItemCollection.get_Item (Int32
index) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ListView.GetItemAtDisplayIndex (Int32 display_index)
[0x00000] in <filename unknown>:0
at System.Windows.Forms.ListView.get_FocusedItem () [0x00000] in <filename
unknown>:0
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.ListView:get_FocusedItem ()
at System.Windows.Forms.ListViewItem.get_Focused () [0x00000] in <filename
unknown>:0
at System.Windows.Forms.ListView+ListViewItemCollection.RemoveAt (Int32
index) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ListView+ListViewItemCollection.Remove
(System.Windows.Forms.ListViewItem item) [0x00000] in <filename unknown>:0
at WindowsFormsApplication1.Form1.button2_Click (System.Object sender,
System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000] in
<filename unknown>:0
at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000] in
<filename unknown>:0
at System.Windows.Forms.ButtonBase.OnMouseUp
(System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs
mevent) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0
at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0
at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m)
[0x00000] in <filename unknown>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x00000] in <filename unknown>:0
--------------
mono version:
Mono JIT compiler version 2.6.7 (Debian 2.6.7-3ubuntu1)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list