Bug 4159 - CreateForallCallback emits invalid code
Summary: CreateForallCallback emits invalid code
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: PC Linux
: --- major
Target Milestone: ---
Assignee: Mikayla Hutchinson [MSFT]
Depends on:
Reported: 2012-03-30 12:37 UTC by Marek Safar
Modified: 2012-04-02 15:56 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Marek Safar 2012-03-30 12:37:16 UTC
When running MD with verifier (--verify-all) it won't start due to

System.Security.VerificationException: Error verifying (wrapper dynamic-method) object:ContainerForallCallback (intptr,bool,intptr,intptr): Incompatible this argument on stack with method signature expected 'GLib.ToggleRef' but got 'object (Complex)' for a call to 'GLib.ToggleRef:get_Target ()' at 0x001a
  at (wrapper managed-to-native) System.Delegate:CreateDelegate_internal (System.Type,object,System.Reflection.MethodInfo,bool)
  at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, Boolean throwOnBindFailure, Boolean allowClosed) [0x00340] in /home/marek/git/mono/mcs/class/corlib/System/Delegate.cs:276 
  at System.Delegate.CreateDelegate (System.Type type, System.Reflection.MethodInfo method, Boolean throwOnBindFailure) [0x00000] in /home/marek/git/mono/mcs/class/corlib/System/Delegate.cs:289 
  at System.Delegate.CreateDelegate (System.Type type, System.Reflection.MethodInfo method) [0x00000] in /home/marek/git/mono/mcs/class/corlib/System/Delegate.cs:294 
  at System.Reflection.Emit.DynamicMethod.CreateDelegate (System.Type delegateType) [0x00029] in /home/marek/git/mono/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs:168 
  at Mono.TextEditor.GtkWorkarounds.CreateForallCallback () [0x00404] in /home/marek/git/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/GtkWorkarounds.cs:735 
  at Mono.TextEditor.GtkWorkarounds.FixContainerLeak[WorkbenchWindow] (MonoDevelop.Ide.Gui.WorkbenchWindow c) [0x00028] in /home/marek/git/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/GtkWorkarounds.cs:648 
  at MonoDevelop.Ide.Gui.WorkbenchWindow..ctor () [0x00013] in /home/marek/git/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/WorkbenchWindow.cs:38 
  at MonoDevelop.Ide.Gui.DefaultWorkbench..ctor () [0x0007e] in /home/marek/git/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs:203 
  at MonoDevelop.Ide.Gui.Workbench.Initialize (IProgressMonitor monitor) [0x00022] in /home/marek/git/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs:76 
  at MonoDevelop.Ide.IdeApp.Initialize (IProgressMonitor monitor) [0x00140] in /home/marek/git/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs:172 
  at MonoDevelop.Ide.IdeStartup.Run (MonoDevelop.Ide.MonoDevelopOptions options) [0x00568] in /home/marek/git/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:226
Comment 1 Mikayla Hutchinson [MSFT] 2012-04-02 15:56:40 UTC
Landed the patch.