question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue running on Mac OSX Monterrey with M1 processors

See original GitHub issue

Platform Mac OSX Monterrey (12.4), with Apple Silicon M1 Pro processor

Version Tried with 4.1.18 and with 4.2.10

Describe the bug The game is impossible to start.

To Reproduce Steps to reproduce the behavior:

  1. Install java bia brew install java[@11]
  2. Download Unciv.jar
  3. Run the command specified at https://yairm210.github.io/Unciv/Other/Installing-on-macOS/
  4. See error

Please note that the behaviour is the same with OpenJDK 18 and 11. I’ve also tried without the headless option, also without success. Please note that I had it working on an older, Intel-based Mac with openjdk11, see #2551

$ /opt/homebrew/opt/openjdk/bin/java --version
openjdk 18.0.2.1 2022-08-18
OpenJDK Runtime Environment Homebrew (build 18.0.2.1+0)
OpenJDK 64-Bit Server VM Homebrew (build 18.0.2.1+0, mixed mode, sharing)
$ /opt/homebrew/opt/openjdk/bin/java -XstartOnFirstThread -Djava.awt.headless=true -jar Unciv.jar
Exception in thread "main" java.awt.HeadlessException
	at java.desktop/sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:186)
	at com.unciv.app.desktop.DesktopLauncher.main(DesktopLauncher.kt:55)
$ /opt/homebrew/opt/openjdk/bin/java -XstartOnFirstThread  -jar Unciv.jar
zsh: trace trap  /opt/homebrew/opt/openjdk/bin/java -XstartOnFirstThread -jar Unciv.jar

Expected behavior I thought the jar could be used also this way on Mac OSX. I haven’t tried yet to compile it.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
MRigalcommented, Sep 19, 2022

But lol /opt/homebrew/opt/openjdk/bin/java -jar Unciv.jar just works 😄

It actually works well both with openjdk 11 and openjdk 18. So I think you just need to update the docs for Mac OSX installation 😃

Thanks @yairm210 !!! 💯

0reactions
MRigalcommented, Sep 20, 2022

Fixed by @nacro711072 in the docs with #7828 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

macOS Monterey problems: how to fix the most common issues
While Apple's Rosetta tool helps run apps for Intel-based Macs on Apple M1 devices running Monterey, there may still be some performance issues....
Read more >
Monterey Problems: How to fix the most common macOS 12 ...
Reboot your Mac in Safe Mode: Apple menu > Shut down > Hold down Shift when restarting your Mac > release Shift once...
Read more >
macOS 12 Monterey: Versions, problems, and fixes - Macworld
The problem seems to be most common on computers the feature Apple's M1 chip, but Intel Macs are also affected. In some cases,...
Read more >
Known issues with macOS 12 (Monterey) and Apple Silicon at IU
M1 Macs are based on the Apple Silicon architecture, which is different from Intel's chips. Some programs will not run, while others require ......
Read more >
MacBook, iMac with M1 chips reportedly facing issues with ...
The bug, which Apple is yet to acknowledge, is affecting MacBook Pro with M1 Max and M1 Pro chipsets, MacBook Pro with M1...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found