Crash when using class

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.
This topic is 5 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
Gauletga
Posts: 11
Last visit: Sun Mar 10, 2024 8:16 am

Crash when using class

Post by Gauletga »

Hello,

I'd like to bring an issue when i try to work with class

The error happens when i try to work to put the object inside a System.Collections.Generic.List
When i move my mouse over the variable $Bouchonlist in the line $Bouchonlist = [System.Collections.Generic.List[bouchon]]::new()
or when i try to use directly the variable $Bouchonlist to access the methods.
PSS freeze and a dialog box appears with a message "Unhandled Exception: The specified method is not supported."

This work fine on ISE
unhandled Exception.PNG
unhandled Exception.PNG (4.41 KiB) Viewed 2259 times
In the first case (mouse over) the error log appear with this error and i need to close the file and reopen it to work again
--------------------------------------------------
[2018.10.20 - 23:11:37] Unhandled Exception:
La méthode spécifiée n'est pas prise en charge.
à System.Reflection.Emit.TypeBuilderInstantiation.GetConstructors(BindingFlags bindingAttr)
à ‚..(Type , String , Boolean , Int32& , Int32 )
à ‚..(IToken , Int32& , Type , Int32 )
à ‚..(Int32& , Int32 )
à ‚..(IToken , Int32& , Int32 )
à ‚..(Int32& , Int32 , Boolean , Boolean )
à ‚..( , IToken )
à ‚..( , String , Int32 , Type& )
à ‚..(IToken )
à ..(SyntaxEditor , EditorViewMouseEventArgs )
à ActiproSoftware.SyntaxEditor.SyntaxLanguage.#JYe(SyntaxEditor #bCb, EditorViewMouseEventArgs #yhb)
à ActiproSoftware.SyntaxEditor.SyntaxEditor.#t3e(EditorViewMouseEventArgs #yhb)
à ActiproSoftware.SyntaxEditor.EditorView.OnMouseHover(MouseEventArgs e)
à ActiproSoftware.WinUICore.UIElement.#gxe(MouseEventArgs #yhb)
à ActiproSoftware.WinUICore.UIControl.OnMouseHover(EventArgs e)
à System.Windows.Forms.Control.WndProc(Message& m)
à ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

On the second case (when i try to use directly the variable) the error log appear with this error and if i wait some time PSS seems ok and i can work again.
--------------------------------------------------
[2018.10.20 - 23:15:06] Unhandled Exception:
La méthode spécifiée n'est pas prise en charge.
à System.Reflection.Emit.TypeBuilderInstantiation.GetConstructors(BindingFlags bindingAttr)
à ‚..(Type , String , Boolean , Int32& , Int32 )
à ‚..(IToken , Int32& , Type , Int32 )
à ‚..(Int32& , Int32 )
à ‚..(IToken , Int32& , Int32 )
à ‚..(Int32& , Int32 , Boolean , Boolean )
à ‚..( , IToken )
à ‚..( , String , Int32 , Type& )
à ‚..(IToken )
à ‚..(Int32 , IToken , String& )
à ‚..(Int32 , IToken , String& , Object& )
à ..(SyntaxEditor , Int32 )
à ..(SyntaxEditor , KeyTypedEventArgs )
à ActiproSoftware.SyntaxEditor.SyntaxEditor.#h3e(EditorView #N5b, Keys #oVe, Char #2Ne, Boolean #5Pe)
à ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyPress(KeyPressEventArgs e)
à System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
à System.Windows.Forms.Control.WmKeyChar(Message& m)
à System.Windows.Forms.Control.WndProc(Message& m)
à ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
--------------------------------------------------


  1. Class bouchon{
  2.     [string]$name
  3.     [int]$size
  4.     [string]$Maker
  5.    
  6.     bouchon()
  7.     {
  8.     }
  9.    
  10.     [Void]Insert([String]$name, [int]$size, [string]$Maker)
  11.     {
  12.         $this.Name = $name
  13.         $this.size = $size
  14.         $this.Maker = $Maker
  15.     }
  16.  
  17. }
  18. $Bouchonlist = [System.Collections.Generic.List[bouchon]]::new()
  19.  
  20. $Model = [bouchon]::new()
  21. $Model.Insert("Bouchon1", "2", "John")
Product : PowerShell Studio 2018 (64 bit)
Version : 5.5.155
OS : Windows 10 1709 (64 bit)

Thanks for the help.
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Crash when using class

Post by mxtrinidad »

Thanks for reporting this issue.

We'll investigate further and get back to you as soon as possible.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Crash when using class

Post by davidc »

The crash will be resolved in the next service release.
David
SAPIEN Technologies, Inc.
User avatar
Gauletga
Posts: 11
Last visit: Sun Mar 10, 2024 8:16 am

Re: Crash when using class

Post by Gauletga »

Thank you
This topic is 5 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.