zlepper / itlt

It's the little things mod, a mod about the little things.
MIT License
12 stars 5 forks source link

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

Closed kalkafox closed 1 year ago

kalkafox commented 3 years ago

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

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.

PaintNinja commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

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

PaintNinja commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.