Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.IndexOutOfRangeException on ILScanner when instantiating a LiteDatabase object of the LiteDB nugget package #2858

Open
4 tasks done
Guillermo-Santos opened this issue Dec 27, 2023 · 1 comment

Comments

@Guillermo-Santos
Copy link
Contributor

Second of the three issues mencioned on #2857 .

This one throws with an index out of Range Exception.
Exception
Post the exception returned by Visual Studio

Build started at 11:12 PM...
1>------ Build started: Project: CosmosKernel1, Configuration: Debug Any CPU ------
1>Skipping analyzers to speed up the build. You can execute 'Build' or 'Rebuild' command to run analyzers.
1>CosmosKernel1 -> D:\source\repos\Zaphyros\CosmosKernel1\bin\Debug\net6.0\CosmosKernel1.dll
1>Executing IL2CPU on assembly
1>Kernel Base: Cosmos.System.Kernel
1>Checking target assembly: D:\source\repos\Zaphyros\CosmosKernel1\bin\Debug\net6.0\CosmosKernel1.dll
1>IL2CPU : warning : Loading plugs from assembly: Cosmos.Core_Asm, Version=10.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983
1>IL2CPU : warning : Loading plugs from assembly: Cosmos.Core_Plugs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983
1>IL2CPU : warning : Loading plugs from assembly: Cosmos.Debug.Kernel.Plugs.Asm, Version=10.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983
1>IL2CPU : warning : Loading plugs from assembly: Cosmos.System2_Plugs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983
1>IL2CPU : warning : Invalid plug method! Target method not found. : A0SystemIOTextReaderA2CosmosSystem_PlugsSystemConsoleImplGetOrCreateReader
1>IL2CPU : error : Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
1>   at Cosmos.IL2CPU.ILScanner.ScanType(Type aType) in D:\source\CosmosOS-Dev\CosmosOS\IL2CPU\source\Cosmos.IL2CPU\ILScanner.cs:line 650
1>   at Cosmos.IL2CPU.ILScanner.ScanQueue() in D:\source\CosmosOS-Dev\CosmosOS\IL2CPU\source\Cosmos.IL2CPU\ILScanner.cs:line 755
1>   at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod, IEnumerable`1 plugsAssemblies) in D:\source\CosmosOS-Dev\CosmosOS\IL2CPU\source\Cosmos.IL2CPU\ILScanner.cs:line 270
1>   at Cosmos.IL2CPU.CompilerEngine.Execute() in D:\source\CosmosOS-Dev\CosmosOS\IL2CPU\source\Cosmos.IL2CPU\CompilerEngine.cs:line 186
1>IL2CPU task took 00:00:00.6579357
1>Done building project "CosmosKernel1.csproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 11:12 PM and took 02.039 seconds ==========

Visual Studio Output Logs
Post the entire output log given by Visual Studio for the build

How To Reproduce
Describe any changes done to a clean kernel for this error to occur.
Add the LiteDB nugget package

<PackageReference Include="LiteDB" Version="5.0.17" />

Instantiate a LiteDatabase Object

var database = new LiteDatabase("0:\\System\\Register.db");

Build
Screenshots
If applicable, add screenshots to help explain your problem.

Context
Before posting please confirm that the following are in order

  • Both Cosmos VS Extensions are installed
  • In the NuGet Package Manager "Include prerelease" is selected
  • The Cosmos NuGet package store is selected (NOT nuget.org) in 'Manage NuGet Packages'
  • The Cosmos NuGet packages are installed

Add any other context about the problem which might be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant