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

NSInternalInconsistencyException on macOS 11.5.2: reason: 'NSWindow drag regions should only be invalidated on the Main Thread!' #29

Closed
kalkafox opened this issue Sep 7, 2021 · 7 comments
Labels

Comments

@kalkafox
Copy link

kalkafox commented Sep 7, 2021

Describe the bug
Upon launching, an NSInternalInconsistencyException is thrown on the thread, assumedly the reason being that the window configuration doesn't play nice when executed on another thread that is not the Main thread (for whatever reason?)
To Reproduce
Steps to reproduce the behavior:

  1. Launch Minecraft with ITLT 2.0.x on macOS
  2. Await Minecraft's instantiation
  3. Wait for the game to close, and look at the launcher log.

Expected behavior
A successful launch.

Environment details

  • Operating system (e.g. Windows 10): macOS 11.5.2 Big Sur
  • Java (e.g. AdoptOpenJDK 8 HotSpot): Oracle Java 8 1.8.0_301
  • Mod version (e.g. 1.16.5-2.0.0): 1.16.5-2.0.1
  • Minecraft version (e.g. 1.16.5): 1.16.5

Logs and additional context
A full log can be found here, with the corresponding error occurring on Line 1994 right after the customWindowTitle log.

Please let me know if there is anything I can do to help.

@kalkafox kalkafox added the bug label Sep 7, 2021
@PaintNinja
Copy link
Collaborator

Thanks for your report.

Could you set enableEnhancedVanillaIcon and enableCustomIcon to false in the config (config/itlt-client.toml) and let me know if the issue still occurs?

@kalkafox
Copy link
Author

kalkafox commented Sep 12, 2021

Thank you so much for your patience and apologies for the delay. After setting both enableCustomIcon and enableEnhancedVanillaIcon to false, the issue still persists with the same error. No changes have been made, and it recurs on the corresponding line right after the log of the title rename. Please let me know if there's anything I can do to help and apologies for the inconvenience.

@PaintNinja
Copy link
Collaborator

Don't worry about taking a while to respond, there's no rush. :)

Okay, it sounds like the custom window title feature is the cause of the issue in this case and not the icon stuff. I'm not sure how to fix it so that fussy macOS is alright with it but at least I know what's caused it now, thanks. I'll look into a fix when I have time and put another comment here once I have a test jar for you to try out and give me feedback on.

To stop the crashing in the meantime, I recommend disabling the custom window title setting for macOS users.

@PaintNinja
Copy link
Collaborator

I think I have a fix but don't have a Mac that I can test it on, so here's a test jar for you to try out. Please let me know if it works or not. itlt-1.17.1-2.1.0-test.zip

Instructions

  1. Install Forge 37.0.59 or newer for Minecraft 1.17.1
  2. As MMC doesn't support Forge 1.17 yet, use the Vanilla launcher to start the game
  3. Put the itlt test jar in the mods folder
  4. Copy over your modpack's config to the config folder
  5. Restart the game and let me know if the window title changes without crashing

Disclaimers

  • Test jars are built from in-development/wip versions of the mod and may not be stable. The intention is to test if a change fixes an issue that I'm unable to test myself but they may also include other changes related to the new version. Avoid using this test jar once the new version has been published to CurseForge, obviously.
  • This is a test jar built on the latest commit of the master branch at the time of writing (d15f4c6) so you can clone the repo and build it yourself if preferred.

@PaintNinja
Copy link
Collaborator

Hello @kalkafox , sorry to bother you but just wanted to follow up on whether or not that fix works for you? If the fix does work I'll backport it to 1.16.x.

@kalkafox
Copy link
Author

kalkafox commented Oct 8, 2021

Hello @kalkafox , sorry to bother you but just wanted to follow up on whether or not that fix works for you? If the fix does work I'll backport it to 1.16.x.

Hey there, I'm very sorry for going radio silent for a while there. My friend is the one using macOS, and he was the one who sent me this troubleshooting error in regard to the modpack we have established. We were using MultiMC as the method to launch Forge through MultiMC, and because MultiMC does not yet have a version out for 1.17.1 I opted to install Forge on the vanilla Minecraft launcher so we could then load the fixed jar file for the specified version. Our modpack was using 1.16.5. Because of time constraints, we opted to hold it off at a later date.

I am welcome to test it with him out later in a couple of hours or by tomorrow, so feel free to poke me again afterward. Again, super sorry for the inconvenience, and thank you for your efforts!

@kalkafox
Copy link
Author

Heyo. Thank you again so much for your patience, it is super appreciated.

We were able to get the instance launched with the test jar you provided. Even with the two options mentioned above enabled, I am no longer able to reproduce this issue. It seems to be working!

Appreciate the efforts to getting this done, and once again for your valued patience. If there's anything more I can do to help, let me know.

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