Bug 4395 - Exception when trying to implement an interface using refactoring
Summary: Exception when trying to implement an interface using refactoring
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2012-04-11 13:34 UTC by David Ferguson
Modified: 2012-04-11 13:46 UTC (History)
2 users (show)

Tags:
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 GitHub or Developer Community 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:
Status:
RESOLVED FIXED

Description David Ferguson 2012-04-11 13:34:10 UTC
Description of Problem:

I have an existing class that I'm adding a generic interface to (IComparable<ClassName>).  When right clicking on on the class name to implement the interface, I get the following exception.

System.AggregateException:  ---> System.InvalidProgramException: Invalid IL code in MonoDevelop.Refactoring.RefactoringService/<GetValidActions>c__AnonStorey24:<>m__39 (): IL_0087: ldarg.2   


  at System.Threading.Tasks.TaskActionInvoker+FuncInvoke`1[TResult].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00028] in /home/dferguson/Development/mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:477 
  at System.Threading.Tasks.Task.ThreadStart () [0x0006e] in /home/dferguson/Development/mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:388 
  --- End of inner exception stack trace ---
  at System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout, CancellationToken cancellationToken) [0x000c9] in /home/dferguson/Development/mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:618 
  at System.Threading.Tasks.Task.Wait () [0x00000] in /home/dferguson/Development/mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:564 
  at System.Threading.Tasks.Task`1[TResult].get_Result () [0x00000] in <filename unknown>:0 
  at MonoDevelop.Refactoring.CurrentRefactoryOperationsHandler.Update (MonoDevelop.Components.Commands.CommandArrayInfo ainfo) [0x0020e] in /home/dferguson/Development/mono/monodevelop/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs:253 
  at MonoDevelop.Components.Commands.CommandHandler.InternalUpdate (MonoDevelop.Components.Commands.CommandArrayInfo info) [0x00001] in /home/dferguson/Development/mono/monodevelop/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandHandler.cs:52 
  at MonoDevelop.Components.Commands.CommandManager.DefaultUpdateCommandInfo (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info) [0x0006c] in /home/dferguson/Development/mono/monodevelop/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1247 
  at MonoDevelop.Components.Commands.CommandManager.GetCommandInfo (System.Object commandId, MonoDevelop.Components.Commands.CommandTargetRoute targetRoute) [0x001ba] in /home/dferguson/Development/mono/monodevelop/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1216 
 --> (Inner exception 0) System.InvalidProgramException: Invalid IL code in MonoDevelop.Refactoring.RefactoringService/<GetValidActions>c__AnonStorey24:<>m__39 (): IL_0087: ldarg.2   


  at System.Threading.Tasks.TaskActionInvoker+FuncInvoke`1[TResult].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00028] in /home/dferguson/Development/mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:477 
  at System.Threading.Tasks.Task.ThreadStart () [0x0006e] in /home/dferguson/Development/mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:388 


Additional Information:

Using the latest MD as of 4/11/2012.  Using a 2.11 custom build of Mono from March 19th (both as framework and runtime of MD).
Comment 1 Mike Krüger 2012-04-11 13:36:10 UTC
compiler error :/
Comment 2 Marek Safar 2012-04-11 13:46:14 UTC
That was quirk in mono master, please update to the latest mono and rebuild MD.