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

Crashes on Emacs master. exited abnormally with code 13 #29

Closed
shamefulCake1 opened this issue Jan 19, 2024 · 2 comments
Closed

Crashes on Emacs master. exited abnormally with code 13 #29

shamefulCake1 opened this issue Jan 19, 2024 · 2 comments

Comments

@shamefulCake1
Copy link

I am editing a simple Java for Android project, and (eglot-java-mode) does not even start.
Error buffer:

[jsonrpc] D[09:52:40.631] Running language server: /usr/lib64/zulu-openjdk11/bin/java -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -jar /home/lockywolf/.emacs.d/share/eclipse.jdt.ls/plugins/org.eclipse.equinox.launcher_1.6.700.v20231214-2017.jar -configuration /home/lockywolf/.emacs.d/share/eclipse.jdt.ls/config_linux -data /home/lockywolf/.emacs.d/eglot-java-eclipse-jdt-cache/fb975d1c5daaeb77385e3b232729edd2
[jsonrpc] e[09:52:40.633] --> initialize[1] {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"processId":4795,"clientInfo":{"name":"Eglot","version":"1.15"},"rootPath":"/home/lockywolf/OfficialRepos/Telegram/TMessagesProj/","rootUri":"file:///home/lockywolf/OfficialRepos/Telegram/TMessagesProj","initializationOptions":{"extendedClientCapabilities":{"classFileContentsSupport":true},"workspaceFolders":["file:///home/lockywolf/OfficialRepos/Telegram/TMessagesProj"],"settings":{"java":{"home":"/usr/lib64/zulu-openjdk8"},"import":{"gradle":{"enabled":true},"wrapper":{"enabled":true}}}},"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true,"workspaceFolders":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true,"deprecatedSupport":true,"resolveSupport":{"properties":["documentation","details","additionalTextEdits"]},"tagSupport":{"valueSet":[1]}},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true},"documentationFormat":["markdown","plaintext"],"activeParameterSupport":true}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false,"linkSupport":true},"declaration":{"dynamicRegistration":false,"linkSupport":true},"implementation":{"dynamicRegistration":false,"linkSupport":true},"typeDefinition":{"dynamicRegistration":false,"linkSupport":true},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"resolveSupport":{"properties":["edit","command"]},"dataSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false,"codeDescriptionSupport":false,"tagSupport":{"valueSet":[1,2]}}},"window":{"showDocument":{"support":true},"workDoneProgress":true},"general":{"positionEncodings":["utf-32","utf-8","utf-16"]},"experimental":{}},"workspaceFolders":[{"uri":"file:///home/lockywolf/OfficialRepos/Telegram/TMessagesProj","name":"~/OfficialRepos/Telegram/TMessagesProj/"}]}}
[stderr]  Picked up _JAVA_OPTIONS:  -Dsun.java2d.uiScale=1.35 -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
[stderr]  Jan 19, 2024 9:52:41 AM org.apache.aries.spifly.BaseActivator log
[stderr]  INFO: Registered provider ch.qos.logback.classic.servlet.LogbackServletContainerInitializer of service jakarta.servlet.ServletContainerInitializer in bundle ch.qos.logback.classic
[stderr]  Jan 19, 2024 9:52:41 AM org.apache.aries.spifly.BaseActivator log
[stderr]  INFO: Registered provider ch.qos.logback.classic.spi.LogbackServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle ch.qos.logback.classic
[jsonrpc] D[09:52:41.541] Connection state change: `exited abnormally with code 13
'

----------b---y---e---b---y---e----------
[stderr]  
[stderr]  
[stderr]  nil
[stderr]  nil
[stderr]  Process EGLOT (TMessagesProj/(java-mode java-ts-mode)) stderr finished

@shamefulCake1 shamefulCake1 changed the title Crashes on Emacs master. Crashes on Emacs master. exited abnormally with code 13 Jan 19, 2024
@yveszoundi
Copy link
Owner

yveszoundi commented Jan 19, 2024

The errors that you're seeing don't seem to be related to eglot-java itself (eglot initialization and/or JVM crash).

  • Generally speaking, I've seen similar messages when there are version incompatibilities between the installed Eclipse JDT LS server and an old Java version.
  • Nowadays, it looks like the Eclipse JDT LS sever requires at least JDK 17 to run, per their project documentation.

Based on your logs, what I recommend is the following:

  • I'd first try making sure that JDK17 is used, just to validate Java version compatibility issues
    • It does seem the JAVA_HOME sent to the LSP server is /usr/lib64/zulu-openjdk8 compared to the command-line starting the server itself... /usr/lib64/zulu-openjdk11/bin/java (2nd line of the log message in the jsonrpc request).
    • Then, if that works, I'd ensure that JDK17 is used for starting the language server, if I still need to specify zulu-openjdk8 for whatever reasons
  • I doubt that emacs-master makes a difference
    • However, I don't run any emacs master/trunk software, because I don't read the mailing lists anymore for potential bugs, etc.
    • I do have one machine running emacs 29.1.90 (compiled from source) from the emacs-29 branch though
      • On that machine, my JDK is openjdk 17.0.9 (Ubuntu)
      • The installed Eclipse JDT ls server has version 1.31.0 (~/.emacs.d/share/eclipse.jdt.ls/.eglot-java-jdtls-version)
      • Essentially, no problems at all...

@shamefulCake1
Copy link
Author

True. Updating java to 17 resolved the issue.

It is very user-unfriendly though, to not have an error message for such a simple case. But I guess this is Eclipse JDT's problem, not eglot-java's.

yveszoundi added a commit that referenced this issue Jan 22, 2024
- Set reasonable defaults for the variable "eglot-java-eclipse-jdt-args"
- Recent Eclipse JDT LS server versions require JDK17+

See also #29
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

2 participants