-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Interactive-Consolethe console experiencethe console experience
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
Description
When executing the Show-Command cmdlet through the PowerShell SDK on .NET 10, a fatal ExecutionEngineException (0x80131506) is thrown, causing an unrecoverable crash.
Some error is expected when this happens, however with .NET 10 the error cannot be caught and recovered from - it crashes the process.
Environment
- PowerShell SDK Versions: 7.4.13, 7.5.4, 7.6.0-preview.5
- .NET Target Framework: .NET 10.0
Reproduction
A minimal reproduction case is available at: https://github.com/mykhailos635/PowershellCrash
Stack Trace
Fatal error.
Internal CLR error. (0x80131506)
at DynamicClass.InvokeStub_ShowCommandHelper.get_ScreenHeight(System.Object, System.Object, IntPtr)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(System.Object, System.Reflection.BindingFlags)
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at System.Reflection.RuntimePropertyInfo.GetValue(System.Object, System.Object[])
at System.Management.Automation.Internal.GraphicalHostReflectionWrapper.GetStaticPropertyValue(System.String)
at Microsoft.PowerShell.Commands.ShowCommandProxy.get_ScreenHeight()
at Microsoft.PowerShell.Commands.ShowCommandCommand.BeginProcessing()
at System.Management.Automation.Cmdlet.DoBeginProcessing()
at System.Management.Automation.CommandProcessorBase.DoBegin()
at System.Management.Automation.CommandProcessor.DoBegin()
at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean)
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(System.Object)
at System.Management.Automation.PipelineOps.InvokePipeline(System.Object, Boolean, System.Management.Automation.CommandParameterInternal[][], System.Management.Automation.Language.CommandBaseAst[], System.Management.Automation.CommandRedirection[][], System.Management.Automation.Language.FunctionContext)
at System.Management.Automation.Interpreter.ActionCallInstruction6[...].Run(System.Management.Automation.Interpreter.InterpretedFrame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(System.Management.Automation.Interpreter.InterpretedFrame) at System.Management.Automation.Interpreter.Interpreter.Run(System.Management.Automation.Interpreter.InterpretedFrame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1(System.__Canon) at System.Management.Automation.DlrScriptCommandProcessor.RunClause(System.Action1, System.Object, System.Object)
at System.Management.Automation.DlrScriptCommandProcessor.Complete()
at System.Management.Automation.CommandProcessorBase.DoComplete()
at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(System.Management.Automation.CommandProcessorBase)
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(System.Object)
at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProcImpersonate()
at System.Threading.Thread.StartCallback()
Expected behavior
The code crashes with a recoverable error - the one that can be caught via try {} catch() {}Actual behavior
The code crashes with `ExecutionEngineException` which cannot be caught and the whole process crashes.Error details
Environment data
-Visuals
No response
mklement0 and dallmair
Metadata
Metadata
Assignees
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Interactive-Consolethe console experiencethe console experience