"?" in script causes PowerShell Studio to crash

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
RossFH
Posts: 11
Joined: Tue Feb 23, 2016 2:48 pm

"?" in script causes PowerShell Studio to crash

Post by RossFH »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2020 (64 Bit) v5.7.182
Operating system: Windows 10 Enterprise (64 Bit) v10.0.19041.0
PowerShell version(s): 5.1 & 7.0

*** Please add details and screenshots as needed below. ***

I'm running into an issue where if I type a question mark (alias for where-object) into a script, it instantly causes PowerShell Studio to freeze, and I have to kill it through Task Manager. Upon relaunching, it works as expected until I type a question mark again.

I've tried rebooting and uninstalling/reinstalling to no avail.
Attachments
Task Manger showing PowerShell Studio not responding.
Task Manger showing PowerShell Studio not responding.
taskman.png (63.22 KiB) Viewed 803 times
Example of code that crashes PowerShell Studio
Example of code that crashes PowerShell Studio
PSStudio_CodeExample.png (21.88 KiB) Viewed 803 times

User avatar
Olga_B
Site Admin
Posts: 154
Joined: Mon May 15, 2017 9:06 am

Re: "?" in script causes PowerShell Studio to crash

Post by Olga_B »

I was not able to reproduce this on our testing environment.
What settings in Options do you have? Is it set to automatically expand aliases or having alias tab expansion enabled

User avatar
RossFH
Posts: 11
Joined: Tue Feb 23, 2016 2:48 pm

Re: "?" in script causes PowerShell Studio to crash

Post by RossFH »

Automatically expand aliases is not enabled. Tab expansion is enabled. I'm attaching screenshots of my Editor settings.
Attachments
Options3.png
Options3.png (37.76 KiB) Viewed 787 times
Options2.png
Options2.png (49.38 KiB) Viewed 787 times
Options1.png
Options1.png (50.4 KiB) Viewed 787 times

User avatar
Olga_B
Site Admin
Posts: 154
Joined: Mon May 15, 2017 9:06 am

Re: "?" in script causes PowerShell Studio to crash

Post by Olga_B »

Thanks, we will investigate the issue.
One more question: is this happened with any files: .ps1, .psf, project?
Any errors in Event Viewer?

User avatar
RossFH
Posts: 11
Joined: Tue Feb 23, 2016 2:48 pm

Re: "?" in script causes PowerShell Studio to crash

Post by RossFH »

There are no Sapien-related errors in the event log.

I did some additional testing, and this happens with .ps1 and .psm1 files. It does not happen with .psf and .psd1 files.

User avatar
brittneyr
Site Admin
Posts: 689
Joined: Thu Jun 01, 2017 7:20 am
Answers: 10
Been upvoted: 8 times

Re: "?" in script causes PowerShell Studio to crash

Post by brittneyr »

We have been able to reproduce this crash bug and have filed a bug report with the development team. It will be fixed in the next service release.

We were only able to reproduce this when running with V7 and the line with '?' on the last line of the document.
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
brittneyr
Site Admin
Posts: 689
Joined: Thu Jun 01, 2017 7:20 am
Answers: 10
Been upvoted: 8 times

Re: "?" in script causes PowerShell Studio to crash

Post by brittneyr »

Please try build 5.8.183 and let me know if this issue is resolved for you.
Brittney Ryn
SAPIEN Technologies, Inc.