question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JVM game crashes on start with java.lang.NoSuchMethodError: java.nio.IntBuffer.position(I)Ljava/nio/IntBuffer

See original GitHub issue
     [java] viewPortChanged 1280x960 / 2.0 -> 640.0x480.0
     [java] Exception in thread "main" java.lang.NoSuchMethodError: java.nio.IntBuffer.position(I)Ljava/nio/IntBuffer;
     [java] 	at playn.core.GL20$Buffers.resizeIntBuffer(GL20.java:397)
     [java] 	at playn.core.GL20.glGetShaderiv(GL20.java:631)
     [java] 	at playn.core.GLProgram.compileShader(GLProgram.java:112)
     [java] 	at playn.core.GLProgram.<init>(GLProgram.java:45)
     [java] 	at playn.core.TriangleBatch.<init>(TriangleBatch.java:122)
     [java] 	at playn.core.TriangleBatch.<init>(TriangleBatch.java:114)
     [java] 	at playn.scene.SceneGame.createDefaultBatch(SceneGame.java:95)
     [java] 	at playn.scene.SceneGame.<init>(SceneGame.java:38)
     [java] 	at rook.core.MainGame.<init>(MainGame.java:25)
     [java] 	at rook.java.JavaMain.main(JavaMain.java:13)
     [java] Java Result: 1

This seems to be an issue with lwjgl which is fixed since 3.1.5. I locally updated lwjgl in playn to 3.1.6 and the error disappears.

UPDATE just recompiling playn locally also makes the error disappear, so it seems to have nothing to do with lwjgl. But rather with playn being built with java 9 (as far as I can tell from the MANIFEST) and me using java 8 locally.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
darthbinamiracommented, Sep 9, 2018

Just tried the latest release 2.0.4 and could no longer see the problem. 😃

0reactions
darthbinamiracommented, Sep 3, 2018

I don’t have JDK 9 installed, but instead created a PR with your suggestion above.

~Also tried using the 2.1-SNAPSHOT but getting the same error.~

Edit: My bad… issue at my end.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix java.lang.NoSuchMethodError in Java - Rollbar
NoSuchMethodError is a runtime error in Java which occurs when a method is called that exists at compile-time, but does not exist at...
Read more >
Crash at runtime after migrating to Android Studio ...
For me, I got similar crash of missing method, because I had to update recently added library version in my build.gradle file.
Read more >
The game crashed whilst unexpected error Error: java.lang ...
Hey, i have been getting this error a lot, i cant play 1.19 with mods. if i launch the forge version without the...
Read more >
No virtual method limit(I)Ljava/nio/ByteBuffer; on Android ...
With this information I expect that it can run on android OS 5 / API 21. But instead I found this error. Caused...
Read more >
[Fixed] Crashing After Setting up New Mod in IntelliJ
Minecraft Crash Report ---- // My bad. Time: 12/3/20 8:13 PM Description: Initializing game java.lang.NoSuchMethodError: java.nio.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found