If ArrayList is buggy, it should be fixed then. But meanwhile, maybe we could work around such issues in WinForms by using a generic list instead (assuming the list is not exposed anywhere). .NET 1.x is no longer supported, and generic lists perform better anyway.
sa5webber wrote > > Looking into this further leads the problem to > mcs/class/corlib/System.Collections/ArrayList.cs. I'm apparently not the > only one to encounter this problem, but it doesn't look like its been > addressed yet. Here is the trace from my issue. > > System.InvalidOperationException: List has changed. > at System.Collections.ArrayList+SimpleEnumerator.MoveNext () [0x00000] > in <filename unknown>:0 > at System.Windows.Forms.Form.ShowDialog (IWin32Window owner) [0x00000] > in <filename unknown>:0 > at (wrapper remoting-invoke-with-check) > System.Windows.Forms.Form:ShowDialog (System.Windows.Forms.IWin32Window) > at System.Windows.Forms.CommonDialog.ShowDialog (IWin32Window owner) > [0x00000] in <filename unknown>:0 > at System.Windows.Forms.CommonDialog.ShowDialog () [0x00000] in > <filename unknown>:0 > at (wrapper remoting-invoke-with-check) > System.Windows.Forms.CommonDialog:ShowDialog () > at B2RfTestSet.B2RfTestSet.btnLoadScript_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 > > > All I have to do to recreate the problem is create an OpenFileDialog() > along with a button to launch the OpenFileDialog() dialog. I then > repeatedly click the button to open the dialog and then then cancel it. I > do this maybe about 10 times. At some point during the open process, the > application crashes with the above error. > -- View this message in context: http://mono.1490590.n4.nabble.com/OpenFileDialog-Exception-tp4649531p4649595.html Sent from the Mono - WinForms mailing list archive at Nabble.com. _______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
