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

BASH 4.2 vs. Jeditterm 3.36 and newer #275

Open
manticore-projects opened this issue Jan 17, 2024 · 4 comments
Open

BASH 4.2 vs. Jeditterm 3.36 and newer #275

manticore-projects opened this issue Jan 17, 2024 · 4 comments

Comments

@manticore-projects
Copy link

manticore-projects commented Jan 17, 2024

Greetings!

We have JediTerm up and running in general, but face a problem with a particular combination of JediTerm and Bash:

  1. with a recent Bash 5.2.21, JeditTerm 3.36 works fine (and I can't reproduce any problem on my own computers)
  2. with an older Bash 4.2 on CentOS 7, JeditTerm 3.36 either crashes or does not show a cursor (just white background)
  3. however, an older JediTerm 3.18 works fine with the same older Bash 4.2 on Centos 7

I understand that this lacks a lot of information and I see it as a placeholder for further investigation.
Although I have been facing this problem on 4 different servers now. Some recent development broke older shells.

I will still test against latest JediTerm 3.40 (but you changed so many things again, which i still need to adopt).

Update: I compiled BASH 4.2.53 and BASH 4.4.18 on my own computer and it runs flawlessly with JeditTerm 3.36.

@manticore-projects
Copy link
Author

I finally found the exception:

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at org.webswing.classloader.SwingClassloader.findClass(SwingClassloader.java:513)
at org.webswing.classloader.SwingClassloader.loadClass(SwingClassloader.java:220)
at org.webswing.classloader.SwingClassLoaderFactory$SwingClassLoaderWithAccessControl.superLoadClass(SwingClassLoaderFactory.java:58)
at org.webswing.classloader.SwingClassLoaderFactory$SwingClassLoaderWithAccessControl.access$000(SwingClassLoaderFactory.java:30)
at org.webswing.classloader.SwingClassLoaderFactory$SwingClassLoaderWithAccessControl$1.run(SwingClassLoaderFactory.java:46)
at org.webswing.classloader.SwingClassLoaderFactory$SwingClassLoaderWithAccessControl$1.run(SwingClassLoaderFactory.java:43)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.webswing.classloader.SwingClassLoaderFactory$SwingClassLoaderWithAccessControl.loadClass(SwingClassLoaderFactory.java:43)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at com.jediterm.core.Platform$Companion.detectCurrent(Platform.kt:25)
at com.jediterm.core.Platform$Companion.access$detectCurrent(Platform.kt:11)
at com.jediterm.core.Platform.<clinit>(Platform.kt:12)
at com.manticore.ui.TerminalShell.getTerminalShellDialog(TerminalShell.java:52)
at com.manticore.ui.AdminPanel$4.run(AdminPanel.java:284)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)

Something has changed regarding Companion.detectCurrent.

@manticore-projects
Copy link
Author

Ok, problem understood: Platform.kt confuses my special class-loader. Porting it back to a plain Java file solved all my problems.

Although I think, just not using the Platform but implementing it myself also would solve my problem.

@manticore-projects
Copy link
Author

manticore-projects commented Jan 17, 2024

vokoscreenNG-2024-01-17_23-54-00.mp4

The problem with the BASH still persists: SH and KSH are working, BASH freezes the panel and no error is thrown. But I can't replicate this on my own computer, only on CentOS 8 installations. Guess I will need to get a Centos 8 VM running.

@segrey
Copy link
Contributor

segrey commented Jan 18, 2024

@manticore-projects Thanks for reporting. Yes, com.jediterm.core.Platform is not intended for external usage (marked as internal). Please either implement it on your side or use analogs like com.sun.jna.Platform.

Regarding the the freeze, you can try to debug it yourself or capture the whole terminal session output and provide it here. Shell output can be captured using script command. For example, if bash is installed to /bin/bash, then use the following command as a shell:

/usr/bin/script /path/to/log.file.txt /bin/bash

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