TerraPlusPlus

TerraPlusPlus

90.1k Downloads

async exception while loading data

jcobol opened this issue ยท 8 comments

commented

Describe the bug

I had teleported to various places around the world with no trouble but ran into this stack trace with a particular location:

[19:11:30] [ForkJoinPool.commonPool-worker-13/ERROR] [terraplusplus]: async exception while loading data
java.util.concurrent.CompletionException: java.lang.StackOverflowError
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_292]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) ~[?:1.8.0_292]
at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:975) ~[?:1.8.0_292]
at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:940) ~[?:1.8.0_292]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488) [?:1.8.0_292]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1609) [?:1.8.0_292]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596) [?:1.8.0_292]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_292]
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_292]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_292]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175) [?:1.8.0_292]
Caused by: java.lang.StackOverflowError
at net.buildtheearth.terraplusplus.util.interval.IntervalTree$Node.split(IntervalTree.java:156) ~[?:?]
at net.buildtheearth.terraplusplus.util.interval.IntervalTree$Node.insert(IntervalTree.java:129) ~[?:?]
at net.buildtheearth.terraplusplus.util.interval.IntervalTree$Node.insert(IntervalTree.java:138) ~[?:?]
at net.buildtheearth.terraplusplus.util.interval.IntervalTree$Node.insert(IntervalTree.java:138) ~[?:?]
at net.buildtheearth.terraplusplus.util.interval.IntervalTree$Node.insert(IntervalTree.java:138) ~[?:?]
at net.buildtheearth.terraplusplus.util.interval.IntervalTree$Node.insert(IntervalTree.java:138) ~[?:?]
[the last line repeats many more times]

To Reproduce
Describe the steps it takes to reproduce the bug

  1. Join the game
  2. Execute command /tpll 52.97183/-9.42956. These are the Cliffs of Moher in Ireland.
  3. See Error Log

Expected behavior
Server-side should not throw stack trace.

Screenshots
If applicable, add screenshots to help explain your problem.

Error Logs
If applicable, paste your server logs into https://mclo.gs/ and include the link here.

Version (please complete the following information):

  • What version of TerraPlusPlus are you using? terraplusplus-1.1.0.578-1.12.2.jar
  • What version of the BTE Modpack or Server pack are you running? (If applicable)
commented

i can't seem to reproduce this, even with a very small stack size configured.

  • can you send the full stack trace (upload it to pastebin or gist or something)?
  • what are your JVM flags?
commented

I reproduced the issue again, this time going with publicly available, precompiled jar files.

CubicChunks-1.12.2-0.0.1184.0-SNAPSHOT-all.jar
CubicWorldGen-1.12.2-0.0.126.0-SNAPSHOT-all.jar
commons-imaging-1.0-alpha1.jar
terraplusplus-1.1.0.578-1.12.2.jar

md5 checksums:

89b116290b13fbe728bb4255e4032fe0 *CubicChunks-1.12.2-0.0.1184.0-SNAPSHOT-all.jar
b60fabdfb0b1a3cc147af5d4d817ceca *CubicWorldGen-1.12.2-0.0.126.0-SNAPSHOT-all.jar
1ae8be6119e1ab274be6addab203bda6 *commons-imaging-1.0-alpha1.jar
37c9d168625de77565fed274734e604c *terraplusplus-1.1.0.578-1.12.2.jar

Originally I discovered the issue on a self-hosted server, but this time I ran in single player mode and still saw the problem.

Launcher setting for the JVM: Left it at the default which was:
-Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

Full stack trace link:

https://objectstorage.eu-zurich-1.oraclecloud.com/p/0h2CWxnAbHgZPv0G538xwwMdsgqPL_mseHJmRmBYTzt7RJiEUl51PIywaUzpr3Ps/n/zrlmungguzlc/b/pub/o/issue35.log

commented

can you please add -Xss1M to your JVM arguments and try again?

commented

@DaMatrix thank you for the fix! Confirmed the issue is resolved on my end with the latest build of terraplusplus.

commented

I tried -Xss1M as well as 2M, 4M, and 16M. Unfortunately, I still get the same error.

commented

okay, this is very strange. just for the sake of testing, can you try updating to the latest terra++ from here (604 at the time of me writing this message) and see if it still occurs?

other questions:

  • are you using a java version other than 8?
  • are you using a non-standard JVM (such as OpenJ9)?
commented

Ok, I replaced the old terraplusplus jar with the one you linked. Still the same problem.
I have more than one java*.exe on my system, so I forced the launcher to use this one:

C:\Program Files\Java\jre1.8.0_291\bin>.\java.exe -version
java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)

and confirmed it was being used using Task Manager process properties.

I'll see if I can reproduce this on a different machine.

commented

The problem reproduced on my other computer as well. Is there any chance the Forge version could be a factor? I'm using 14.23.5.2855