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

Could not pass event InventoryClickEvent to CrazyCrates v3.6 Folia 1.21 #773

Closed
2 of 3 tasks
Potenza7 opened this issue Aug 7, 2024 · 20 comments
Closed
2 of 3 tasks
Assignees
Labels
resolution: can't reproduce Cannot reproduce the described bug type: bug A bug with the resource

Comments

@Potenza7
Copy link

Potenza7 commented Aug 7, 2024

Spark link

No response

Plugin Version

3.6

Server Version

1.21

Server Platform

Folia

Describe the bug

https://mclo.gs/XBazwWN

Crate Type

None

Steps to reproduce

Additional context

No response

Agreements

  • I have searched for and ensured there isn't already an open issue regarding this.
  • I ticked all the boxes without actually reading them
  • My version of Minecraft is supported by CrazyCrew.
@Potenza7 Potenza7 added the type: bug A bug with the resource label Aug 7, 2024
@ryderbelserion
Copy link
Member

ryderbelserion commented Aug 7, 2024

Not much I can do with that, it points to nothing in CrazyCrates itself in the stacktrace except one line.

I don't run any tasks in the click event that try to read the world.

@Potenza7
Copy link
Author

Potenza7 commented Aug 7, 2024

When I shared this problem as Folia's github issues, they said it was a plugin problem. Frankly, I was confused about what to do.

@ryderbelserion
Copy link
Member

I just checked the line it points to, I don't run any task that would cause that error. The line it points to is a method handled purely by the server, so something must've changed internally.

@Potenza7
Copy link
Author

Potenza7 commented Aug 7, 2024

Should I report this to folia then?

@ryderbelserion
Copy link
Member

I don't know, if they sent you here. You just going to be bounced back and forth.

@Potenza7
Copy link
Author

Potenza7 commented Aug 7, 2024

Hell yeah the hours of hell begin for me. Thanks.

@ryderbelserion
Copy link
Member

if (!(inventory.getHolder(false) instanceof CratePrizeMenu holder)) return;

This is the line it throws the error on in question, I don't run any task that would make this throw that exception, so my only bet is that it's something to do with inventory#getHolder internally. I simply use the API provided.

I see this was your issue here, PaperMC/Folia#270. a stacktrace would've probably helped, but they might bounce you back here.

@RitaSister
Copy link

if (!(inventory.getHolder(false) instanceof CratePrizeMenu holder)) return;

This is the line it throws the error on in question, I don't run any task that would make this throw that exception, so my only bet is that it's something to do with inventory#getHolder internally. I simply use the API provided.

I see this was your issue here, PaperMC/Folia#270. a stacktrace would've probably helped, but they might bounce you back here.

maybe your plugin reads incorrectly world data?
java.lang.IllegalStateException: Cannot read world asynchronously I got same error in my private plugins and need correct write code for correct read world?

@ryderbelserion
Copy link
Member

ryderbelserion commented Aug 7, 2024

I don't read the world in that event. false implies I don't need an entire snapshot.

@RitaSister
Copy link

you checked this line in logs?
at CrazyCrates-3.6.jar/com.badbones69.crazycrates.listeners.crates.CosmicCrateListener.onPrizeReceive(CosmicCrateListener.java:62) ~[CrazyCrates-3.6.jar:?]

I don't read the world in that event. false implies I don't need an entire snapshot.

@ryderbelserion
Copy link
Member

ryderbelserion commented Aug 7, 2024

That's the same thing, it checks if the inventory holder matches.

@Potenza7
Copy link
Author

Potenza7 commented Aug 7, 2024

PaperMC/Folia#271

@RitaSister
Copy link

That's the same thing, it checks if the inventory holder matches.

I got same error in past and paper said me where is error
image

@RitaSister
Copy link

So I think paper maybe close is soon issues created by Potenza

@RitaSister
Copy link

I understand how fix it. You need use RegionScheduler for get correct region in Folia. Because Folia working with Regions where ticking in thread(core) of cpu.

@ryderbelserion
Copy link
Member

That ignores the issue.

@RitaSister
Copy link

That ignores the issue.

what is issues?

@ryderbelserion
Copy link
Member

ryderbelserion commented Aug 7, 2024

It's an oddity that it needs a region scheduler, despite not running in what I would assume an unsafe way? There is no task putting it anywhere else?

I've even looked into Folia's source, the only thing is that check preventing the getNMS function from calling. everything still works.

@RitaSister
Copy link

I don't use the region scheduler at all for that area the stacktrace points to, there is no task running. it doesn't need one.

If there is a task running async while the holder tries to read the world, it's running internally in code I don't handle, upstream from Paper or Folia.

Ok, whatever how are you want. I just said error and how can will be fixed. Even if don't used any shedulers or RegionScheduler for Folia.

@ryderbelserion
Copy link
Member

I can't reproduce on dev/1.21 of Folia, latest commit 2b8c879

@ryderbelserion ryderbelserion added the resolution: can't reproduce Cannot reproduce the described bug label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: can't reproduce Cannot reproduce the described bug type: bug A bug with the resource
Projects
None yet
Development

No branches or pull requests

3 participants