Print at Dec 18, 2025, 5:49:23 PM View all posts in this thread on one page
Posted by treehousenorris2 at Jan 12, 2021, 7:30:57 PM
Error with run configuration on Mac 10.15
When running SH source code in Eclipse, I'm getting this error which terminates the launch:

Apple AWT Internal Exception: NSWindow drag regions should only be invalidated on the Main Thread!
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'

Eclipse Version: 2020-06 (4.16.0)
AdoptOpen JDK 8
Mac OS 10.15
I am using VM arguments:
except under Java 7 / 8 and Mac OS X,
where VM arguments should be:
-Djava.ext.dirs=lib/java3d-1.6 -Djava.library.path=lib/java3d-1.6/macosx
-Djogamp.gluegen.UseTempJarCache=false

Any help is appreciated, thanks!

Posted by Puybaret at Jan 13, 2021, 12:10:21 PM
Re: Error with run configuration on Mac 10.15
Before investing further, did you try with Oracle Java too?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by treehousenorris2 at Jan 18, 2021, 7:16:02 PM
Re: Error with run configuration on Mac 10.15
Yes, I also tried with Oracle jdk-8u271-macosx-x64, which does the same thing: shows the splash screen then gives the error.

Posted by treehousenorris2 at Feb 24, 2021, 3:38:40 PM
Re: Error with run configuration on Mac 10.15
Hm, I found a post about an incompatibility between mac os 10.15 and java opengl (jogl), solution here.

Perhaps adding additional jars for native mac universal gluegen-rt and jogl(-all? or -java3d?) into the lib/macosx and/or lib/java3d-1.6/macosx directories.
Then editing the needed filepath list in SweetHome3DBootstrap.java per mac cases for each java version?

Posted by treehousenorris2 at Feb 26, 2021, 4:18:51 PM
Re: Error with run configuration on Mac 10.15
Aha, the Exception turns into just a Warning in an older Java 8 build, per the tip here.

2021-02-26 11:16:54.697 java[39444:560969] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
0 AppKit 0x00007fff2ec02629 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 371
1 AppKit 0x00007fff2ebea052 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416
2 AppKit 0x00007fff2ebe9ac3 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
3 libnativewindow_macosx.jnilib 0x00000001270f93fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398
4 ??? 0x0000000112b13667 0x0 + 4608570983
)


1.8.0_271 Oracle gives the error
1.8.0_265 AdoptOpenJDK gives the error
(1.8.0_252+ the problem first started appearing)
(1.8.0_242 no longer see the issue)
1.8.0_241 Oracle gives the warning yet successfully runs, yay!

Posted by treehousenorris2 at Feb 26, 2021, 4:38:13 PM
Re: Error with run configuration on Mac 10.15
Now I remember editing the 1.8.0_202 in the Ant build.xml file to 271, so it makes sense that you did not have this error.

Posted by Puybaret at Feb 26, 2021, 5:04:39 PM
Re: Error with run configuration on Mac 10.15
Great you could find the incompatible change you made in the past.
Note that Sweet Home 3D won't be bundled with any version of Oracle Java > 8u202 until further notice, because of its new OTN license which forbids its free use for commercial purpose (see Oracle Java SE Licensing FAQ). I don't want Sweet Home 3D users to be obliged to pay Oracle if they run business with it.
Therefore, if Sweet Home 3D requires to use a more recent version of Java, it will be bundled with OpenJDK, which will be the case for the coming version 6.5 under macOS and Windows 64 bit. This new version will also be delivered with JOGL 2.4 which fixes the warning you reported.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator