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

Umlet crashes on macOS #752

Open
aneshodza opened this issue Apr 21, 2024 · 2 comments
Open

Umlet crashes on macOS #752

aneshodza opened this issue Apr 21, 2024 · 2 comments
Labels

Comments

@aneshodza
Copy link

I am using the newest UMLet Version (15.1) installed over Homebrew:

➜ brew install umlet
Warning: umlet 15.1 is already installed and up-to-date.
To reinstall 15.1, run:
  brew reinstall umlet

And openjdk 21:

➜ java -version

openjdk version "21" 2023-09-19
OpenJDK Runtime Environment (build 21+35-2513)
OpenJDK 64-Bit Server VM (build 21+35-2513, mixed mode, sharing)

But lately it has been crashing every time I ran the umlet command:

➜ umlet
log4j:WARN No appenders could be found for logger (com.baselet.control.enums.Program).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
2024-04-21 16:23:38.415 java[18635:11038211] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
[1]    18635 trace trap  umlet
@afdia
Copy link
Collaborator

afdia commented Apr 22, 2024

Thanks for the report, it is probably this issue https://bugs.openjdk.org/browse/JDK-8318854

Unfortunately we cannot do anything except waiting for the backport of the fix in Java 21 (or you could try Java 22 which should already be fixed if I understand the issue correctly)

@afdia afdia added the mac os x label Apr 22, 2024
@aneshodza
Copy link
Author

The issue with that approach is, that homebrew automatically ships it with openjdk 21, which is (potentially) broken:

➜ brew reinstall umlet
==> ...
==> Installing dependencies for umlet: openjdk
==> Installing umlet dependency: openjdk
==> Downloading https://ghcr.io/v2/homebrew/core/openjdk/manifests/21.0.2
Already downloaded: /Users/anes/Library/Caches/Homebrew/downloads/d437bb150fa297f0ee7f7f26594cb0a1e7aec55a45ec6570ed8660a033b7c3f9--openjdk-21.0.2.bottle_manifest.json
==> Pouring openjdk--21.0.2.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/openjdk/21.0.2: 600 files, 331.2MB

There isn't a solution for this as of now I think, because the java version is broken.

Locally patching it

After a bit of trying around I figured out why it wouldn't take my local version:

➜ la /opt/homebrew/bin/umlet*
/opt/homebrew/bin/umlet      /opt/homebrew/bin/umlet-15.1

➜ cat /opt/homebrew/bin/umlet
#!/bin/bash
JAVA_HOME="Some homebrew version" exec "/opt/homebrew/Cellar/umlet/15.1/libexec/umlet.sh"  "$@"

By having openjdk-22 locally, I could set the bin/umlet to take that instead:

➜ cat /opt/homebrew/bin/umlet
#!/bin/bash
JAVA_HOME="/path/to/java/openjdk-22" exec "/opt/homebrew/Cellar/umlet/15.1/libexec/umlet.sh"  "$@"

If you use asdf, use the version given here:

➜ asdf where java
/Users/someone/.asdf/installs/java/openjdk-22

Maybe there could be some post-install message for homebrew umlet that refers to this issue as this has to be fixed individually for every machine.

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

No branches or pull requests

2 participants