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

No anda bien la terminal #3961

Closed
3 tasks done
Clari87 opened this issue Feb 29, 2024 · 1 comment
Closed
3 tasks done

No anda bien la terminal #3961

Clari87 opened this issue Feb 29, 2024 · 1 comment

Comments

@Clari87
Copy link

Clari87 commented Feb 29, 2024

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

Excepción:
System.ArgumentOutOfRangeException: El valor debe ser mayor que o igual a cero y menor que el tamaño de búfer de consola en dicha dimensión.
Nombre del parámetro: left
Valor actual -1.
   en System.Console.SetCursorPosition(Int32 left, Int32 top)
   en Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
   en Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   en Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   en Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   en Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   en Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   en Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   en Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------
PS C:\Users\Clarisa Martinez\Desktop\PRACTICA_VACACIONES\Practica_programacion_vacaciones\practica0>^T^T^Tt c:; cd 'c:\Users\Clarisa Martinez\Desktop\PRACTICA_VACACIONES\Practica_programacion_vacaciones\practica0'; & 'C:\Program Files\Eclipse Adoptium\jdk-17.0.7.7-hotspot\bin\java.exe' '-XX:+ShowCodeDetailsInExceptionMessages' '-cp' 'C:\Users\Clarisa Martinez\Desktop\PRACTICA_VACACIONES\Practica_programacion_vacaciones\practica0\bin' 'practica1.ejercicio5'

Screenshot

captura_terminal

Environment data

PS Version: 5.1.19041.4046
PS HostName: Windows PowerShell ISE Host
PSReadLine Version: 
PSReadLine EditMode: Windows
OS: 10.0.19041.3691 (WinBuild.160101.0800)
Controlador no válido.
En línea: 25 Carácter: 32
+     Write-Host "BufferWidth: $([console]::BufferWidth)"
+                                ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], IOException
    + FullyQualifiedErrorId : System.IO.IOException
 
BufferWidth: 
Controlador no válido.
En línea: 26 Carácter: 33
+     Write-Host "BufferHeight: $([console]::BufferHeight)"
+                                 ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], IOException
    + FullyQualifiedErrorId : System.IO.IOException
 
BufferHeight: 


PS C:\Users\Clarisa Martinez> & {

Steps to reproduce

package practica1;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class ejercicio5 {
public static void main(String[]args){
String nombre="Carlos";
int edad=20;
double altura=1.5;
String ocupacion="bombero";

    try {BufferedReader entrada=new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Ingresar nombre: ");
        nombre=entrada.readLine();
        System.out.println("Ingresar edad: ");
        edad=Integer.valueOf(entrada.readLine());
        System.out.println("Ingresar altura: ");
        altura=Double.valueOf(entrada.readLine());
        System.out.println("Ingresar ocupacion: ");
        ocupacion=entrada.readLine();

        System.out.println("Nombre: "+nombre);
        System.out.println("Edad: "+edad);
        System.out.println("Altura: "+altura);
        System.out.println("Ocupación: "+ocupacion);
        
    } catch (Exception e) {
        System.out.println("Error");
    }
}

}

Expected behavior

Ingresar nombre:
Carlos
Ingresar edad:
20
Ingresar altura:
1.5
Ingresar ocupacion:
bombero

Nombre: Carlos
Edad: 20
Altura: 1.5
Ocupación: bombero

Actual behavior

PS C:\Users\Clarisa Martinez\Desktop\PRACTICA_VACACIONES\Practica_programacion_vacaciones\practica0>
Se produjo un error. Informa de este error indicando los detalles que tienes a continuación.
Informe de GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Últimas 200 claves:
. 7 - h o t s p o t Ctrl+Alt+\ b i n Ctrl+Alt+\ j a v a . e x e ' Space ' - X X : + S h o w C o d e D e t a i l s I n E x c e p t i o n M e s s a g e s ' Space ' - c p ' Space ' C : Ctrl+Alt+\ U s e
r s Ctrl+Alt+\ C l a r i s a Space M a r t i n e z Ctrl+Alt+\ D e s k t o p Ctrl+Alt+\ P R A C T I C A _ V A C A C I O N E S Ctrl+Alt+\ P r a c t i c a _ p r o g r a m a c i o n _ v a c a c i o n e s
Ctrl+Alt+\ p r a c t i c a 0 Ctrl+Alt+\ b i n ' Space ' p r a c t i c a 1 . e j e r c i c i o 5 ' Space Enter

Excepción:
System.ArgumentOutOfRangeException: El valor debe ser mayor que o igual a cero y menor que el tamaño de búfer de consola en dicha dimensión.
Nombre del parámetro: left
Valor actual -1.
en System.Console.SetCursorPosition(Int32 left, Int32 top)
en Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
en Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
en Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
en Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
en Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) en Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
en Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
en Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

PS C:\Users\Clarisa Martinez\Desktop\PRACTICA_VACACIONES\Practica_programacion_vacaciones\practica0>

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Feb 29, 2024
Copy link

This issue was already fixed (see #1306). Please upgrade to the 2.3.4 version of PSReadLine from PowerShell Gallery.
See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Feb 29, 2024
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

1 participant