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

Crash in rep by entering \, enter, enter. #2153

Open
PieterOlivier opened this issue Feb 24, 2025 · 0 comments
Open

Crash in rep by entering \, enter, enter. #2153

PieterOlivier opened this issue Feb 24, 2025 · 0 comments

Comments

@PieterOlivier
Copy link
Contributor

Describe the bug

If you start a new repl and enter a backslash () followed by two "enter" keypresses the repl crashes.

Repl output

Version: Rascal version not specified in META-INF/MANIFEST.MF???
rascal>\
│2 >>>>
Unexpected (uncaught) exception, closing the REPL:
java.lang.IndexOutOfBoundsException: start 1, end 2, length 1java.lang.IndexOutOfBoundsException: start 1, end 2, length 1
        at java.base/java.lang.AbstractStringBuilder.checkRange(AbstractStringBuilder.java:1716)
        at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:631)
        at java.base/java.lang.StringBuilder.append(StringBuilder.java:217)
        at org.jline.jansi.Ansi.a(Ansi.java:781)
        at org.rascalmpl.repl.rascal.ParseErrorPrinter.writeUnderLine(ParseErrorPrinter.java:121)
        at org.rascalmpl.repl.rascal.ParseErrorPrinter.highlightErrorInInput(ParseErrorPrinter.java:205)
        at org.rascalmpl.repl.rascal.ParseErrorPrinter.buildPromptError(ParseErrorPrinter.java:129)
        at org.rascalmpl.repl.rascal.ParseErrorPrinter.parseErrorMaybePrompt(ParseErrorPrinter.java:68)
        at org.rascalmpl.repl.rascal.RascalReplServices.handleInput(RascalReplServices.java:112)
        at org.rascalmpl.repl.BaseREPL.handleInput(BaseREPL.java:213)
        at org.rascalmpl.repl.BaseREPL.run(BaseREPL.java:130)
        at org.rascalmpl.shell.REPLRunner.run(REPLRunner.java:34)
        at org.rascalmpl.shell.RascalShell.main(RascalShell.java:53)

Version info
Latest version of Rascal on the main branch (commit id: #2bb56f8d4b8eedba74fe03aba588d5c8783ca192)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant