Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash table containing 10 custom PSObjects #1340

Closed
bilscoman opened this issue Feb 6, 2020 · 1 comment
Closed

Hash table containing 10 custom PSObjects #1340

bilscoman opened this issue Feb 6, 2020 · 1 comment

Comments

@bilscoman
Copy link

Passing a hash table containing 10 custom psobjects to a function call resulted in the below error message.

$hostSyncHash = @{}
foreach ($line in $a ) {
$HostSyncObject = New-Object -TypeName psobject
$HostSyncObject | Add-Member -MemberType NoteProperty -Name "HostInTable" -value $line.HostInTable
$HostSyncObject | Add-Member -MemberType NoteProperty -Name "HostInFile" -value $line.hostinfile
$HostSyncObject | Add-Member -MemberType NoteProperty -Name "outtable" -value $line.outtable
$HostSyncObject | Add-Member -MemberType NoteProperty -Name "outfile" -value $line.outfile
$HostSyncObject | Add-Member -MemberType NoteProperty -Name "SqlFile" -value $line.SqlFile
$HostSyncObject | Add-Member -MemberType NoteProperty -Name "Delimiter" -value $Config.Settings.Delimiter
$HostSyncObject | Add-Member -MemberType NoteProperty -Name "InDir" -value $Config.Settings.HostInFileDir
$HostSyncObject | Add-Member -MemberType NoteProperty -Name "PrepDir" -value $Config.Settings.ScriptDir
$HostSyncObject | Add-Member -MemberType NoteProperty -Name "OutDir" -value $Config.Settings.HostOutFileDir
$HostSyncObject | Add-Member -MemberType NoteProperty -Name "CreateTables" -value $config.Settings.SqlCreateTables
$hostSyncHash.add($HostSyncObject.HostInTable, $HostSyncObject)
}

fillData $dt $SqlConnection $hostSyncHash

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 200 Keys:
o s t S y n c H a s h Space # Space f u n c t i o n Space t o Space a d d Space d a t a Space t o Space d a t a t a b l e Enter
Space Space Space Space Space Space $ d t c o u n t Space = Space $ d t Space | Space g m Space - m e m b e r t y p e Space P r o p e r t i e s Enter
Space Space Space Space Space Space $ d t i n d e x Space = Space $ d t c o u n t . l e n g t h Enter
Space Space Space Space Space Space $ f o r m H a s h . a d d ( $ d t . t a b l e n a m e , Space $ d t i n d e x Space ) Enter
Space Space Space Space Space Space Space Space Space Space Space Space } Enter
Space Space Space Space } Enter
Space Space Space Space

Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -11.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Feb 6, 2020
@daxian-dbw
Copy link
Member

From the bug report template:

The maintainer may close your issue without further explanation or engagement if:
- You delete this entire template and go your own path;

This issue will be closed because you didn't follow the bug report template to provide environment data and repro steps.

At any rate, the reported issue was fixed in recent versions. See the pinned issue #1306

@ghost ghost removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants