Crash at load on Mac OSX with OpenJDK11 after changing resolution
See original GitHub issueDescribe the bug
It crashes when starting the game via java -jar unciv.jar
. After one resizes the window and/or changes the resolution to something other (I tested only higher) than the default 900*600 It is only starting the smiley shortly and then crashing. “DesktopLauncher” is crashing too.
To Reproduce Modify the resolution and close the game. Next time it will crash, I always need to delete the GameSettings.json (or remove the windowState key from the json file to get it started again
Expected behavior I guess it should not happen
Additional context I have version 3.12.7-patch1. Here is the output
Error in LSRegisterURL: -10811
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.lwjgl.LWJGLUtil$3 (file:/Users/foobar/Documents/Unciv.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.lwjgl.LWJGLUtil$3
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
AL lib: (EE) ca_open_playback: AudioUnitInitialize failed
Loading ruleset - 235ms
Loading percent complete of languages - 1ms
2021-01-12 11:40:37.903 java[70531:1012115] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff204fc6af __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff202343c9 objc_exception_throw + 48
2 CoreFoundation 0x00007fff20524a9a -[NSException raise] + 9
3 AppKit 0x00007fff22cc88a0 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 321
4 AppKit 0x00007fff22cf0c1b -[NSThemeFrame setStyleMask:] + 142
5 AppKit 0x00007fff22cf09b1 __25-[NSWindow setStyleMask:]_block_invoke + 2057
6 AppKit 0x00007fff22cf014e NSPerformVisuallyAtomicChange + 132
7 AppKit 0x00007fff22cf005b -[NSWindow setStyleMask:] + 170
8 liblwjgl.dylib 0x00000001367fbcca Java_org_lwjgl_opengl_MacOSXDisplay_nSetResizable + 90
9 ??? 0x0000000110e1b330 0x0 + 4578194224
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Apple silicon(M1) 11.4 get a java error (jdk16) - Stack Overflow
The mvn formula in brew seems to prefer always using openjdk formula even with openjdk@11 installed. I ended up setting JAVA_HOME , which ......
Read more >IntelliJ 2020.1.2: Consistently crashes on macOS Catalina ...
I'm running IntelliJ with a Jetbrains OpenJDK 11: Runtime version: ... IntelliJ doesn't seem to crash throughout the day when my Mac sleeps ......
Read more >[MC-170545] macOS: Crash upon entering fullscreen - Jira
A workaround is run the Windows version of the game via WINE. It can still change the resolution, but it will not crash....
Read more >Installing and using OpenJDK 11 on RHEL
Debug symbols help in investigating a crash in OpenJDK applications. 3.1. INSTALLING THE DEBUG SYMBOLS. This procedure describes how to install ...
Read more >Consolidated JDK 11 Release Notes - Java - Oracle
The following sections summarize changes made in all Java SE 11.0.17 BPR releases. ... JDK-8255716, hotspot, runtime, JVM Crashes If Manually Offline a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
“LSRegisterURL” seems related to the Discord Api on macs, the five fat warnings are known to pop with libGdx and Java 11-14, the rest is just one exception where “AppKit” proves it’s thrown within an Apple piece of code and “NSOpenGLContext” raises the slight suspicion it’s got something to do with displaying something - could be anything from incompatible libraries and nothing to do with Unciv to timing issues coaxing Unciv to paint stuff at the wrong time or in a wrong thread. Search hits like this one might support the “Unciv is completely innocent” theory…
Anything more interesting in that hs_err_pid74154.log (usually there isn’t)?
Without a mac, can’t say or investigate. If I had one, I’d set breakpoints at the start of DesktopLauncher.main and the LoadingScreen() call in UncivGame, verify it’s happening in between, then F8-single step it to identify the line, see if it’s something you can step into and so on until something catches the eye… If you can even get to the first breakpoint.
I wish some other Mac user could see and confirm (or not) the error. It might be only related to the version 11 and/or only to JDK11…
Sorry I meant that saving the window state should be enabled by default, but could be disabled to prevent this kind of crash…