-
Notifications
You must be signed in to change notification settings - Fork 513
Frequent powershell crashes #1346
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
Hi there, thanks for this. Can you attach the logs so we help further :) Instructions are here. |
Currently on short vacations. When I will get back I will try to reproduce all the errors. I have already verbose logging turned on. |
Thanks! Actually, can you set the log level to "Diagnostic"? That will give us even more logs. |
Will do! Are you aware of “junk” in intellisense in comparison to ISE? I get lots of useless variables, methods and so on being proposed by intellisense. I also seen intellisense proposing same things double (like VsCode actually loaded intellisense 2 times). |
@PrzemyslawKlys, we're always looking to improve intellisense, but I don't think there's an issue to track that. Would you be able to open an issue? Specifically interested in what you're seeing in terms of the quality of the intellisense, what junk items you're seeing and any duplication - especially in comparison to the ISE. |
Looks like it's dissecting URLs that maybe occur elsewhere in the document for fuzzy completions? I was under the impression it was a VSCode builtin feature to offer more completions when the ones we provide run out, but I can't find good documentation for it... |
If PowerShell can't provide items for the auto-completion list, VSCode will typically supply tokens from the current file plus snippets like |
|
|
|
And again.. opened folder, run the script once.. and stuck F5 does nothing to display finally 'timeout'. Also notice the Undefined message. I get that a lot as well. Also my number of plugins installed is much shorter then it seems. I have lots of disabled plugins (to keep track of nice plugins). |
1528455094-08d084d1-163a-456a-be16-ee6b11affefc1528455091368.zip This one holds a crash in the end. I saved file and it crashed powershell. |
Another one. This time i managed to work for a longer while. The last one crashed, after that powershell was unable to restart and I got 2 timeouts. Had to close VS Code and restart... unfortunetly that didn't help. When pressed F5 got this error And it's stuck like that with Starting status... after a while
|
Ah! This looks like a logger threading issue in the logs you attach. I believe this has been fixed since we moved to Serilog |
Try the preview here |
We are due for a release soon but there are still a couple of things to finish up before we're ready for it |
Yeah, you want to override. |
Logs from insider build. Same thing... |
And another one:
|
Actually one thing I noticed is that when you create an empty .ps1 file and press Ctrl+S (Save) it will crash powershell. |
OK, I can dupe this last one. I'll take a look at it. |
Hmm, well this sucks:
That right there seems to be the problem. |
@rjmholt I know what it is.. but the problem is regardless of my settings it's not working. And it only behaves like that sporadically. That's why I brought it up. It only happens for files created within VSCode. My default policy: |
Ah I see. Well it's complicated enough that it's hard to identify where the bug might be, but my instinct is that it might be a PowerShell bug. Worth opening an issue in the PowerShell repo |
@rjmholt it seems to only happen when VS crashes on the bug you fixed already. Do you have a new insiders version so I can see if it gets better? |
Try either of these: https://ci.appveyor.com/project/PowerShell/vscode-powershell/build/artifacts Probably the non-v2 artefact is the safer choice. |
Thank You! @rjmholt |
Let us know how you go! I'm hoping that a lot of the unstable behaviour you're seeing is because of that threaded logging bug... |
Do you know what's producing that warning? An NPM linter? Looks like it's complaining that we use uppercase letters. |
Yes, looks like uppercase letters are deprecated for some reason: https://docs.npmjs.com/files/package.json#name I don't think we're actually published on NPM, but could be wrong. Such a change could either be a total breaking change or totally inconsequential... |
There is a powershell package on npmjs.com but it isn't this one. I think that vscode extensions just happen to use npm pkg infrastructure but aren't real npm pkgs, kind of like published PowerShell modules use NuGet for packaging but aren't really NuGet pkgs. The worry would be if the "name" is a (case-sensitive) key for the VSCode Marketplace and changing the case would disassociate new versions of the extension with existing versions. I would hope not and that we could change it just to get rid of the warning. |
@rjmholt I don't want to jinx it but it seems VScode is now much better on the insiders version. Haven't had a crash and generally feels snappier. Was it the only change you did there (the crashing on empty file?) |
No jinxing at all -- if there's a bug, the only lucky part is finding it and working out what's causing it. To be honest, we've been slowly starting to focus our efforts at exactly what you're talking about; improving stability and performance (although there's plenty more work to do). I think the main thing stopping the crashes is making the logging thread-safe and asynchronous (PowerShell/PowerShellEditorServices#666), but there have been a couple of other improvements here and there. |
Event thou I don't use debugging I got this.. I can't do anything. I closed/killed powershell. Using 1.25 and 1.8. I just saw this first time ever when upgraded to 1.8. Before that I wasn't getting any notifications but the behavior was similar. VSCode being stuck until restart. Not sure if it's any help thou as I can't find anything to go on... And btw I've switched my VSCode a while ago so that F5 runs code without Debug... And I still get that that issue. |
Thanks for the info! Can you also attach the logs here so we can get a better idea of what's going on? |
@tylerl0706 unfortunately not for this one. Next time it happens I'll do so. Had it just once thou. |
Newest insiders version. |
New crashes.
Simply by running script |
Also notice what happens after that many crashes Maybe there is a way to clear intellisense on crash so it doesn't have all the old stuff. I guess you could clear it on initialization? Not sure if it would have wrong impact thou I actually tried to record this... but I tried to do it in small window. When in small window it wouldn't crash (weird) but then I maximize window.. rerun the script with F5 and it's crashing again. Don't think it's related but maybe. Keep in mind that all i do is press F5, F5, F5 and sometimes I use a shortcut to maximize window. My F5 is Start without Debugging. Please notice that the gif is "speed up" version of it. I didn't really work that fast :-) |
Maybe stupid thought.. but could it be related to terminal size? I can reproduce crashing heavily when I use VSCode on my 4k monitor from left to right (almost full screen - I do have Taskbar on the left side). I get it less frequently when I split screen. I've also found this artcile for PowerShell 6 - https://docs.microsoft.com/en-us/powershell/scripting/whats-new/breaking-changes-ps6?view=powershell-6 and relevant section
Maybe not really related but maybe something is indeed related to resizing. |
I have only reproduced this issue when either one of these options is set to true: It I avoid this, the issue was not appearing. |
I do use editor.FOrmatOnSave althought not sure if it's related. I actually disabled it now and no change. I can reproduce this all the time now. If I have powershell terminal on larger part of screen or fully vertical on full 4k it will crash with 259 error. No matter the code. If it's below certain width it will work. The moment I scale it on width it goes bonkers. |
Any progress made on this? I have VS Code installed on a few different windows machines, and lately I have to close and reopen VSC to run powershell. It will run the 1st time.... but subsequent testing requires a restart of the app. If I go down to the lower CLI half, I can run my code 100% of the time, It doesn't matter how simple of a program I write.... something just to get the date does it, I uninstalled.... removed all the associated directories and cleaned the computer. Rebooted, even. Reinstall fresh, only the powershell extension... still does it. Honestly, I cannot develop this way.... it's so painful. The issue started in the last few weeks or a month. I keep things really basic as far as extension go, I only use the official MS Powershell extension. Up until recently, this was my fav app to dev with (still is), but if I cannot get this resolved, I have to move on... any ideas? |
#1634 check this out @randygrolemund . It's a new issue on 1.10 version. Not related to this one. |
Thank you!! :)
On Thu, Dec 6, 2018 at 3:46 PM Przemysław Kłys ***@***.***> wrote:
#1634 <#1634> check
this out. It's a new issue on 1.10 version. Not related to this one.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1346 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AILwh7NjRKGcD909OxmBDwFtogWKN7Jvks5u2ZBGgaJpZM4UYA81>
.
--
Randy Sent from Gmail Mobile
|
System Details
$PSVersionTable
:Issue Description
I am fairly ok with PowerShell but I often abuse F5/CTRL+F5 to run code in terms of trying to run it.. fix small thing F5 and so on.. I often end up with script not running at all and at some point displaying this after few seconds

And this is just beginning. It seems I frequently get PowerShell crashes. I get this errors since ages so I doubt it's related to me running Insiders Windows version. Same script run fine in ISE and I can press F5 as many times I want.
Attached Logs
Follow the instructions in the README
about capturing and sending logs.
The text was updated successfully, but these errors were encountered: