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

Folia support #312

Closed
wants to merge 1 commit into from
Closed

Folia support #312

wants to merge 1 commit into from

Conversation

lucko
Copy link
Owner

@lucko lucko commented Apr 2, 2023

Adds support for Paper's regionised/multithreading Folia project.

This is an early beta, there might be bugs (although I have tested it!)

Test build

There is a jar you can download from Jenkins: https://ci.lucko.me/job/spark-extra-platforms/

@PanSzelescik
Copy link

Now this spark can't run on Java older than 17, this should be fixed (?) or it should be mentioned on the page

@lucko
Copy link
Owner Author

lucko commented Apr 12, 2023

I haven't decided what to do about that, but for the moment it doesn't matter because Folia only supports 17+ anyway.

@masmc05
Copy link

masmc05 commented Apr 16, 2023

[09:58:35 WARN]: java.lang.NullPointerException: Cannot invoke "io.papermc.paper.threadedregions.TickData$TickReportData.tpsData()" because "data" is null
[09:58:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.lambda$tps$3(FoliaTickStatistics.java:139)
[09:58:35 WARN]:        at java.base/java.util.stream.ReferencePipeline$6$1.accept(ReferencePipeline.java:248)
[09:58:35 WARN]:        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[09:58:35 WARN]:        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[09:58:35 WARN]:        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
[09:58:35 WARN]:        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[09:58:35 WARN]:        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[09:58:35 WARN]:        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
[09:58:35 WARN]:        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[09:58:35 WARN]:        at java.base/java.util.stream.DoublePipeline.collect(DoublePipeline.java:541)
[09:58:35 WARN]:        at java.base/java.util.stream.DoublePipeline.average(DoublePipeline.java:493)
[09:58:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.tps(FoliaTickStatistics.java:140)
[09:58:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.tps1Min(FoliaTickStatistics.java:65)
[09:58:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.window.WindowStatisticsCollector.measure(WindowStatisticsCollector.java:166)
[09:58:35 WARN]:        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
[09:58:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.window.WindowStatisticsCollector.measureNow(WindowStatisticsCollector.java:123)
[09:58:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncSampler.rotateProfilerJob(AsyncSampler.java:140)
[09:58:35 WARN]:        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[09:58:35 WARN]:        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
[09:58:35 WARN]:        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[09:58:35 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[09:58:35 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[09:58:35 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)

@masmc05
Copy link

masmc05 commented Apr 16, 2023

isn't often, but happens

@masmc05
Copy link

masmc05 commented Apr 17, 2023

image

[06:45:57 INFO]: masmc05 issued server command: /spark profiler start --timeout 11
[06:45:57 INFO]: [⚡] Starting a new profiler, please wait...
[06:45:57 INFO]: [⚡] Profiler is now running! (async)
[06:45:57 INFO]: [⚡] The results will be automatically returned after the profiler has been running for 11s.
[06:46:33 WARN]: java.lang.IllegalStateException: Profiler job no longer active!
[06:46:33 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncProfilerJob.checkActive(AsyncProfilerJob.java:117)
[06:46:33 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncProfilerJob.stop(AsyncProfilerJob.java:188)
[06:46:33 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncSampler.rotateProfilerJob(AsyncSampler.java:125)
[06:46:33 WARN]:        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[06:46:33 WARN]:        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
[06:46:33 WARN]:        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[06:46:33 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[06:46:33 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[06:46:33 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)
[06:46:33 WARN]: java.lang.NullPointerException: Cannot invoke "io.papermc.paper.threadedregions.TickData$TickReportData.tpsData()" because "data" is null
[06:46:33 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.lambda$tps$3(FoliaTickStatistics.java:139)
[06:46:33 WARN]:        at java.base/java.util.stream.ReferencePipeline$6$1.accept(ReferencePipeline.java:248)
[06:46:33 WARN]:        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[06:46:33 WARN]:        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[06:46:33 WARN]:        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
[06:46:33 WARN]:        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[06:46:33 WARN]:        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[06:46:33 WARN]:        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
[06:46:33 WARN]:        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[06:46:33 WARN]:        at java.base/java.util.stream.DoublePipeline.collect(DoublePipeline.java:541)
[06:46:33 WARN]:        at java.base/java.util.stream.DoublePipeline.average(DoublePipeline.java:493)
[06:46:33 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.tps(FoliaTickStatistics.java:140)
[06:46:33 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.tps1Min(FoliaTickStatistics.java:65)
[06:46:33 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.window.WindowStatisticsCollector.measure(WindowStatisticsCollector.java:166)
[06:46:33 WARN]:        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
[06:46:33 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.window.WindowStatisticsCollector.measureNow(WindowStatisticsCollector.java:123)
[06:46:33 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncSampler.rotateProfilerJob(AsyncSampler.java:140)
[06:46:33 WARN]:        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[06:46:33 WARN]:        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
[06:46:33 WARN]:        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[06:46:33 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[06:46:33 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[06:46:33 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)
[06:46:34 INFO]: masmc05 issued server command: /spark profiler info
[06:46:57 WARN]: java.lang.IllegalStateException: Profiler job no longer active!
[06:46:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncProfilerJob.checkActive(AsyncProfilerJob.java:117)
[06:46:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncProfilerJob.stop(AsyncProfilerJob.java:188)
[06:46:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncSampler.rotateProfilerJob(AsyncSampler.java:125)
[06:46:57 WARN]:        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[06:46:57 WARN]:        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
[06:46:57 WARN]:        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[06:46:57 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[06:46:57 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[06:46:57 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)
[06:46:57 WARN]: java.lang.IllegalStateException: Another profiler is already active: me.lucko.spark.common.sampler.async.AsyncProfilerJob@478eb5df
[06:46:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncProfilerJob.createNew(AsyncProfilerJob.java:64)
[06:46:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncProfilerAccess.startNewProfilerJob(AsyncProfilerAccess.java:103)
[06:46:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncSampler.rotateProfilerJob(AsyncSampler.java:132)
[06:46:57 WARN]:        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[06:46:57 WARN]:        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
[06:46:57 WARN]:        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[06:46:57 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[06:46:57 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[06:46:57 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)

Profilers don't work on folia, and

[06:48:57 WARN]: java.lang.IllegalStateException: Profiler job no longer active!
[06:48:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncProfilerJob.checkActive(AsyncProfilerJob.java:117)
[06:48:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncProfilerJob.stop(AsyncProfilerJob.java:188)
[06:48:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncSampler.rotateProfilerJob(AsyncSampler.java:125)
[06:48:57 WARN]:        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[06:48:57 WARN]:        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
[06:48:57 WARN]:        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[06:48:57 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[06:48:57 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[06:48:57 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)
[06:48:57 WARN]: java.lang.IllegalStateException: Another profiler is already active: me.lucko.spark.common.sampler.async.AsyncProfilerJob@669c40ab
[06:48:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncProfilerJob.createNew(AsyncProfilerJob.java:64)
[06:48:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncProfilerAccess.startNewProfilerJob(AsyncProfilerAccess.java:103)
[06:48:57 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncSampler.rotateProfilerJob(AsyncSampler.java:132)
[06:48:57 WARN]:        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[06:48:57 WARN]:        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
[06:48:57 WARN]:        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[06:48:57 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[06:48:57 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[06:48:57 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)

starts spamming in console after trying to use them

@masmc05
Copy link

masmc05 commented Apr 17, 2023

also when i tried to stop the background profiler i had this error

[06:45:35 INFO]: masmc05 issued server command: /spark profiler stop
[06:45:35 ERROR]: [spark] Exception occurred whilst executing a spark command
[06:45:35 WARN]: java.lang.NullPointerException: Cannot invoke "io.papermc.paper.threadedregions.TickData$TickReportData.tpsData()" because "data" is null
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.lambda$tps$3(FoliaTickStatistics.java:139)
[06:45:35 WARN]:        at java.base/java.util.stream.ReferencePipeline$6$1.accept(ReferencePipeline.java:248)
[06:45:35 WARN]:        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[06:45:35 WARN]:        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[06:45:35 WARN]:        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
[06:45:35 WARN]:        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[06:45:35 WARN]:        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[06:45:35 WARN]:        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
[06:45:35 WARN]:        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[06:45:35 WARN]:        at java.base/java.util.stream.DoublePipeline.collect(DoublePipeline.java:541)
[06:45:35 WARN]:        at java.base/java.util.stream.DoublePipeline.average(DoublePipeline.java:493)
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.tps(FoliaTickStatistics.java:140)
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.tps1Min(FoliaTickStatistics.java:65)
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.window.WindowStatisticsCollector.measure(WindowStatisticsCollector.java:166)
[06:45:35 WARN]:        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.window.WindowStatisticsCollector.measureNow(WindowStatisticsCollector.java:123)
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.sampler.async.AsyncSampler.stop(AsyncSampler.java:186)
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.command.modules.SamplerModule.profilerStop(SamplerModule.java:398)
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.command.modules.SamplerModule.profiler(SamplerModule.java:141)
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.SparkPlatform.executeCommand0(SparkPlatform.java:430)
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.common.SparkPlatform.lambda$executeCommand$2(SparkPlatform.java:339)
[06:45:35 WARN]:        at spark-bukkit-1.10-SNAPSHOT.jar//me.lucko.spark.bukkit.folia.FoliaScheduler.lambda$executeAsync$0(FoliaScheduler.java:42)
[06:45:35 WARN]:        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:216)
[06:45:35 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[06:45:35 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[06:45:35 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)

@Yomamaeatstoes
Copy link

Yomamaeatstoes commented May 26, 2023

https://mclo.gs/uOSVUdo

Giant Folia Spark Error

@Yomamaeatstoes
Copy link

Will there be an update for Folia 1.20? Right now this version of spark doesn't work.

@ewof
Copy link

ewof commented Jun 25, 2023

^

@lucko

This comment was marked as outdated.

@lucko lucko force-pushed the feat/folia branch 2 times, most recently from 991276d to fbd2fd7 Compare June 25, 2023 12:17
@xKumorio
Copy link

[02:56:47 INFO]: kumorio issued server command: /spark profiler start
[02:56:47 INFO]: [⚡] Starting a new profiler, please wait...
[02:56:47 ERROR]: [spark] Exception occurred whilst executing a spark command
[02:56:47 WARN]: java.lang.IllegalStateException: Another profiler is already active: me.lucko.spark.common.sampler.async.AsyncProfilerJob@26f24cad
[02:56:47 WARN]: at spark-bukkit-folia-mc1.20.jar//me.lucko.spark.common.sampler.async.AsyncProfilerJob.createNew(AsyncProfilerJob.java:64)
[02:56:47 WARN]: at spark-bukkit-folia-mc1.20.jar//me.lucko.spark.common.sampler.async.AsyncProfilerAccess.startNewProfilerJob(AsyncProfilerAccess.java:103)
[02:56:47 WARN]: at spark-bukkit-folia-mc1.20.jar//me.lucko.spark.common.sampler.async.AsyncSampler.start(AsyncSampler.java:94)
[02:56:47 WARN]: at spark-bukkit-folia-mc1.20.jar//me.lucko.spark.common.sampler.SamplerBuilder.start(SamplerBuilder.java:147)
[02:56:47 WARN]: at spark-bukkit-folia-mc1.20.jar//me.lucko.spark.common.command.modules.SamplerModule.profilerStart(SamplerModule.java:251)
[02:56:47 WARN]: at spark-bukkit-folia-mc1.20.jar//me.lucko.spark.common.command.modules.SamplerModule.profiler(SamplerModule.java:146)
[02:56:47 WARN]: at spark-bukkit-folia-mc1.20.jar//me.lucko.spark.common.SparkPlatform.executeCommand0(SparkPlatform.java:430)
[02:56:47 WARN]: at spark-bukkit-folia-mc1.20.jar//me.lucko.spark.common.SparkPlatform.lambda$executeCommand$2(SparkPlatform.java:339)
[02:56:47 WARN]: at spark-bukkit-folia-mc1.20.jar//me.lucko.spark.bukkit.folia.FoliaScheduler.lambda$executeAsync$0(FoliaScheduler.java:42)
[02:56:47 WARN]: at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:216)
[02:56:47 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[02:56:47 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[02:56:47 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)

@Yomamaeatstoes
Copy link

spark-bukkit-folia-mc1.20.jar.zip

Updated for MC 1.20 :)

Spark profiler stop doesn't work either. https://mclo.gs/whKrkCK

@Yomamaeatstoes
Copy link

@lucko

spark-bukkit-folia-mc1.20.jar.zip
Updated for MC 1.20 :)

Spark profiler stop doesn't work either. https://mclo.gs/whKrkCK

@ewof
Copy link

ewof commented Jul 6, 2023

[13:16:54 WARN]: java.lang.NoSuchMethodError: 'net.minecraft.server.level.ServerLevel org.bukkit.craftbukkit.v1_20_R1.CraftWorld.getHandle()'
[13:16:54 WARN]:        at spark-1.10.43-bukkit.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.getRegions(FoliaTickStatistics.java:101)
[13:16:54 WARN]:        at spark-1.10.43-bukkit.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.lambda$new$0(FoliaTickStatistics.java:50)
[13:16:54 WARN]:        at com.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Suppliers.java:262)
[13:16:54 WARN]:        at spark-1.10.43-bukkit.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.tps(FoliaTickStatistics.java:109)
[13:16:54 WARN]:        at spark-1.10.43-bukkit.jar//me.lucko.spark.bukkit.folia.FoliaTickStatistics.tps1Min(FoliaTickStatistics.java:65)
[13:16:54 WARN]:        at spark-1.10.43-bukkit.jar//me.lucko.spark.common.sampler.window.WindowStatisticsCollector.measure(WindowStatisticsCollec
tor.java:166)
[13:16:54 WARN]:        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
[13:16:54 WARN]:        at spark-1.10.43-bukkit.jar//me.lucko.spark.common.sampler.window.WindowStatisticsCollector.measureNow(WindowStatisticsCol
lector.java:123)
[13:16:54 WARN]:        at spark-1.10.43-bukkit.jar//me.lucko.spark.common.sampler.async.AsyncSampler.rotateProfilerJob(AsyncSampler.java:140)
[13:16:54 WARN]:        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[13:16:54 WARN]:        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
[13:16:54 WARN]:        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305
)
[13:16:54 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[13:16:54 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[13:16:54 WARN]:        at java.base/java.lang.Thread.run(Thread.java:833)

@LuluxClient
Copy link

Getting this issue when doing /spark profiler open:


[23:57:40 INFO]: [⚡] Starting a new profiler, please wait...
[23:57:40 INFO]: [⚡] Profiler is now running! (async)
[23:57:40 INFO]: [⚡] It will run in the background until it is stopped by an admin.
[23:57:40 INFO]: [⚡] To stop the profiler and upload the results, run:
[23:57:40 INFO]: [⚡]   /spark profiler stop
[23:57:40 INFO]: [⚡] To view the profiler while it's running, run:
[23:57:40 INFO]: [⚡]   /spark profiler open
[23:57:43 INFO]: xdLulux issued server command: /spark profiler open
[23:57:43 WARN]: [spark] Async task for spark v1.10.43 generated an exception
java.lang.NoSuchMethodError: 'net.minecraft.server.level.ServerLevel org.bukkit.craftbukkit.v1_20_R1.CraftWorld.getHandle()'
        at me.lucko.spark.bukkit.folia.FoliaTickStatistics.getRegions(FoliaTickStatistics.java:101) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.bukkit.folia.FoliaTickStatistics.lambda$new$0(FoliaTickStatistics.java:50) ~[spark-bukkit-folia-mc1.20.jar:?]
        at com.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Suppliers.java:262) ~[guava-31.1-jre.jar:?]
        at me.lucko.spark.bukkit.folia.FoliaTickStatistics.tps(FoliaTickStatistics.java:109) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.bukkit.folia.FoliaTickStatistics.tps1Min(FoliaTickStatistics.java:65) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.common.platform.PlatformStatisticsProvider.getPlatformStatistics(PlatformStatisticsProvider.java:164) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.common.sampler.AbstractSampler.writeMetadataToProto(AbstractSampler.java:195) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.common.sampler.async.AsyncSampler.toProto(AsyncSampler.java:224) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.common.command.modules.SamplerModule.handleOpen(SamplerModule.java:471) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.common.command.modules.SamplerModule.profilerOpen(SamplerModule.java:355) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.common.command.modules.SamplerModule.profiler(SamplerModule.java:126) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.common.SparkPlatform.executeCommand0(SparkPlatform.java:430) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.common.SparkPlatform.lambda$executeCommand$2(SparkPlatform.java:339) ~[spark-bukkit-folia-mc1.20.jar:?]
        at me.lucko.spark.bukkit.folia.FoliaScheduler.lambda$executeAsync$0(FoliaScheduler.java:42) ~[spark-bukkit-folia-mc1.20.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217) ~[folia-1.20.1.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1623) ~[?:?]

@iLemon
Copy link

iLemon commented Aug 27, 2023

Any chance we can get a 1.20.1 folia version?

@lucko

This comment was marked as outdated.

@lucko

This comment was marked as outdated.

@lucko lucko force-pushed the feat/folia branch 2 times, most recently from dc5cfcf to 2710d63 Compare August 28, 2023 15:51
@DarkyG2
Copy link

DarkyG2 commented Sep 28, 2023

After using it for some time I have 0 issues, would love to see a PR on the main branch !

@ranminecraft
Copy link

After using it for some time I have 0 issues, would love to see a PR on the main branch !

+1

@Netherwhal
Copy link

@lucko can we please have this merged into main and released?

static {
boolean active = false;
try {
Class.forName("io.papermc.paper.threadedregions.scheduler.RegionScheduler");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is present in paper now, too. It should rather check for io.papermc.paper.threadedregions.RegionizedServer.

@lucko
Copy link
Owner Author

lucko commented Feb 9, 2024

I have rebased and also setup a Jenkins build for this branch :)

https://ci.lucko.me/job/spark-folia/

@RitaSister
Copy link

really, when been is merged?

@xKumorio
Copy link

xKumorio commented Aug 8, 2024

update to 1.21 please

@lucko
Copy link
Owner Author

lucko commented Aug 16, 2024

I have rebased with the latest spark changes. Folia is not yet available for 1.21 (at least, there is not a published dev-bundle yet)

@Yomamaeatstoes
Copy link

I have rebased with the latest spark changes. Folia is not yet available for 1.21 (at least, there is not a published dev-bundle yet)

I think you may find this useful then, https://github.com/Folia-Inquisitors/FoliaDevBundle

@lucko
Copy link
Owner Author

lucko commented Oct 20, 2024

Merged into spark-extra-platforms: lucko/spark-extra-platforms@34fe9d5

Builds can be downloaded from: https://ci.lucko.me/job/spark-extra-platforms/

@lucko lucko closed this Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.