CobbleSword / NachoSpigot

NachoSpigot is a fork of TacoSpigot 1.8.9 that offers several enhancements to performance as well as bug fixes.
GNU General Public License v3.0
238 stars 89 forks source link

Crash/error when unloading chunks #240

Closed andreasdc closed 2 years ago

andreasdc commented 2 years ago

Caused by: java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.longs.LongArrayList.getLong(int)" because "this.wrapped" is null at it.unimi.dsi.fastutil.longs.LongOpenHashSet$SetIterator.nextLong(LongOpenHashSet.java:589) ~[fastutil-core-8.5.6.jar:?] at it.unimi.dsi.fastutil.longs.LongIterator.next(LongIterator.java:43) ~[fastutil-core-8.5.6.jar:?] at net.minecraft.server.v1_8_R3.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:406) ~[spigot.jar:?]

sadcenter commented 2 years ago

Ummm, Is this the full error?

andreasdc commented 2 years ago

Why do you need more? Error is on this line: long chunkcoordinates = iterator.next(); Started happening after last patch

tomasalves8 commented 2 years ago

When does this happen?

ghost commented 2 years ago

Seems to be caused by https://github.com/CobbleSword/NachoSpigot/commit/eeb6efd979e8d30b18ec200638672e3064e2b80c

When does this happen?

When chunks are unloaded

tomasalves8 commented 2 years ago

Can't reproduce, are you in the overworld? Do you have autosave turned on/off?

andreasdc commented 2 years ago

Can't reproduce, are you in the overworld? Do you have autosave turned on/off?

No main world, autosave off.

tomasalves8 commented 2 years ago

at net.minecraft.server.v1_8_R3.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:406) ~[spigot.jar:?]

Line 406 is a comment, have you made any changes to the code?

andreasdc commented 2 years ago

Error is on this line: long chunkcoordinates = iterator.next();

@tomasalves8

tomasalves8 commented 2 years ago

That is line 411.

andreasdc commented 2 years ago

Why do you need more? Error is on this line: long chunkcoordinates = iterator.next(); Started happening after last patch

@tomasalves8

tomasalves8 commented 2 years ago

Like I said before that is line 411, but the stacktrace is indicating line 406, Have you made any changes to the code?

ghost commented 2 years ago

Like I said before that is line 411, but the stacktrace is indicating line 406, Have you made any changes to the code?

The code has comments before line 406 so the stacktrace won't have the correct line.

andreasdc commented 2 years ago

Like I said before that is line 411, but the stacktrace is indicating line 406, Have you made any changes to the code?

Yea

tomasalves8 commented 2 years ago

What changes have you made?

Sculas commented 2 years ago

He hasn't I think. @andreasdc could you test something for me?

Sculas commented 2 years ago

Try downloading this build here, once it's done: https://github.com/CobbleSword/NachoSpigot/actions/runs/1459216892 Then check if you get the same error again.

andreasdc commented 2 years ago

He hasn't I think. @andreasdc could you test something for me?

I made many changes, I will test nextLong and I will tell you the results. :)

andreasdc commented 2 years ago

Still happening. @Lucaskyy

andreasdc commented 2 years ago

@tomasalves8

Rastrian commented 2 years ago

How we can reproduce this error? We didn't know about which kind of changes made locally.

andreasdc commented 2 years ago

How we can reproduce this error? We didn't know about which kind of changes made locally.

Try with multiple worlds

Rastrian commented 2 years ago

How we can reproduce this error? We didn't know about which kind of changes made locally.

Try with multiple worlds

nah, just won't fix it without an detailed error report.

andreasdc commented 2 years ago

How we can reproduce this error? We didn't know about which kind of changes made locally.

Try with multiple worlds

nah, just won't fix it without an detailed error report.

What is missing in the error and why do you need more?

Rastrian commented 2 years ago

How we can reproduce this error? We didn't know about which kind of changes made locally.

Try with multiple worlds

nah, just won't fix it without an detailed error report.

What is missing in the error and why do you need more?

At the point where I can't reproduce the reported error, it can simply be derived from its implementation in your code.

Have you tested this with other multi-world plugins besides your proprietary implementation?

Because as said, it may be your mistake, without enough details there is no way to know and correct it.

andreasdc commented 2 years ago

How we can reproduce this error? We didn't know about which kind of changes made locally.

Try with multiple worlds

nah, just won't fix it without an detailed error report.

What is missing in the error and why do you need more?

At the point where I can't reproduce the reported error, it can simply be derived from its implementation in your code.

Have you tested this with other multi-world plugins besides your proprietary implementation?

Because as said, it may be your mistake, without enough details there is no way to know and correct it.

It doesn't happen instantly,if you need more info or some other checks I can help.

Rastrian commented 2 years ago

How we can reproduce this error? We didn't know about which kind of changes made locally.

Try with multiple worlds

nah, just won't fix it without an detailed error report.

What is missing in the error and why do you need more?

At the point where I can't reproduce the reported error, it can simply be derived from its implementation in your code. Have you tested this with other multi-world plugins besides your proprietary implementation? Because as said, it may be your mistake, without enough details there is no way to know and correct it.

It doesn't happen instantly,if you need more info or some other checks I can help.

that's why a full report matters.

tomasalves8 commented 2 years ago

How we can reproduce this error? We didn't know about which kind of changes made locally.

Try with multiple worlds

nah, just won't fix it without an detailed error report.

What is missing in the error and why do you need more?

At the point where I can't reproduce the reported error, it can simply be derived from its implementation in your code. Have you tested this with other multi-world plugins besides your proprietary implementation? Because as said, it may be your mistake, without enough details there is no way to know and correct it.

It doesn't happen instantly,if you need more info or some other checks I can help.

I've tried pretty much everything, in save-on and off.

Rastrian commented 2 years ago

@Lucaskyy please close this issue, if he want an fix for this, please submit another issue, the issue template now demands an detailed report.

Sculas commented 2 years ago

@andreasdc Closing this issue for now, please create a new issue with the new issue templates.

andreasdc commented 2 years ago

How we can reproduce this error? We didn't know about which kind of changes made locally.

Try with multiple worlds

nah, just won't fix it without an detailed error report.

What is missing in the error and why do you need more?

At the point where I can't reproduce the reported error, it can simply be derived from its implementation in your code.

Have you tested this with other multi-world plugins besides your proprietary implementation?

Because as said, it may be your mistake, without enough details there is no way to know and correct it.

I don't think that's my mistake.

Sculas commented 2 years ago

It's difficult to tell that since you're using a private fork of yours. We don't know your code, and nor do we know what changes you made. And since it doesn't happen on NachoSpigot (for what we know), we can only guess that it's your mistake. Could you switch your private fork with NachoSpigot (keep the rest the same) and try again and see if it happens? Because if not, then it's definitely your mistake. And since we also don't know your exact environment, we can't exactly reproduce it. So that's why I told you to create an issue using the issue template, and use NachoSpigot to test this bug instead of your fork. We can't and don't support forks of NachoSpigot.

andreasdc commented 2 years ago

It's difficult to tell that since you're using a private fork of yours. We don't know your code, and nor do we know what changes you made. And since it doesn't happen on NachoSpigot (for what we know), we can only guess that it's your mistake. Could you switch your private fork with NachoSpigot (keep the rest the same) and try again and see if it happens? Because if not, then it's definitely your mistake. And since we also don't know your exact environment, we can't exactly reproduce it. So that's why I told you to create an issue using the issue template, and use NachoSpigot to test this bug instead of your fork. We can't and don't support forks of NachoSpigot.

If it was my mistake that would only be indicated by async call to unloadQueue, I don't find anything like that.