I just updated my server to start using PMMP and within minutes of disabling the movement checks this crash occurred, now the server won't run for more than 10 minutes without crashing.
Is this crash reproducible without plugins?
@dktapps Not sure. I've since figured out that a related error can be reproduced through a plugin though: 24.03 18:30:40 [Server] Server thread/CRITICAL Could not execute task duels\duel\DuelCountdown: Call to a member function getSafeSpawn() on null
Code:
/** @var $p pocketmine\Player */
/** @var $location pocketmine\level\Location */
$location = $this->arena->getLocations()[$i]
$p->teleport($p->level->getSafeSpawn($location));
"Components": {
"name": "Components",
"version": "0.1.0_ALPHA",
"authors": [
"Jack Noordhuis"
],
"api": [
"3.0.0-ALPHA4",
"3.0.0-ALPHA5",
"3.0.0-ALPHA6",
"3.0.0-ALPHA7",
"3.0.0-ALPHA8",
"3.0.0-ALPHA9",
"3.0.0-ALPHA10",
"3.0.0-ALPHA11",
"3.0.0-ALPHA12"
],
"enabled": true,
"depends": [],
"softDepends": [],
"main": "\\core\\Main",
"load": "STARTUP",
"website": null
},
"Duels": {
"name": "Duels",
"version": "0.0.9_ALPHA",
"authors": [
"Jack Noordhuis"
],
"api": [
"3.0.0-ALPHA4",
"3.0.0-ALPHA5",
"3.0.0-ALPHA6",
"3.0.0-ALPHA7",
"3.0.0-ALPHA8",
"3.0.0-ALPHA9",
"3.0.0-ALPHA10",
"3.0.0-ALPHA11",
"3.0.0-ALPHA12"
],
"enabled": true,
"depends": [],
"softDepends": [],
"main": "duels\\Main",
"load": "POSTWORLD",
"website": null
}
:facepalm:
Shhh, I'm too lazy to bump the API on every plugin every time the source does it ;p
@JackNoordhuis -.- The API version exists for a reason. What is the point of it if you just add all the versions? It is to protect your server if breaking API changes are made. You completely defeated the purpose of it.
I'm giving consideration to removing the capability to specify multiple API versions.
because realistically speaking it doesn't do anything on stable API anyway, because minor versions are supposed to retain backwards compatibility anyway.
And for major API bumps and betas it just provides a dangerous way to sit on both sides of the fence
but of course, many people won't like that and will turn to spoons instead.
@madecode15 You really think I'd update the software on production servers without testing to make sure everything works first 🤦♂️
@dktapps People who know what they're doing shouldn't have to worry about bumping an API version in a file that practically never gets touched.
yeah, and that's exactly my point... 99% of people _don't_ know what they are doing. They just are too lazy to open a text editor and edit one damn number. It's ridiculous.
That got off-topic quickly...
I either need reproducing code or a way to reproduce this without plugins, since I have never encountered this issue.
I can theorize why this could be happening - I'd hazard a guess at some issue with PlayerQuitEvent and/or leaked Player objects.
If you're holding strong refs to players - well, for a start I _definitely_ don't advise that, as you'll leak a significant amount of memory when said players quit - but regardless, make sure you check player->closed === false before doing anything with referenced players.
Any update on this?
@dktapps I occasionally get addParticle() on null (Arrow.php, line 59) error on the console when players fire arrows.
Relatable.
@Muqsit #443
@dktapps Pretty sure it was a memory leak caused by a plugin. I've since fixed the cause and forgotten about this issue :P
Most helpful comment
Shhh, I'm too lazy to bump the API on every plugin every time the source does it ;p