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

IL2CPU randomly fails at "Detecting fields for type 'IL2CPU.Debug.Symbols.LOCAL_ARGUMENT_INFO'" #204

Open
GoldenretriverYT opened this issue Jul 30, 2023 · 3 comments

Comments

@GoldenretriverYT
Copy link
Contributor

After adding some code (CommandEDIT class), I started getting this error.

1>------ Erstellen gestartet: Projekt: EtorumOS, Konfiguration: Debug Any CPU ------
1>Analysetools werden übersprungen, um den Build zu beschleunigen. Sie können den Befehl „Build“ oder „Rebuild“ ausführen, um Analyzer auszuführen.
1>C:\Users\user\source\repos\EtorumOS\EtorumOS\ETOScript\Commands\CommandCD.cs(2,7,2,18): warning CS0105: Die using-Direktive für "EtorumOS.IO" ist bereits vorher in diesem Namespace aufgetreten.
1>C:\Users\user\source\repos\EtorumOS\EtorumOS\ETOScript\Commands\CommandHELP.cs(2,7,2,18): warning CS0105: Die using-Direktive für "EtorumOS.IO" ist bereits vorher in diesem Namespace aufgetreten.
1>C:\Users\user\source\repos\EtorumOS\EtorumOS\ETOScript\Commands\Command.cs(150,17,150,34): warning CS0472: Das Ergebnis des Ausdrucks ist immer "false", da ein Wert vom Typ "int" niemals NULL vom Typ "int?" ist.
1>C:\Users\user\source\repos\EtorumOS\EtorumOS\Resources\ResourceManager.cs(20,30,20,41): warning CS0649: Dem Feld "ResourceManager.ZapLightPSF" wird nie etwas zugewiesen, und es hat immer seinen Standardwert von "null".
1>C:\Users\user\source\repos\EtorumOS\EtorumOS\ETOScript\Commands\CommandEDIT.cs(15,63,15,73): warning CS0414: Dem Feld "CommandEDIT.prevScollY" wurde ein Wert zugewiesen, der aber nie verwendet wird.
1>C:\Users\user\source\repos\EtorumOS\EtorumOS\ETOScript\Commands\CommandEDIT.cs(15,46,15,57): warning CS0414: Dem Feld "CommandEDIT.prevScrollX" wurde ein Wert zugewiesen, der aber nie verwendet wird.
1>EtorumOS -> C:\Users\user\source\repos\EtorumOS\EtorumOS\bin\Debug\net6.0\EtorumOS.dll
1>Executing IL2CPU on assembly
1>Kernel Base: Cosmos.System.Kernel
1>Checking target assembly: C:\Users\user\source\repos\EtorumOS\EtorumOS\bin\Debug\net6.0\EtorumOS.dll
1>IL2CPU : warning : Loading plugs from assembly: EtorumOS.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
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>Detecting fields for type 'IL2CPU.Debug.Symbols.FIELD_INFO'
1>Detecting fields for type 'IL2CPU.Debug.Symbols.FIELD_MAPPING'
1>Detecting fields for type 'IL2CPU.Debug.Symbols.MethodIlOp'
1>Detecting fields for type 'IL2CPU.Debug.Symbols.Document'
1>Detecting fields for type 'IL2CPU.Debug.Symbols.AssemblyFile'
1>Detecting fields for type 'IL2CPU.Debug.Symbols.Method'
1>Detecting fields for type 'IL2CPU.Debug.Symbols.LOCAL_ARGUMENT_INFO'
1>IL2CPU : error : Exception: System.InvalidOperationException: Value must be set.
1>   at Microsoft.Data.Sqlite.SqliteParameter.Bind(sqlite3_stmt stmt)
1>   at Microsoft.Data.Sqlite.SqliteParameterCollection.Bind(sqlite3_stmt stmt)
1>   at Microsoft.Data.Sqlite.SqliteCommand.GetStatements(Stopwatch timer)+MoveNext()
1>   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
1>   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
1>   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
1>   at IL2CPU.Debug.Symbols.SqliteBulkCopy.WriteToServer(IDataReader reader) in C:\Users\user\source\repos\Cosmos\IL2CPU\source\IL2CPU.Debug.Symbols\SqliteBulkCopy.cs:line 63
1>   at IL2CPU.Debug.Symbols.DebugInfo.BulkInsert[T](String aTableName, IList`1 aList, Int32 aFlushSize, Boolean aFlush) in C:\Users\user\source\repos\Cosmos\IL2CPU\source\IL2CPU.Debug.Symbols\DebugInfo.cs:line 512
1>   at IL2CPU.Debug.Symbols.DebugInfo.WriteAllLocalsArgumentsInfos(IList`1 aInfos) in C:\Users\user\source\repos\Cosmos\IL2CPU\source\IL2CPU.Debug.Symbols\DebugInfo.cs:line 487
1>   at Cosmos.IL2CPU.AppAssembler.FinalizeDebugInfo() in C:\Users\user\source\repos\Cosmos\IL2CPU\source\Cosmos.IL2CPU\AppAssembler.cs:line 414
1>   at Cosmos.IL2CPU.CompilerEngine.Execute() in C:\Users\user\source\repos\Cosmos\IL2CPU\source\Cosmos.IL2CPU\CompilerEngine.cs:line 197
1>IL2CPU task took 00:00:23.6525567
1>Die Erstellung des Projekts "EtorumOS.csproj" ist abgeschlossen -- FEHLER.
========== Build: 0 erfolgreich, 1 Fehler, 2 aktuell, 0 übersprungen ==========
========== Erstellen wurde am 2:35 PM gestartet und dauerte 24,750 Sekunden ==========

Can be, most likely, reproduced with this repo:
https://github.com/GoldenretriverYT/EtorumOS/tree/4b9d38be586a8833b6e609e2514b0e5d197d5180

@GoldenretriverYT
Copy link
Contributor Author

I have taken a look at it, it apparently happens when it inserts the local arguments info for methodlabel SystemInt32SystemCollectionsGenericLargeArrayBuilder1SystemStringCopyTog__CopyToCoresLine17_0SystemStringarraySystemInt32SystemCollectionsGenericLargeArrayBuilder1compiCF838E40B78958D0E25D02A89EDB9D69

@GoldenretriverYT
Copy link
Contributor Author

image
It happens with this method it seems (as the previous inserts are about these arguments and the method name matches too) but it tries to insert a third argument despite there not being a third one, causing Name of the LOCAL_ARGUMENT_INFO being null - which causes the crash.

@quajak
Copy link
Member

quajak commented Aug 9, 2023

Thanks for the reproduction case

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

2 participants