Closed SlimeDog closed 4 months ago
More logs? Couldn't reproduce this issue
There are no other logged indicators.
Please handle the indicated NPE (Thread.java:1570). Code should never generate NPEs.
Can't really know where it's happening in the code, it says line 69 but there's no indication as to what could be. And obviously I can't guess what's throwing that NPE inside the Thread class. It must come from my code on line 69
Can't really know where it's happening in the code, it says line 69 but there's no indication as to what could be. And obviously I can't guess what's throwing that NPE inside the Thread class. It must come from my code on line 69
If I had to guess, I would posit that fastBoard.updateLines(list)
is trying to update a scoreboard that no longer exists, because the player has disconnected.
This should be solved in the latest commit and with the following .jar file: RealScoreboard.jar.zip
Testing...
Quite a few issues:
rsb debug
displays correct information, except Config Version: 0
although config.yml shows Version: '16'
out of memory
pointing to the same Thread.java:1570
as aboveI'm guessing that RSB has gone into an infinite thread creation loop.
BTW, the builds listed in Github Actions have been failing to produce artifacts since last December.
Testing...
Quite a few issues:
- Lines are not updating when I change worlds (title is correct, but no lines or lines from original world)
rsb debug
displays correct information, exceptConfig Version: 0
although config.yml showsVersion: '16'
- Server crashed due to
out of memory
pointing to the sameThread.java:1570
as aboveI'm guessing that RSB has gone into an infinite thread creation loop.
So the previous version doesn't have those issues but still has the flicker?
BTW, the builds listed in Github Actions have been failing to produce artifacts since last December.
I know, I just don't have the time to fix it, my helper is going through with it
So the previous version doesn't have those issues but still has the flicker?
Correct. Flicker on first join, and NPEs on disconnect.
Do you have any lead on what could be? Can't find the root cause of those issues
No idea. But I cannot use RS in this condition. It crashes my server. What changed recently?
I tried to fix the flickering by checking if the current board was null, but that caused you server to crash as you said. Recently I changed the way the scoreboards load from the config, and added the other worlds list to every scoreboard
It must come from my code on line 69
Agreed. Given
List<String> list = current.getLines().stream().map(s -> {
s = s.matches("(?i)%blank%") ?
(Text.randomColor() + "§r" + Text.randomColor()) :
RealScoreboardAPI.getInstance().getPlaceholders().setPlaceHolders(p, s);
return Text.color(s);
}).collect(Collectors.toList());
if (fastBoard != null && !fastBoard.isDeleted())
fastBoard.updateLines(list);
shouldn't the code verify that s
is not null before using it, and that list
is not null before using it?
Is this issue still active after the latest commit?
Can't get the server to throw an NPE when disconnecting with the latest commit
Is there a build to test?
Sure! Here, compiled 12 minutes ago: RealScoreboard.jar.zip
Paper 1.21-37 RealScoreboard 1.4.3
scoreboards.yml
Version: 3
Scoreboards:
default:
Default: true
Default-World: world
Other-Worlds:
- '*'
Display-Name: 'Admin Scoreboard'
Permission: realscoreboard.admin
Refresh:
Scoreboard: 3
Title: 20
Title-Loop-Delay: 5
Board-Loop-Delay: 20
Boards:
admin:
Title:
- '&7□□□□□□□□ &l%server_name%&r&7 □□□□□□□□'
Lines:
- '&8world: &7%multiverse_world_alias%'
- '&8location: &7%player_x% %player_y% %player_z%'
- '&8chunk: &7%coordinatetool_chunk%'
- '&8region: &7%coordinatetool_file%'
- '&8b_biome: &7%biomeremap_biome_name%'
- '&8p_biome: &7%player_biome%'
- '&8time: &7%player_world_time_24%'
- '&8tps: &7%server_tps_1% %server_tps_5%'
- ''
- '&8health: &7%player_health%'
- '&8deaths: &7%statistic_deaths% (%plan_player_death_count%)'
- '&8points$: &7%vault_eco_balance%'
- '&8group: &7%luckperms_primary_group_name%'
When first connected, only the title appears. Eventually, the lines appear. When I change worlds, only the title appears. Eventually, the lines appear, but they are from the original world, not the current world. In addition, there are continuous console/log warnings as the player moves, which do not occur if RealScoreboard is not enabled:
[09:40:07 WARN]: Exception in thread "Craft Async Scheduler Management Thread" java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
[09:40:07 WARN]: at java.base/java.lang.Thread.start0(Native Method)
[09:40:07 WARN]: at java.base/java.lang.Thread.start(Thread.java:1540)
[09:40:07 WARN]: at java.base/java.lang.System$2.start(System.java:2582)
[09:40:07 WARN]: at java.base/jdk.internal.vm.SharedThreadContainer.start(SharedThreadContainer.java:152)
[09:40:07 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:953)
[09:40:07 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1021)
[09:40:07 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158)
[09:40:07 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[09:40:07 WARN]: at java.base/java.lang.Thread.run(Thread.java:1570)
> [638.887s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 4k, detached.
[638.890s][warning][os,thread] Failed to start the native thread for java.lang.Thread "Craft Scheduler Thread - 3982"
[638.890s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 4k, detached.
[638.890s][warning][os,thread] Failed to start the native thread for java.lang.Thread "Craft Async Scheduler Management Thread"
and the server is basically dead-in-the-water.
With that config and the latest build I'm unable to reproduce that thread fail and the scoreboard behaviour that you're reporting. Tested on a simple server with 15 plugins.
Simple Spigot or simple Paper. Version?
Paper version, 1.20.6 build
The issue seems to be the %plan_player_death_count%
placeholder. The scoreboard works fine without it, fails miserably with it.
That placeholder doesn't come from RSB, it's external. From which plugin is it? Does it run fine without that placeholder?
RealScoreboard works fine without that (or any other Plan) placeholder. I opened an issue over there.
Does RSB go into a loop if a placeholder (like any Plan placeholder) returns "%something%"?
Does RSB go into a loop if a placeholder (like any Plan placeholder) returns "%something%"?
In the RSB native placeholders i just do a replace, so i assume it doesnt, but i suppose that PAPI could enter a loop maybe?
Just wondering, since a loop would explain the memory/CPU consumption.
Are you going to publish RSB 1.4.3 ?
Yes, when i have time
Paper 1.20.6-49 RealScoreboard 1.4.2
I often see these errors on player disconnect