Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering stuck with error: "RenderManager(0): WorkerThread(0): Exception while doing some work!" "IllegalArgumentException: newLimit < 0: (-163840 < 0)" #560

Closed
marcbal opened this issue Jun 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@marcbal
Copy link

marcbal commented Jun 22, 2024

What i did / Steps to reproduce

Rendering the map

Expected result

Map rendered succesfully with no error

Actual result

The rendering is stuck and is constantly throwing an error in the console and in the debug log file:

[BlueMap] RenderManager(0): WorkerThread(0): Exception while doing some work!
java.lang.IllegalArgumentException: newLimit < 0: (-163840 < 0)
    at java.nio.Buffer.createLimitException(Buffer.java:406)~
    at java.nio.Buffer.limit(Buffer.java:380)~
    at java.nio.ByteBuffer.limit(ByteBuffer.java:1565)~
    at de.bluecolored.bluemap.core.world.mca.region.MCARegion.readFully(MCARegion.java:190)~
    at de.bluecolored.bluemap.core.world.mca.region.MCARegion.readFully(MCARegion.java:183)~
    at de.bluecolored.bluemap.core.world.mca.region.MCARegion.iterateAllChunks(MCARegion.java:158)~
    at de.bluecolored.bluemap.core.world.mca.MCAWorld.preloadRegionChunks(MCAWorld.java:194)~
    at de.bluecolored.bluemap.core.world.World.preloadRegionChunks(World.java:92)~
    at de.bluecolored.bluemap.common.rendermanager.WorldRegionRenderTask.init(WorldRegionRenderTask.java:142)~
    at de.bluecolored.bluemap.common.rendermanager.WorldRegionRenderTask.doWork(WorldRegionRenderTask.java:162)~
    at de.bluecolored.bluemap.common.rendermanager.CombinedRenderTask.doWork(CombinedRenderTask.java:56)~
    at de.bluecolored.bluemap.common.rendermanager.RenderManager.doWork(RenderManager.java:318)~
    at de.bluecolored.bluemap.common.rendermanager.RenderManager$WorkerThread.run(RenderManager.java:343)~

The error is always the same, only the worker thread id is changing.
I understand that the issue is from a particular chunk or region file, but the error message doesn’t tell which region has the issue.
Here is the result of the /bluemap command:

BlueMap - Status:
Render-Threads are running!
Queued Tasks (2627):
  [1c72] Update map 'archi'
   Detail: Update region (-16, 2) for map 'archi'
   Progress: 47.08%
   ETA: 0:00:03
  [77ad] Update region (1, 4) for map 'archi_survie_game'
  ...

The progress % is always the same since days.

Context

BlueMap version:

Version: 5.2
Commit: 21738feb69f904df5f5cf61c907c7eda67911e0c
Implementation: paper
Minecraft: 1.20.4
Render-threads: 2
Available processors: 16
Available memory: 10240 MiB

Paper version: This server is running Paper version git-Paper-497 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: d8d54d9 on ver/1.20.4)
Java version:

openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)

OS: Linux 6.2.16-19-pve #1 SMP PREEMPT_DYNAMIC PMX 6.2.16-19 (2023-10-24T12:07Z) x86_64 x86_64 x86_64 GNU/Linux

@TBlueF
Copy link
Member

TBlueF commented Jun 22, 2024

Would you be able to send me this file from your world that the map archi is rendering:
region/r.-16.2.mca?
Then I might be able to reproduce the error on my end :)

TBlueF added a commit that referenced this issue Jun 22, 2024
@marcbal
Copy link
Author

marcbal commented Jun 22, 2024

Here is a copy of the file (its too big for Github): https://www.pandacube.fr/assets/files/r.-16.2.mca
It looks like this is the biggest region file of the world. I have visited it (after making the copy of the file) and it looks like it contains a big TNT ball (the big size is probably a huge amount of TNT entities).

@TBlueF
Copy link
Member

TBlueF commented Jun 22, 2024

Thank you!
With that file, I was able to reproduce your issue, and it seems like that 6032043 fixes the issue! :)

Once GitHub finished building it you can download the build with the fix from here: https://github.com/BlueMap-Minecraft/BlueMap/actions/runs/9625945660 (Artifacts button), or wait for the next release where this bug-fix will be included!

@TBlueF TBlueF added the bug Something isn't working label Jun 22, 2024
@github-project-automation github-project-automation bot moved this to Planned (unordered) in TODO / Idea board Jun 22, 2024
@TBlueF TBlueF closed this as completed Jun 22, 2024
@github-project-automation github-project-automation bot moved this from Planned (unordered) to Ready for next release in TODO / Idea board Jun 22, 2024
@TBlueF TBlueF moved this from Ready for next release to Done in TODO / Idea board Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants