Page 1 of 1

PowerShell Studio Unhandled Exception

Posted: Tue Jan 15, 2019 11:27 am
by 4lch4_ExtraTxt
Hey SAPIEN,

I've been using a trial version of PowerShell Studio to help convince my bosses to buy some licenses and I keep encountering an error. I'm not certain what steps to take to cause it, but it usually happens when a file has been edited and the changes haven't been saved, but I have auto-save configured to run every minute and save the file.

Each time the error occurs, a file is opened in Notepad with the following error:
[2019.01.15 - 12:40:33] Unhandled Exception:
Object reference not set to an instance of an object.
   at System.Windows.Forms.PropertyGrid.set_SelectedObjects(Object[] value)
   at €..()
   at €..(Object )
   at ..(Boolean )
   at ..(Object , EventArgs )
   at System.Windows.Forms.Control.OnEnter(EventArgs e)
   at System.Windows.Forms.Form.OnEnter(EventArgs e)
   at System.Windows.Forms.ContainerControl.UpdateFocusedControl()
I've encountered it 3 separate times now, all with the same error and stack trace.

If there's any other information I can provide to help diagnose the issue let me know and I'll do my best to provide it.

Re: PowerShell Studio Unhandled Exception

Posted: Tue Jan 15, 2019 11:31 am
by 4lch4_ExtraTxt
Of course, shortly after my previous reply I seem to have found some steps to reproduce the bug.
  1. Enable auto save every 1 minute in Options -> Backup
  2. Open a .ps1 script in PowerShell Studio and make some changes.
  3. Press the Alt key, bringing up the shortcut info for each item in the ribbon.
  4. Wait until the file is auto-saved.
  5. Click in the editor and the error appears.

Re: PowerShell Studio Unhandled Exception

Posted: Tue Jan 15, 2019 1:02 pm
by Olga_B
Hello Devin,

I can't reproduce this issue. Can you attache the file that you are working with or download it here:
https://www.sapien.com/support/upload

Re: PowerShell Studio Unhandled Exception

Posted: Wed Jan 16, 2019 10:22 am
by davidc
Hey Devin,

I have a few quick questions for you:

1. What build are you using?
2. Do you have multiple documents open?
3. Do you have a project open?
4. Is the start page also open?

Thank you,

Re: PowerShell Studio Unhandled Exception

Posted: Thu Jan 17, 2019 6:58 am
by 4lch4_ExtraTxt
I've answered your questions below, however, I've been trying to reproduce the issue again on my end to get better steps and have been unsuccessful. If I run into it again I'll try to narrow it down to fewer steps.

Hey Olga, I've attached the project below that I was working in when this error occurred.

And hey to you too, David. Here's my responses to your questions (sorry for not providing it in my initial post, I knew I was forgetting something basic):
  1. 5.6.156
  2. I did, I had the psd1, psm1 Restart-JBService.ps1, and Start Page open.
  3. Yes, I have the Artemis project open that I attached.
  4. Yes, the Start Page is open as well.

Re: PowerShell Studio Unhandled Exception

Posted: Thu Jan 17, 2019 8:17 am
by Olga_B
Hi Devin,

I still can't reproduce the issue.
More questions:
- where is the project located on local drive or on network?
- when you changing .ps1 file - what changes are you doing? is it some particular function?

Re: PowerShell Studio Unhandled Exception

Posted: Thu Jan 17, 2019 10:34 am
by 4lch4_ExtraTxt
The project is located on a local drive, and I was only adding a blank line when editing the file. However, I've not been able to reproduce it on my end since it first happened the other day.

If it happens again I'll post here with some more information.

Re: PowerShell Studio Unhandled Exception

Posted: Fri Jan 25, 2019 6:54 pm
by 4lch4_ExtraTxt
I still have yet to encounter this issue so I would consider it a rare enough occurrence to not worry about.

If I run into anything in the future I'll be sure to make a post. Thanks for the help, everyone! :D