NSInternalInconsistencyException on macOS 11.5.2: reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
kalkafox opened this issue ยท 7 comments
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:
- Launch Minecraft with ITLT 2.0.x on macOS
- Await Minecraft's instantiation
- 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.
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?
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.
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.
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
- Install Forge 37.0.59 or newer for Minecraft 1.17.1
- As MMC doesn't support Forge 1.17 yet, use the Vanilla launcher to start the game
- Put the itlt test jar in the mods folder
- Copy over your modpack's config to the config folder
- 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.
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!
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.
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.