Page 1 of 1

Crash when using class

Posted: Sat Oct 20, 2018 2:26 pm
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 2258 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.

Re: Crash when using class

Posted: Sun Oct 21, 2018 1:44 pm
by mxtrinidad
Thanks for reporting this issue.

We'll investigate further and get back to you as soon as possible.

Re: Crash when using class

Posted: Tue Oct 23, 2018 11:27 am
by davidc
The crash will be resolved in the next service release.

Re: Crash when using class

Posted: Wed Oct 24, 2018 1:35 pm
by Gauletga
Thank you