Skip to content
New issue

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

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

Already on GitHub? # to your account

LastErrorException in case of Ctrl+C for jline run as eclipse plugin #417

Open
snuyanzin opened this issue Jul 15, 2019 · 0 comments
Open

Comments

@snuyanzin
Copy link
Contributor

snuyanzin commented Jul 15, 2019

The app is an eclipse plugin and fails after ctrl+c as

com.sun.jna.LastErrorException: [5] Input/output error
	at com.sun.jna.Native.invokeVoid(Native Method)
	at com.sun.jna.Function.invoke(Function.java:415)
	at com.sun.jna.Function.invoke(Function.java:361)
	at com.sun.jna.Library$Handler.invoke(Library.java:265)
	at com.sun.proxy.$Proxy3.tcsetattr(Unknown Source)
	at org.jline.terminal.impl.jna.linux.LinuxNativePty.doSetAttr(LinuxNativePty.java:89)
	at org.jline.terminal.impl.AbstractPty.setAttr(AbstractPty.java:29)
	at org.jline.terminal.impl.AbstractPosixTerminal.setAttributes(AbstractPosixTerminal.java:52)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:650)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:457)
	at sqlline.SqlLine.begin(SqlLine.java:538)
	at com.github.vlsi.mat.calcite.Executor.start(Executor.java:40)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1471)

I also tried to turn off jna and use jansi. In this case there is a bit different exception

java.io.IOError: java.io.IOException: Input/output error
	at org.jline.keymap.BindingReader.readCharacter(BindingReader.java:143)
	at org.jline.keymap.BindingReader.readBinding(BindingReader.java:110)
	at org.jline.keymap.BindingReader.readBinding(BindingReader.java:61)
	at org.jline.reader.impl.LineReaderImpl.doReadBinding(LineReaderImpl.java:848)
	at org.jline.reader.impl.LineReaderImpl.readBinding(LineReaderImpl.java:868)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:575)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:457)
	at sqlline.SqlLine.begin(SqlLine.java:539)
	at com.github.vlsi.mat.calcite.Executor.start(Executor.java:40)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1471)
Caused by: java.io.IOException: Input/output error
	at java.base/java.io.FileInputStream.read0(Native Method)
	at java.base/java.io.FileInputStream.read(FileInputStream.java:225)
	at org.jline.terminal.impl.AbstractPty$PtyInputStream.read(AbstractPty.java:73)
	at org.jline.utils.NonBlockingInputStream.read(NonBlockingInputStream.java:62)
	at org.jline.utils.NonBlocking$NonBlockingInputStreamReader.read(NonBlocking.java:168)
	at org.jline.utils.NonBlockingReader.read(NonBlockingReader.java:57)
	at org.jline.keymap.BindingReader.readCharacter(BindingReader.java:133)
	... 21 more

What could be an issue?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant