[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
Tue Jan 15 19:13:04 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#c5
--- Comment #5 from Brian de Alwis <bsd at cs.ubc.ca> 2008-01-15 17:13:04 MST ---
Thanks Geoff. I'm now running with your latest posted Cocoa# from
http://blog.sublimeintervention.com/mwf-update.dmg (listed internally as
2007-12-21) with those environment variables set. MoMA now comes up and is
using Carbon.
But I'm still having the same problem, a System.IndexOutOfRangeException in
System.Windows.Forms.Mime.CheckForBinaryOrText () at line 472. This code
corresponds to the following method:
private void CheckForBinaryOrText ()
{
// check the first 32 bytes
for (int i = 0; i < 32; i++) {
char c = System.Convert.ToChar (buffer [i]);
// line 472
if (c != '\t' && c != '\n' && c != '\r' && c
!= 12 && c < 32) {
global_result = octet_stream;
return;
}
}
global_result = text_plain;
}
My guess is that buffer has less than 32 characters. There's no guard to ensure
that "buffer" has >= 32 characters, and from a quick scan of the Mime class I
don't see a reason any evidence for such an assumption.
I'm not sure why there is less than 32 characters. Unfortunately my attempts
to install a breakpoint on the CheckForBinaryOrText() resulted in a crash.
$ mono --debug MoMA.exe
Unhandled Exception: System.IndexOutOfRangeException: Array index is out of
range.
at System.Windows.Forms.Mime.CheckForBinaryOrText () [0x00007] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Mime.cs:472
at System.Windows.Forms.Mime.GoByFileName () [0x0004e] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Mime.cs:277
at System.Windows.Forms.Mime.StartByFileName (System.String filename)
[0x0003d] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Mime.cs:195
at System.Windows.Forms.Mime.GetMimeTypeForFile (System.String filename)
[0x0000c] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Mime.cs:141
at System.Windows.Forms.UnixFileSystem.WriteRecentlyUsedFiles (System.String
fileToAdd) [0x002d1] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3710
at System.Windows.Forms.MWFVFS.WriteRecentlyUsedFiles (System.String
filename) [0x00000] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:3181
at System.Windows.Forms.MWFFileView.WriteRecentlyUsed (System.String
fullfilename) [0x00000] in
/Users/plasma/src/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/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs:940
at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x0001c] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5672
at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00024] in
/Users/plasma/src/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/plasma/src/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/plasma/src/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/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5268
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x0017c] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5021
at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m)
[0x00055] in
/Users/plasma/src/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/plasma/src/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/plasma/src/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/plasma/src/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/plasma/src/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/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs:1208
at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&
msg) [0x00000] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:551
at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00359] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:849
at System.Windows.Forms.Form.ShowDialog (IWin32Window ownerWin32) [0x000f8]
in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs:1748
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/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CommonDialog.cs:131
at System.Windows.Forms.CommonDialog.ShowDialog () [0x00000] in
/Users/plasma/src/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/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5672
at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00024] in
/Users/plasma/src/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/plasma/src/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/plasma/src/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/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5268
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x0017c] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5021
at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m)
[0x00055] in
/Users/plasma/src/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/plasma/src/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/plasma/src/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/plasma/src/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/plasma/src/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/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs:1208
at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&
msg) [0x00000] in
/Users/plasma/src/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:551
at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x00359] in
/Users/plasma/src/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/plasma/src/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/plasma/src/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