#987896 GUI drawing error due to Dsun.java2d.opengl=true

#987896#5
Date:
2021-05-01 17:14:57 UTC
From:
To:
Widespread GUI drawing errors (entire sections of the window appear black when interacting with GUI elements hovering the mouse, clicking on buttons, pulling down menus,...) make sweethome3d unusable. This happens both on my laptop and inside a QEMU virtual machine on another computer.

The simple solution is delete
-Dsun.java2d.opengl=true
in
/usr/share/sweethome3d/sweethome3d.sh

If you want to keep the "-Dsun.java2d.opengl" option with value "true" for those computers where this option is not problematic (I don't know how to identify it) then a "if" conditional is necessary for JAVA_ARGS in /usr/share/sweethome3d/sweethome3d.sh. If in doubt, it is best to delete it from the file.

Best regards.

PS: java --version
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-post-Debian-1deb10u2)
OpenJDK Server VM (build 11.0.9.1+1-post-Debian-1deb10u2, mixed mode, sharing)

dpkg -l | grep -Ei 'default-jre|sweethome'
ii  default-jre                          2:1.11-71                          i386         Standard Java or Java compatible Runtime
ii  default-jre-headless                 2:1.11-71                          i386         Standard Java or Java compatible Runtime (headless)
ii  sweethome3d                          6.1.2+dfsg-2                       all          Interior 2D design application with 3D preview

#987896#10
Date:
2021-05-01 18:05:59 UTC
From:
To:
Hello,
when interacting with GUI elements hovering the mouse, clicking on buttons,
pulling down menus,...) make sweethome3d unusable. This happens both on my
laptop and inside a QEMU virtual machine on another computer.
those computers where this option is not problematic (I don't know how to
identify it) then a "if" conditional is necessary for JAVA_ARGS in
/usr/share/sweethome3d/sweethome3d.sh. If in doubt, it is best to delete it
from the file.

This is not a fundamental flaw which makes sweethome3d unusable on all systems
hence I set the severity to normal.

You can override this setting by executing

	export _JAVA_OPTIONS='-Dsun.java2d.opengl=false'

I recommend to use sweethome3d with hardware acceleration otherwise the
performance may be rather poor, especially if you use the 3D features. The
change to activate and set sun.java2d.opengl to true was intentional. See also

https://bugs.debian.org/854030

I believe this setting is useful for most users of sweethome3d and should be
true by default. At the moment I don't know how the script can be improved to
detect corner cases like your system. Please send patches to this bug report if
you find a solution that works best for all users.

Regards,

Markus