-
Notifications
You must be signed in to change notification settings - Fork 513
InsufficientExecutionStackException: Insufficient stack to continue executing the program safely. #3963
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
Comments
There are few issues reported on this, it seems that the stack capacity is really small in that version of PS when running in a job: What these issue don't mention (AFAIK) is failing when there are more testcases. It also does not sound plausible to me, because test cases are flat, and there is no difference (scope depth wise) from having 1 test with no test cases, and a test with 1 or 10 test cases. Invoke-Pester -Container (New-PesterContainer -ScriptBlock {
BeforeAll {
function How-Deep () {
$s = 1
while (-not (Get-Variable -Scope $s -Name Error -ErrorAction Ignore)) {
$s++
}
$s - 1
}
}
Describe "a" {
It "b" {
Write-Host (How-Deep)
}
It "c" -TestCases @{ a = "b" } {
Write-Host (How-Deep)
}
It "d" -TestCases @(
@{ a = "b" }
@{ a = "b" }
@{ a = "b" }
) {
Write-Host (How-Deep)
}
}
}) -Output Detailed
You can try seeing how much of callstack is left for you: Or maybe some of the other issues has more hints: https://github.com/search?q=org%3Apester+The+script+failed+due+to+call+depth+overflow+is%3Aissue&type=issues We classified it as external bug. |
@fflaten summarized what's going on well here: #3962 (comment) |
Mm, it is really weird it's happening only in the IC (though plausible as other overhead is incurred since it's servicing LSP requests etc.) and only with more tests being run... |
I appear to have the same issue. I only noticed it yesterday - it had been working as recently as 3 weeks ago. I use VSCode (Windows). I get when I run the command below more than once in the same VSCode session. OR if it finds more than 1 or 2 .Test.ps1 files then it will return the error after 1 or 2 .Test files. All Test files pass when run individually. The only "change" I know of is VSCode just released an update (however I tried backing out the update and it still failed) $TestAllPath="C:\Users\s1899925\GitHub\ReconNET-Tools_Testing" Invoke-Pester -Output Detailed -Path $TestAllPath |
This just got fixed by @nohwnd in PowerShell/PowerShellEditorServices#1797. We'll get a release out ASAP. |
This issue has been marked as fixed. It has been automatically closed for housekeeping purposes. |
Prerequisites
Summary
Since upgrading the PowerShell extension to 2022.5.1, some Pester tests in a few projects are failing with this error and if there are more than 5 test cases:
I don't see any recursive calls in the Pester code.
This only fails in the
PowerShell Integrated Console
and works fine in the console just named 'powershell`.I have tried to narrow it down a bit. If I lower the number if test cases to 5 in
.\tests\ConfigData\CompositeResources.Tests.ps1::67
($testCases[0..4
), the tests pass. If I add one ($testCases[0..5]
), I get aScriptCallDepthException
.If I downgrade to the PowerShell extension version 2021.12.0, things run regardless how many test cases I have.
@nohwnd, have you seen something similar by any chance?
PowerShell Version
Visual Studio Code Version
Extension Version
[email protected]
Steps to Reproduce
In a VSCode terminal:
Visuals
NA
Logs
The text was updated successfully, but these errors were encountered: