Size Limit?

Developer
Feb 6, 2011 at 7:03 PM

Is there a size limit on the code that can be generated in C# with Cosmos?  I have an interesting situation where if I add some new code to my project, I get the following error:

 

C:\Program Files\MSBuild\Cosmos\Cosmos.targets(32,9): error : Interface not found.   at System.RuntimeTypeHandle.VerifyInterfaceIsImplemented(RuntimeTypeHandle handle, RuntimeTypeHandle interfaceHandle)   at System.RuntimeType.GetInterfaceMap(Type ifaceType)   at Cosmos.IL2CPU.ILScanner.ScanType(Type aType) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 759   at Cosmos.IL2CPU.ILScanner.ScanQueue() in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 781   at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 284   at Cosmos.Build.MSBuild.IL2CPUTask.Execute() in c:\Data\Sources\Cosmos\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:line 239Done building project "CBM11Boot.Cosmos" -- FAILED.

 

The code Im adding is perfectly legitimate (its just another CASE statement to a SWITCH - with only a "break" in it).  Taking it out, it compiles just fine.  Im wondering if Ive reached a limit for the boot loader or something.

Coordinator
Feb 7, 2011 at 7:09 AM
Please narrow down to a specific case: are you doing any switch statements on strings?


On Sun, Feb 6, 2011 at 8:03 PM, xlar54 <notifications@codeplex.com> wrote:

From: xlar54

Is there a size limit on the code that can be generated in C# with Cosmos? I have an interesting situation where if I add some new code to my project, I get the following error:

C:\Program Files\MSBuild\Cosmos\Cosmos.targets(32,9): error : Interface not found. at System.RuntimeTypeHandle.VerifyInterfaceIsImplemented(RuntimeTypeHandle handle, RuntimeTypeHandle interfaceHandle) at System.RuntimeType.GetInterfaceMap(Type ifaceType) at Cosmos.IL2CPU.ILScanner.ScanType(Type aType) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 759 at Cosmos.IL2CPU.ILScanner.ScanQueue() in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 781 at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 284 at Cosmos.Build.MSBuild.IL2CPUTask.Execute() in c:\Data\Sources\Cosmos\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:line 239Done building project "CBM11Boot.Cosmos" -- FAILED.

The code Im adding is perfectly legitimate (its just another CASE statement to a SWITCH - with only a "break" in it). Taking it out, it compiles just fine. Im wondering if Ive reached a limit for the boot loader or something.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
Feb 7, 2011 at 3:03 PM
Edited Feb 7, 2011 at 3:03 PM

Yes, thats exactly right a switch/case on strings..  And Ive determined that its definitely the switch statement / case statement that's the problem.    (Adding more code elsewhere doesnt give the same error).  Is this just a known bug?

Coordinator
Feb 7, 2011 at 5:02 PM
the c# compiler translates switch(YourString) statements to a List<string> with a .IndexOf call for each case label, starting with a given amount of case labels (not sure, 3 or 4 or so..)


On Mon, Feb 7, 2011 at 4:03 PM, xlar54 <notifications@codeplex.com> wrote:

From: xlar54

Yes, thats exactly right. And Ive determined that its definitely the switch statement / case statement that's the problem. (Adding more code elsewhere doesnt give the same error). Is this just a known bug?

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com