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

FlatFileStorage saving async throwing Assertion Error exception #6186

Open
1 task done
TheLimeGlass opened this issue Nov 12, 2023 · 0 comments
Open
1 task done

FlatFileStorage saving async throwing Assertion Error exception #6186

TheLimeGlass opened this issue Nov 12, 2023 · 0 comments
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Nov 12, 2023

Skript/Server Version

2.8.0-dev
1.20.1 Paper

Bug Description

Assertion error exception thrown pointing to assert Bukkit.isPrimaryThread()

Expected Behavior

To not throw an assertion exception every save

Steps to Reproduce

I just saved displays into a global variable which is temporary.

spawn a block display at player
set {_hack} to last spawned block display
add {_hack} to {displays::*}

This gets around the parse time warning of stating that an entity cannot be saved to a variable. I don't believe this has anything to do with this issue. Just stating that this is the only thing that can be in ram variables for it to be saving with.

Errors or Screenshots

java.lang.AssertionError: null
        at ch.njol.skript.registrations.Classes.serialize(Classes.java:723) ~[Skript.jar:?]
        at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:498) ~[Skript.jar:?]
        at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:487) ~[Skript.jar:?]
        at ch.njol.skript.variables.FlatFileStorage.saveVariables(FlatFileStorage.java:436) ~[Skript.jar:?]
        at ch.njol.skript.variables.FlatFileStorage$1.run(FlatFileStorage.java:280) ~[Skript.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.1.jar:git-Paper-196]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.1.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Other

Databases should always save async, this assertion error should be removed, or should only sync during serialization for collecting the value.

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@AyhamAl-Ali AyhamAl-Ali added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). priority: low Issues that are not harmful to the experience but are related to useful changes or additions. and removed priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). labels Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

2 participants