Unhandled exception on "Find All References"

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
datacore.glenn
Posts: 30
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Mon Apr 09, 2012 1:45 am

Unhandled exception on "Find All References"

Post by datacore.glenn »

64-bit Windows 10
PowerShell Studio 2017 v5.4.138

Hello Support,

I've encountered an issue which appears similar to that previously reported by another user: viewtopic.phpf=12&t=9605&p=51978&hilit= ... ces#p51978

However in my case it matters not whether I invoke Find All References via right-click menu or Ctrl+Alt+F, an exception occurs either way. I've tried creating a new project and adding the original script files to it one at a time until the behaviour is seen and in doing so I believe I have isolated a single script whose content is triggering the issue.

This didn't always occur with this project and doesn't affect any of my other projects, therefore please might you take a look and help me further isolate the offending text/content? Since this is a commercial project I will not be posting the script here. Perhaps you can provide a secure upload location? Thank you.

I should mention that the project compiles to a fully functional .exe, this just appears to be some issue with parsing the script within the PSS IDE.

Kind regards,
Glenn


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at ..(String , String , , List`1& , Boolean , Boolean , Boolean )
at ..(String , String , , List`1& , Boolean , Boolean , Boolean )
at ..(String , String , , List`1& , Boolean , Boolean , Boolean )
at ..(Int32 )
at ..?(Object , EventArgs )
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: Unhandled exception on "Find All References"

Post by davidc »

Yes, we would be happy to help. You can upload the offending file our Supports Upload page:

https://www.sapien.com/support/upload

Once we have the file, we will try to reproduce the issue and hopefully find the cause.
David
SAPIEN Technologies, Inc.

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: Unhandled exception on "Find All References"

Post by davidc »

When you are invoking Find All References, what are you referencing? A variable or a function?
David
SAPIEN Technologies, Inc.

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: Unhandled exception on "Find All References"

Post by davidc »

I believe we resolved the issue on our end. Does the trouble script contain any of the following cmdlets?

Clear-Variable
Set-Variable
Get-Variable
Import-LocalizedData
Tee-Object

If so, that is the likely cause of the crash and it will be resolved in the next service build.
David
SAPIEN Technologies, Inc.

User avatar
datacore.glenn
Posts: 30
Joined: Mon Apr 09, 2012 1:45 am

Re: Unhandled exception on "Find All References"

Post by datacore.glenn »

Hi David,

Thank you for your prompt reply. I am referencing a variable at the time of exception and yes, my script does contain one of the those cmdlets - Get-Variable. This could well be the point of difference between it and the other scripts which I don't encounter the issue with.

I will await the next service release.

Thanks,
Glenn