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

readLine causing java.lang.ArrayIndexOutOfBoundsException #84

Closed
jmagana2000 opened this issue Jun 26, 2020 · 1 comment
Closed

readLine causing java.lang.ArrayIndexOutOfBoundsException #84

jmagana2000 opened this issue Jun 26, 2020 · 1 comment
Labels
bug Installation and functionality issues

Comments

@jmagana2000
Copy link

When trying to use readLine in Jupyter Notebook it raises an exception

val name = readLine()

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 6
org.jetbrains.kotlin.jupyter.JupyterConnection$StdinInputStream.read(connection.kt:91)
kotlin.io.LineReader.readLine(Console.kt:173)
kotlin.io.ConsoleKt.readLine(Console.kt:148)
Line_19_jupyter.(Line_19.jupyter.kts:5)
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.evalWithConfigAndOtherScriptsResults(BasicJvmScriptEvaluator.kt:96)
kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.invoke$suspendImpl(BasicJvmScriptEvaluator.kt:41)
kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.invoke(BasicJvmScriptEvaluator.kt)
kotlin.script.experimental.jvm.BasicJvmReplEvaluator.eval(BasicJvmReplEvaluator.kt:51)
org.jetbrains.kotlin.jupyter.ReplForJupyterImpl$doEval$resultWithDiagnostics$1.invokeSuspend(repl.kt:486)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
org.jetbrains.kotlin.jupyter.ReplForJupyterImpl.doEval(repl.kt:486)
org.jetbrains.kotlin.jupyter.ReplForJupyterImpl.eval(repl.kt:342)
org.jetbrains.kotlin.jupyter.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:143)
org.jetbrains.kotlin.jupyter.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt)
org.jetbrains.kotlin.jupyter.ProtocolKt.evalWithIO(protocol.kt:356)
org.jetbrains.kotlin.jupyter.ProtocolKt.shellMessagesHandler(protocol.kt:142)
org.jetbrains.kotlin.jupyter.IkotlinKt.kernelServer(ikotlin.kt:104)
org.jetbrains.kotlin.jupyter.IkotlinKt.main(ikotlin.kt:59)

@altavir
Copy link
Contributor

altavir commented Jun 26, 2020

The exception is bad, but it should not work in Jupyter anyway. We need to think about widgets support for that.

@ileasile ileasile added the bug Installation and functionality issues label Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Installation and functionality issues
Projects
None yet
Development

No branches or pull requests

3 participants