[Mono-bugs] [Bug 353942] [OSX] MoMA crashes using Mono 1.2.6; runs fine with Microsoft. NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 18 12:54:43 EST 2008


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

User bsd at cs.ubc.ca added comment
https://bugzilla.novell.com/show_bug.cgi?id=353942#c9





--- Comment #9 from Brian de Alwis <bsd at cs.ubc.ca>  2008-01-18 10:54:42 MST ---
Sorry for the delayed response: it took me a while to figure out how to build
this with all the proper dependencies.

Trunk made no difference (output below).  I put in a few Console.WriteLines in
Mime.CheckForBinaryOrText() to print the buffer.Length and the buffer contents,
as well as in Mime.GetMimeTypeForFile() to print the file whose mime-type is
being discovered:

> Getting mime type for /Users/bsd/Downloads/MoMA/ICSharpCode.SharpZipLib.dll
> buffer has 0 bytes: System.Byte[]

Putting a check in Mime.CheckForBinaryOrText() to check the buffer length
prevents this bug and MoMA completes successfully.

-                       for (int i = 0; i < 32; i++) {
+                       for (int i = 0; i < 32 && i < buffer.Length; i++) {


------------------------------------
Getting mime type for /Users/bsd/Downloads/MoMA/ICSharpCode.SharpZipLib.dll
buffer has 0 bytes: System.Byte[]

Unhandled Exception: System.IndexOutOfRangeException: Array index is out of
range.
  at System.Windows.Forms.Mime.CheckForBinaryOrText () [0x00040] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Mime.cs:475 
  at System.Windows.Forms.Mime.GoByFileName () [0x0004e] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Mime.cs:278 
  at System.Windows.Forms.Mime.StartByFileName (System.String filename)
[0x0003d] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Mime.cs:196 
  at System.Windows.Forms.Mime.GetMimeTypeForFile (System.String filename)
[0x0001c] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Mime.cs:142 
  at System.Windows.Forms.UnixFileSystem.WriteRecentlyUsedFiles (System.String
fileToAdd) [0x002d1] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3710 
  at System.Windows.Forms.MWFVFS.WriteRecentlyUsedFiles (System.String
filename) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3181 
  at System.Windows.Forms.MWFFileView.WriteRecentlyUsed (System.String
fullfilename) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:2609 
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.MWFFileView:WriteRecentlyUsed (string)
  at System.Windows.Forms.FileDialog.OnClickOpenSaveButton (System.Object
sender, System.EventArgs e) [0x003b6] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:940 
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x0001c] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5687 
  at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00024] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:104 
  at System.Windows.Forms.ButtonBase.OnMouseUp
(System.Windows.Forms.MouseEventArgs mevent) [0x00076] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs:616 
  at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs
e) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:126 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m)
[0x0005c] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5282 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x0017c] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5035 
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m)
[0x00055] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs:674 
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m)
[0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:148 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:225 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:206 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x0006a] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:188 
  at System.Windows.Forms.XplatUICarbon.DispatchMessage
(System.Windows.Forms.MSG& msg) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs:1221 
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&
msg) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:563 
  at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00359] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:849 
  at System.Windows.Forms.Form.ShowDialog (IWin32Window ownerWin32) [0x000f8]
in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:1771 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form:ShowDialog
(System.Windows.Forms.IWin32Window)
  at System.Windows.Forms.CommonDialog.ShowDialog (IWin32Window ownerWin32)
[0x00046] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CommonDialog.cs:131 
  at System.Windows.Forms.CommonDialog.ShowDialog () [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CommonDialog.cs:117 
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.CommonDialog:ShowDialog ()
  at MoMA.MainForm.AssemblyAddButton_Click (System.Object sender,
System.EventArgs e) [0x00000] 
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x0001c] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5687 
  at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00024] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:104 
  at System.Windows.Forms.ButtonBase.OnMouseUp
(System.Windows.Forms.MouseEventArgs mevent) [0x00076] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs:616 
  at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs
e) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:126 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m)
[0x0005c] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5282 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x0017c] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5035 
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m)
[0x00055] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs:674 
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m)
[0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:148 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:225 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:206 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x0006a] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:188 
  at System.Windows.Forms.XplatUICarbon.DispatchMessage
(System.Windows.Forms.MSG& msg) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs:1221 
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&
msg) [0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:563 
  at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00359] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:849 
  at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext context) [0x00014] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:635 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm)
[0x00000] in
/Users/bsd/t/mono-trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:623 
  at MoMA.Program.Main () [0x00000] 

------------------------------------


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list