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

Update jline to 3.21.0 #10177

Merged
merged 1 commit into from
Feb 3, 2022
Merged

Update jline to 3.21.0 #10177

merged 1 commit into from
Feb 3, 2022

Conversation

martint
Copy link
Member

@martint martint commented Dec 3, 2021

Fixes an incompatibility with ARM64:

    com.sun.jna.LastErrorException: [14] Bad address
    	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.$Proxy6.ioctl(Unknown Source)
    	at org.jline.terminal.impl.jna.osx.OsXNativePty.getSize(OsXNativePty.java:82)

@cla-bot cla-bot bot added the cla-signed label Dec 3, 2021
@martint martint requested a review from electrum December 3, 2021 21:16
@findinpath
Copy link
Contributor

@martint out of curiosity, how did you stumble on the exception you've mentioned in the description of the PR?

@martint
Copy link
Member Author

martint commented Dec 20, 2021

I ran the CLI on an M1 Mac. Just tried again and this time it crashed with a SIGSEGV:

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.sun.jna.Native.invokeVoid(Lcom/sun/jna/Function;JI[Ljava/lang/Object;)V+0
j  com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;ZI)Ljava/lang/Object;+42
j  com.sun.jna.Function.invoke(Ljava/lang/reflect/Method;[Ljava/lang/Class;Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+271
j  com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+390
j  com.sun.proxy.$Proxy6.ioctl(ILcom/sun/jna/NativeLong;Lorg/jline/terminal/impl/jna/osx/CLibrary$winsize;)V+27
j  org.jline.terminal.impl.jna.osx.OsXNativePty.getSize()Lorg/jline/terminal/Size;+26
j  org.jline.terminal.impl.AbstractPosixTerminal.getSize()Lorg/jline/terminal/Size;+4
j  org.jline.terminal.Terminal.getBufferSize()Lorg/jline/terminal/Size;+1
j  org.jline.reader.impl.LineReaderImpl.doDisplay()V+8
...

@robd003 robd003 mentioned this pull request Jan 7, 2022
8 tasks
@robd003
Copy link

robd003 commented Jan 7, 2022

Just tested and this fix works on Apple M1 systems.

@austenLacy
Copy link
Member

Any chance this could be looked at again?

@martint
Copy link
Member Author

martint commented Feb 1, 2022

Any chance this could be looked at again?

I'm looking into some integration tests that started failing with this PR.

@wendigo
Copy link
Contributor

wendigo commented Feb 2, 2022

@martint this is a bug in jline: jline/jline3#751

Could be worked around by removing secondary line prompt in InputReader:

.variable(SECONDARY_PROMPT_PATTERN, colored("%P -> "))

@wendigo
Copy link
Contributor

wendigo commented Feb 2, 2022

Or:

.variable(SECONDARY_PROMPT_PATTERN, isRealTerminal() ? colored("%P -> ") : "")

Works for me :)

@martint
Copy link
Member Author

martint commented Feb 3, 2022

@wendigo, updated with your suggestion. Thanks!

Fixes an incompatibility with ARM64:

    com.sun.jna.LastErrorException: [14] Bad address
    	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.$Proxy6.ioctl(Unknown Source)
    	at org.jline.terminal.impl.jna.osx.OsXNativePty.getSize(OsXNativePty.java:82)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants