This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.

Bug 2251

Summary: mono crash. [System.Runtime.InteropServices.MarshalDirectiveException: Type System.DateTime which is passed to unmanaged code must have a StructLayout attribute.]
Product: [Mono] Runtime Reporter: Stanislav <stanislav.fedorenko>
Component: interopAssignee: Bugzilla <bugzilla>
Status: NEW ---    
Severity: normal CC: mono-bugs+mono
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Whiteboard:
Tags: Test Case URL:
External Submit: ---
Attachments: attaching log mono file with errors and exceptions

Description Stanislav 2011-11-29 11:30:28 EST
Created attachment 968 [details]
attaching log mono file with errors and exceptions

hi.

Running on mono open-webkit-sharp crushes mono but has no problems on windows.
(as some others COM's with call backs) 

got from here lastes version (2.1)
http://code.google.com/p/open-webkit-sharp/downloads/list

to run samples without rebuilding: just copy all files from
OpenWebKitSharp\Core to OpenWebKitSharp\WebKit

than run (for example):
mono --trace CustomMenuImplementation.exe >c:\log.txt

then i entered 
http://www.youtube.com/
clicked GO button - and.... mono crashed! on .net - no problems.

in log there are many exceptions like:

[000011AC: 16.50907 70] ENTER: string:InternalSetLength
(int)(this:[STRING:0A72E000:System.Runtime.InteropServices.MarshalDirectiveException:
Type System.DateTime which is passed to unmanaged code must have a StructLayout
attribute.
  at (wrapper native-to-managed)
WebKit.Interop.IWebFrameLoadDelegate:willPerformClientRedirectToURL
(intptr,intptr,intptr,double,System.DateTime,intptr)
  at (wrapper managed-to-native)
System.Windows.Forms.XplatUIWin32:Win32DispatchMessage
(System.Windows.Forms.MSG&)