[Mono-bugs] [Bug 342912] New: FileDialog crashes on double clicking

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 20 02:59:31 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=342912

           Summary: FileDialog crashes on double clicking
           Product: Mono: Class Libraries
           Version: 1.2.6
          Platform: x86-64
        OS/Version: SLES 10
            Status: NEW
          Severity: Blocker
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: carsten.sponsel at astrum-it.de
         QAContact: mono-bugs at ximian.com
          Found By: ---


Description of Problem:
If I want to select a directory in the OpenFileDialog and I have not properly
double-clicked, so the OpenFileDialog got in directory rename mode and try
another double-click on the directory icon, my application crashes with a
TargetInvocationException


Steps to reproduce the problem:
1. Open a OpenFileDialog
2. do a "slow double click" on a directory name so you enter in rename mode
3. double click on directory icon


Actual Results:
Application crashes. Output:

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. --->
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: displayIndex
  at System.Windows.Forms.ListView+ListViewItemCollection.get_Item (Int32
displayIndex) [0x00000]
  at System.Windows.Forms.ListView.SetFocusedItem (Int32 index) [0x00000]
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.ListView:SetFocusedItem (int)
  at System.Windows.Forms.ListView+ListViewItemCollection.Clear () [0x00000]
  at System.Windows.Forms.MWFFileView.RealFileViewUpdate
(System.Collections.ArrayList directoriesArrayList,
System.Collections.ArrayList fileArrayList) [0x00000]
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(object,object[])
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception
stack trace ---

  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[]
parameters) [0x00000]
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000]
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args)
[0x00000]
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000]
  at System.Windows.Forms.XplatUIDriverSupport.ExecutionCallback (System.Object
state) [0x00000]
  at System.Security.SecurityContext.Run (System.Security.SecurityContext
securityContext, System.Threading.ContextCallback callBack, System.Object
state) [0x00000]
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext
executionContext, System.Threading.ContextCallback callBack, System.Object
state) [0x00000]
  at System.Windows.Forms.XplatUIDriverSupport.ExecuteClientMessage (GCHandle
gchandle) [0x00000]
  at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id,
System.Windows.Forms.MSG& msg, IntPtr handle, Int32 wFilterMin, Int32
wFilterMax) [0x00000]
  at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id,
System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32 wFilterMax)
[0x00000]
  at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00000]
  at System.Windows.Forms.Form.ShowDialog (IWin32Window ownerWin32) [0x00000]
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form:ShowDialog
(System.Windows.Forms.IWin32Window)
  at System.Windows.Forms.CommonDialog.ShowDialog (IWin32Window ownerWin32)
[0x00000]
  at System.Windows.Forms.CommonDialog.ShowDialog () [0x00000]
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.CommonDialog:ShowDialog ()
  at Gismo.GismoApplication.FileOpenHandler (System.Object sender,
System.EventArgs ea) [0x00000]
  at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) [0x00000]
  at System.Windows.Forms.ToolStripMenuItem.OnClick (System.EventArgs e)
[0x00000]
  at System.Windows.Forms.ToolStripMenuItem.HandleClick (System.EventArgs e)
[0x00000]
  at System.Windows.Forms.ToolStripItem.FireEvent (System.EventArgs e,
ToolStripItemEventType met) [0x00000]
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.ToolStripItem:FireEvent
(System.EventArgs,System.Windows.Forms.ToolStripItemEventType)
  at System.Windows.Forms.ToolStrip.OnMouseUp
(System.Windows.Forms.MouseEventArgs mea) [0x00000]
  at System.Windows.Forms.ToolStripDropDown.OnMouseUp
(System.Windows.Forms.MouseEventArgs mea) [0x00000]
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m)
[0x00000]
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x00000]
  at System.Windows.Forms.ScrollableControl.WndProc
(System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message& m)
[0x00000]
  at System.Windows.Forms.ToolStripDropDown.WndProc
(System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x00000]
  at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG&
msg) [0x00000]
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&
msg) [0x00000]
  at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00000]
  at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext context) [0x00000]
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm)
[0x00000]
  at Gismo.Program.Main () [0x00000]


Expected Results:
OpenFileDialog enters the directory that I double-clicked.


How often does this happen? 
Everytime.


Additional Information:

The error happens in mono 1.2.6 preview 2. I did not notice this error in mono
1.2.5 and i can't reproduce it in mono 1.2.4. SaveFileDialog shows the same
error. Doing the same with files does not reproduce the error.

This is the code, how my application instanciates the OpenFileDialog:

System.Windows.Forms.OpenFileDialog aDialog = null;
System.Windows.Forms.DialogResult theDialogResult = DialogResult.None;

aDialog = new System.Windows.Forms.OpenFileDialog ();
aDialog.DefaultExt = ".xml";
aDialog.InitialDirectory = System.Environment.CurrentDirectory;
aDialog.CheckFileExists = true;
aDialog.Filter = "XML files|*.xml";
aDialog.Multiselect = false;
aDialog.Title = "Open Sequence Graph";
theDialogResult = aDialog.ShowDialog ();


-- 
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