Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

NoSuchMethodError: java.nio.ShortBuffer.position #43

Closed
erayerdin opened this issue Oct 25, 2019 · 3 comments
Closed

NoSuchMethodError: java.nio.ShortBuffer.position #43

erayerdin opened this issue Oct 25, 2019 · 3 comments

Comments

@erayerdin
Copy link

This happened to me on desktop.

I have installed the desktop version from AUR, which builds it from the source if you check the PKGBUILD (line 37).

PKGBUILD specifically uses JDK8 to compile the game and gets the source code from this repository. The latest version fetches the source from this archive.

After installation, I launch the game. The window initializes for a brief moment (renders black) then an error is thrown. The error is as below:

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoSuchMethodError: java.nio.ShortBuffer.position(I)Ljava/nio/ShortBuffer;
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:133)
Caused by: java.lang.NoSuchMethodError: java.nio.ShortBuffer.position(I)Ljava/nio/ShortBuffer;
        at com.watabou.glwrap.Quad.getIndices(Quad.java:102)
        at com.watabou.glwrap.Quad.setupIndices(Quad.java:62)
        at com.watabou.noosa.NoosaScript.<init>(NoosaScript.java:60)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at com.badlogic.gdx.utils.reflect.ClassReflection.newInstance(ClassReflection.java:93)
        at com.watabou.utils.Reflection.newInstance(Reflection.java:41)
        at com.watabou.glscripts.Script.use(Script.java:45)
        at com.watabou.noosa.NoosaScript.get(NoosaScript.java:181)
        at com.watabou.noosa.Game.render(Game.java:134)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)

Environment

  • Manjaro 18.1.1 with 4.19.79-1-MANJARO kernel

I do not think it matters but these are the versions of some of my java tools in my environment:

  • javac 1.8.0_222
  • OpenJDK Runtime Environment (build 1.8.0_222-b05)
  • OpenJDK 64-Bit Server VM (build 25.222-b05, mixed mode)
  • gradle 5.6.2
@00-Evan
Copy link
Owner

00-Evan commented Oct 25, 2019

Looks like this is a known error that's a combo of source code and build environment: apache/felix#114

I am not planning further patches to 0.7.5, but will look into addressing this in 0.7.6 (even better, I should probably formalize the source/target compatibility of the project)

@00-Evan
Copy link
Owner

00-Evan commented Apr 16, 2020

I'm closing this as this repo is no longer being maintained. Desktop builds for ShatteredPD are now made using the main repository here: https://github.com/00-Evan/shattered-pixel-dungeon

There are several structural and build-process improvements to the new desktop codebase, so this issue is likely resolved there. Please feel free to make a new issue in the main repo if you're still having this problem with v0.8.0+ though.

@00-Evan 00-Evan closed this as completed Apr 16, 2020
@erayerdin
Copy link
Author

Oopsie, I forgot to mention. I installed this from AUR. It is on 0.7.5f and I do not get this error anymore. Everything works well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants