Bug#1068172: gpsprune: 3d function fails with java 17 due to missing "add-opens"

2024-04-01 Thread Sebastiaan Couwenberg

Control: tags -1 pending

On 4/1/24 11:19 AM, activityworkshop wrote:

I don't know if this is the best solution, but one way I found to allow access 
is to add
a parameter to the launch command:
--add-opens=java.desktop/sun.awt=ALL-UNNAMED


This is implemented in git.

Kind Regards,

Bas

--
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



Bug#1068172: gpsprune: 3d function fails with java 17 due to missing "add-opens"

2024-04-01 Thread activityworkshop
Package: gpsprune
Version: 23.2-1~bpo12+1
Severity: normal
X-Debbugs-Cc: deb...@activityworkshop.net

Dear Maintainer,

GpsPrune uses Java3D for the 3d visualisation functions.  Java3D in turn uses 
class in sun.awt.
Using Java 11, everything works as expected, but using Java 17 introduces 
restrictions on
package visibility.  Without adding an exception to allow this access, 
GpsPrune's call to
Java3D fails with an IllegalAccessError.

How to reproduce:
Open GpsPrune (using Java 17), create a pair of points (or load a track) and 
start the 3D function.
Press 'OK' and the function fails with the message:
java.lang.IllegalAccessError: class javax.media.j3d.X11NativeConfigTemplate3D 
cannot access
class sun.awt.X11GraphicsConfig because module java.desktop does not export 
sun.awt
to unnamed module

Modifying GpsPrune's Manifest to include an "Add-Opens" statement does not 
solve the problem,
presumably because it's not GpsPrune which is trying to access sun.awt.  Adding 
such a
statement to Java3D's manifests also does not solve the problem, presumably 
because it's the
GpsPrune jar which is the main jar being executed.

I don't know if this is the best solution, but one way I found to allow access 
is to add
a parameter to the launch command:
--add-opens=java.desktop/sun.awt=ALL-UNNAMED

Perhaps the Debian maintainers have already dealt with this issue in other 
packages which
use Java3D, or other occurrences of this module access problem with Java 17?
Many thanks!

-- System Information:
Debian Release: 12.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-18-amd64 (SMP w/6 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gpsprune depends on:
ii  default-jre [java9-runtime] 2:1.17-74
ii  openjdk-11-jre [java9-runtime]  11.0.20+8-1~deb11u1
ii  openjdk-17-jre [java9-runtime]  17.0.10+7-1~deb12u1

Versions of packages gpsprune recommends:
ii  gnuplot-x11 5.4.4+dfsg1-2+b2
ii  gpsbabel1.8.0+ds-5
ii  libimage-exiftool-perl  12.57+dfsg-1
ii  libjava3d-java  1.5.2+dfsg-17
ii  libjava3d-jni   1.5.2+dfsg-17
ii  libvecmath-java 1.5.2-7

gpsprune suggests no packages.

-- no debconf information