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

nanoCLR throws a System.AccessViolationException on Windows Server 2022 #1501

Closed
CoryCharlton opened this issue Jun 9, 2024 · 1 comment · Fixed by nanoframework/nf-interpreter#2957

Comments

@CoryCharlton
Copy link
Member

CoryCharlton commented Jun 9, 2024

Tool

nanoCLR

Description

Output on Windows 2019 hosted runner:

2024-06-09T18:38:56.0434330Z .NET nanoFramework nanoCLR CLI v1.0.569+1f788964e7
2024-06-09T18:38:56.0448626Z Copyright (C) 2021 .NET Foundation and nanoFramework project contributors
2024-06-09T18:38:56.0449212Z 
2024-06-09T18:38:56.0449219Z 
2024-06-09T18:38:56.2246973Z 
2024-06-09T18:38:56.2248161Z Loading nanoCLR v1.9.1.0
2024-06-09T18:38:56.2274046Z ...Starting...
2024-06-09T18:38:56.2277527Z Created EE.
2024-06-09T18:38:56.2278039Z Started Hardware.
2024-06-09T18:38:56.2281116Z Loading Assemblies.
2024-06-09T18:38:56.2281742Z Loading Deployment Assemblies.
2024-06-09T18:38:56.2282399Z Resolving.
2024-06-09T18:38:56.2282679Z 
2024-06-09T18:38:56.2283201Z Total: (0 RAM - 0 ROM - 0 METADATA)
2024-06-09T18:38:56.2283724Z 
2024-06-09T18:38:56.2284028Z    AssemblyRef    =        0 bytes (       0 elements)
2024-06-09T18:38:56.2284821Z    TypeRef        =        0 bytes (       0 elements)
2024-06-09T18:38:56.2285475Z    FieldRef       =        0 bytes (       0 elements)
2024-06-09T18:38:56.2286192Z    MethodRef      =        0 bytes (       0 elements)
2024-06-09T18:38:56.2286906Z    TypeDef        =        0 bytes (       0 elements)
2024-06-09T18:38:56.2287483Z    FieldDef       =        0 bytes (       0 elements)
2024-06-09T18:38:56.2288082Z    MethodDef      =        0 bytes (       0 elements)
2024-06-09T18:38:56.2288552Z    StaticFields   =        0 bytes (       0 elements)
2024-06-09T18:38:56.2288836Z 
2024-06-09T18:38:56.2288993Z    DebuggingInfo  =        0 bytes
2024-06-09T18:38:56.2289231Z 
2024-06-09T18:38:56.2289409Z    Attributes      =        0 bytes (       0 elements)
2024-06-09T18:38:56.2289962Z    TypeSpec        =        0 bytes (       0 elements)
2024-06-09T18:38:56.2290461Z    Resources Files =        0 bytes (       0 elements)
2024-06-09T18:38:56.2290921Z    Resources       =        0 bytes (       0 elements)
2024-06-09T18:38:56.2291352Z    Resources Data  =        0 bytes
2024-06-09T18:38:56.2291711Z    Strings         =        0 bytes
2024-06-09T18:38:56.2292052Z    Signatures      =        0 bytes
2024-06-09T18:38:56.2292403Z    ByteCode        =        0 bytes
2024-06-09T18:38:56.2292616Z 
2024-06-09T18:38:56.2292648Z 
2024-06-09T18:38:56.2292746Z Error: a2000000
2024-06-09T18:38:56.2293019Z Exiting.

Output on Windows 2022 hosted runner:

2024-06-09T18:39:17.3209874Z .NET nanoFramework nanoCLR CLI v1.0.569+1f788964e7
2024-06-09T18:39:17.3224081Z Copyright (C) 2021 .NET Foundation and nanoFramework project contributors
2024-06-09T18:39:17.3224939Z 
2024-06-09T18:39:17.3224948Z 
2024-06-09T18:39:17.6924799Z 
2024-06-09T18:39:17.6925375Z Loading nanoCLR v1.9.1.0
2024-06-09T18:39:17.7519301Z Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
2024-06-09T18:39:17.7673329Z Repeat 2 times:
2024-06-09T18:39:17.7674415Z --------------------------------
2024-06-09T18:39:17.7676358Z    at nanoFramework.nanoCLR.Host.Interop.nanoCLR.nanoCLR_Run(nanoFramework.nanoCLR.Host.nanoCLRSettings)
2024-06-09T18:39:17.7678476Z --------------------------------
2024-06-09T18:39:17.7679618Z    at nanoFramework.nanoCLR.Host.nanoCLRHost.Run()
2024-06-09T18:39:17.7682988Z    at nanoFramework.nanoCLR.CLI.ExecuteCommandProcessor.ProcessVerb(nanoFramework.nanoCLR.CLI.ExecuteCommandLineOptions, nanoFramework.nanoCLR.CLI.VirtualSerialDeviceManager)
2024-06-09T18:39:17.7686204Z    at nanoFramework.nanoCLR.CLI.Program+<>c__DisplayClass9_1.<Main>b__2(nanoFramework.nanoCLR.CLI.ExecuteCommandLineOptions)
2024-06-09T18:39:17.7694292Z    at CommandLine.ParserResultExtensions.MapResult[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](CommandLine.ParserResult`1<System.Object>, System.Func`2<System.__Canon,Int32>, System.Func`2<System.__Canon,Int32>, System.Func`2<System.__Canon,Int32>, System.Func`2<System.Collections.Generic.IEnumerable`1<CommandLine.Error>,Int32>)
2024-06-09T18:39:17.7700295Z    at nanoFramework.nanoCLR.CLI.Program+<>c__DisplayClass9_0.<Main>b__0()
2024-06-09T18:39:17.7701501Z    at nanoFramework.nanoCLR.CLI.Program.LogErrors(System.Action)
2024-06-09T18:39:17.7702633Z    at nanoFramework.nanoCLR.CLI.Program.Main(System.String[])
2024-06-09T18:39:20.5929808Z ...
2024-06-09T18:39:20.6020408Z ##[error]Process completed with exit code 1.

How to reproduce

https://github.com/CoryCharlton/nanoCLR_AccessViolationException/actions

Expected behaviour

nanoCLR should execute correctly.

Screenshots

No response

Aditional context

I'll try to spin up a Windows 2022 VM to see if it's specific to the OS or something to do with the GitHub hosted runner.

@CoryCharlton CoryCharlton changed the title nanoCLR throws a System.AccessViolationException in a Windows 2022 GitHub hosted runner nanoCLR throws a System.AccessViolationException on Windows Server 2022 Jun 9, 2024
@CoryCharlton
Copy link
Member Author

Confirmed that the issue presents itself in a clean install of Windows Server 2022 and is not specific to the GitHub Actions hosted runner:

image

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

Successfully merging a pull request may close this issue.

3 participants