Create account / Log in

Problem to install on linux

Topics related to the main Vassal engine.

Moderators: Tim M, uckelman

Problem to install on linux

Postby enguerrand » August 24th, 2019, 10:39 am

Hello ! sorry it's not the good section but i have a friend ( who dont speak english) who don't can to install Vassal on LInux. He has this problem code.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by VASSAL.tools.image.ImageIOImageLoader (file:/home/nico/VASSAL-3.2.17/lib/Vengine.jar) to field sun.java2d.cmm.ProfileDeferralMgr.deferring
WARNING: Please consider reporting this to the maintainers of VASSAL.tools.image.ImageIOImageLoader
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Anybody have the same problem ? Which answer i can to give him ?

Thank you very much ! :)
enguerrand
 
Posts: 1
Joined: August 24th, 2019, 10:37 am

Re: Problem to install on linux

Postby uckelman » September 25th, 2019, 11:07 pm

That's not a fatal error. We'd need to see the rest of the console output and errorLog to offer help.
User avatar
uckelman
Site Admin
 
Posts: 8380
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Problem to install on linux

Postby AlisterMcLane » March 20th, 2020, 10:33 pm

Well,
I saw that in my logs as well.

'Culprit' : VASSAL.tools.image.ImageIOImageLoader
'Bad Access' : sun.java2d.cmm.ProfileDeferralMgr

Situation:
Looking at the Class VASSAL.tools.image.ImageIOImageLoader it seems to consist of a series of Bugfixes / Workarounds Java Related issues. Some dating back to Java 5 (So something 15 years old).
And the issue is confirmed with Java 9 as well.

Dev Link
As the package names starts with 'sun' or 'oracle' this class does not even officially exist.

Quick Fix suggestion: I would wrap the given calls in a bit of Reflection-Magic to deal with issues more gracefully and allow compiling the code with ANY JDK instead of an official Oracle JDK.

Long run option: JAI as of https://stackoverflow.com/questions/299 ... jpeg-files

That snipplet may provide a convenient means to resolve the issue:
Code: Select all
public class ImageIOImageLoader implements ImageLoader {
   // ... 
   static {
      String CLASS_NAME = "sun.java2d.cmm.ProfileDeferralMgr";
      String STATIC_FIELD_DEFERRING = "deferring";
      Boolean TARGET_VALUE = Boolean.FALSE;
      try {
         Class<?> PROFILE_DEFERRAL_MGR_CLASS = Class.forName(CLASS_NAME);
         Field deferring = PROFILE_DEFERRAL_MGR_CLASS.getField(STATIC_FIELD_DEFERRING);
         deferring.set(PROFILE_DEFERRAL_MGR_CLASS, TARGET_VALUE);
      } catch (ClassNotFoundException e) {
         LOG.debug("Patching JDK Bug 6986863 in class {} skipped : {}", CLASS_NAME, e.getClass().getSimpleName());
      } catch (NoSuchFieldException e) {
         LOG.warn("Patching JDK Bug 6986863 in class {} skipped: {}", CLASS_NAME, e.getClass().getSimpleName());
      } catch ( SecurityException | IllegalArgumentException | IllegalAccessException e) {
         LOG.warn("Patching JDK Bug 6986863 in class {} failed : {}", CLASS_NAME, e.getMessage(), e);
      }
   }
}
AlisterMcLane
 
Posts: 9
Joined: March 20th, 2020, 9:28 pm
Location: Munich

Re: Problem to install on linux

Postby uckelman » March 20th, 2020, 11:47 pm

Thus spake AlisterMcLane via messages:
> Well,
> I saw that in my logs as well.
>
> 'Culprit' : VASSAL.tools.image.ImageIOImageLoader
> 'Bad Access' : sun.java2d.cmm.ProfileDeferralMgr
>
> __Situation:__
> Looking at the Class VASSAL.tools.image.ImageIOImageLoader it seems to
> consist of a series of Bugfixes / Workarounds Java Related issues. Some
> dating back to Java 5 (So something 15 years old).
> And the issue is confirmed with Java 9 as well.
>
> __Dev Link__
> As the package names starts with 'sun' or 'oracle' this class does not
> even officially exist.
>
> Quick Fix suggestion: I would wrap the given calls in a bit of
> Reflection-Magic to deal with issues more gracefully and allow compiling
> the code with ANY JDK instead of an official Oracle JDK.

I fixed the reflection issue in trunk@9260 in October. Reflection is no
longer needed for access to sun.java2d.cmm.ProfileDeferralMgr because
it exists from Java 9 onward, and for VASSAL 3.3 we will start bundling
a JRE with VASSAL so we can be sure that class is present.

I'm not worried about compiling with anything other than OpenJDK nor
about JAI as we're moving away from Java for V4.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8380
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Problem to install on linux

Postby Flexin » April 3rd, 2020, 6:53 am

Which version of the distribution is better for a beginner?
Flexin
 
Posts: 2
Joined: April 2nd, 2020, 9:15 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests