Closed nasiridrishi closed 6 years ago
Could you provide the content of the crashdump file?
PocketMine-MP Crash Dump Tue Aug 1 19:42:30 EDT 2017
Error: Call to a member function isAuthenticated() on null
File: PiggyAuth.phar/src/PiggyAuth/Main
Line: 937
Type: notice
THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: PiggyAuth v3.0.0.21
Code:
[928] * @param Player $player
[929] * @return bool
[930] */
[931] public function isTooManyIPOnline(Player $player)
[932] {
[933] $players = 0;
[934] foreach ($this->getServer()->getOnlinePlayers() as $p) {
[935] if ($p !== $player) {
[936] if ($p->getAddress() == $player->getAddress()) {
[937] if ($this->getSessionManager()->getSession($p)->isAuthenticated()) {
[938] $players++;
[939] }
[940] }
[941] }
[942] }
[943] return $players > ($this->getConfig()->getNested("login.ip-limit") - 1);
[944] }
[945]
[946] /**
[947] * @param $password
Backtrace:
#0 PiggyAuth.phar/src/PiggyAuth/Main(412): PiggyAuth\Main->isTooManyIPOnline(pocketmine\Player object)
#1 PiggyAuth.phar/src/PiggyAuth/Sessions/PiggyAuthSession(464): PiggyAuth\Main->force(pocketmine\Player object, boolean 1, integer 1)
#2 PiggyAuth.phar/src/PiggyAuth/Sessions/SessionManager(51): PiggyAuth\Sessions\PiggyAuthSession->startSession(pocketmine\event\TranslationContainer object)
#3 PiggyAuth.phar/src/PiggyAuth/Tasks/MySQLTask(65): PiggyAuth\Sessions\SessionManager->PiggyAuth\Sessions\{closure}(array Array(), Volatile object, PiggyAuth\Main object)
#4 src/pocketmine/scheduler/AsyncPool(158): PiggyAuth\Tasks\MySQLTask->onCompletion(pocketmine\Server object)
#5 src/pocketmine/scheduler/ServerScheduler(341): pocketmine\scheduler\AsyncPool->collectTasks()
#6 src/pocketmine/Server(2456): pocketmine\scheduler\ServerScheduler->mainThreadHeartbeat(integer 147)
#7 src/pocketmine/Server(2221): pocketmine\Server->tick()
#8 src/pocketmine/Server(2100): pocketmine\Server->tickProcessor()
#9 src/pocketmine/Server(1682): pocketmine\Server->start()
#10 src/pocketmine/PocketMine(511): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///home/fac/PocketMine-MP.phar/, string /home/fac/, string /home/fac/plugins/)
#11 /home/fac/PocketMine-MP.phar(1): require_once(string phar:///home/fac/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
PocketMine-MP version: 1.6.2dev #0 [Protocol 113; API 3.0.0-ALPHA7]
Git commit: 0000000000000000000000000000000000000000
uname -a: Linux PrimeFac 2.6.32-48-pve #1 SMP Fri Dec 23 10:22:54 CET 2016 x86_64
PHP Version: 7.0.3
Zend version: 3.0.0
OS : Linux, linux
please help fix this and email problem with pmmp where it doesnt respond anything when I enter email while registration etc. piggyauth will be perfect after this!
piggyauth will be perfect after this!
To that, I will say PiggyAuth has been incredibly buggy since 0.17.0 and still is.
@DaPigGuy I think it could be right to make MySQL::getPlayer() synchronously. What are your thoughts?
Yeah :/
Actually, how about creating a temporary Session for the player which will always return false for isAuthenticated()? That way we won't block the main thread and can solve this issue.
I consider this fixed but it still needs testing. At the moment I'm not completly sure how the plugin will behave if the player has a temporary session.
I will test in my servers and report!
still same! crashing server on "is too many players online" ! whats this???
THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: PiggyAuth v3.0.0.22
Code:
[928] * @param Player $player
[929] * @return bool
[930] */
[931] public function isTooManyIPOnline(Player $player)
[932] {
[933] $players = 0;
[934] foreach ($this->getServer()->getOnlinePlayers() as $p) {
[935] if ($p !== $player) {
[936] if ($p->getAddress() == $player->getAddress()) {
[937] if ($this->getSessionManager()->getSession($p)->isAuthenticated()) {
[938] $players++;
[939] }
[940] }
[941] }
[942] }
[943] return $players > ($this->getConfig()->getNested("login.ip-limit") - 1);
[944] }
[945]
[946] /**
[947] * @param $password
Backtrace:
#0 PiggyAuth.phar/src/PiggyAuth/Main(412): PiggyAuth\Main->isTooManyIPOnline(pocketmine\Player object)
#1 PiggyAuth.phar/src/PiggyAuth/Sessions/PiggyAuthSession(464): PiggyAuth\Main->force(pocketmine\Player object, boolean 1, integer 1)
#2 PiggyAuth.phar/src/PiggyAuth/Sessions/SessionManager(51): PiggyAuth\Sessions\PiggyAuthSession->startSession(pocketmine\event\TranslationContainer object)
#3 PiggyAuth.phar/src/PiggyAuth/Tasks/MySQLTask(65): PiggyAuth\Sessions\SessionManager->PiggyAuth\Sessions\{closure}(array Array(), Volatile object, PiggyAuth\Main object)
#4 src/pocketmine/scheduler/AsyncPool(158): PiggyAuth\Tasks\MySQLTask->onCompletion(pocketmine\Server object)
#5 src/pocketmine/scheduler/ServerScheduler(341): pocketmine\scheduler\AsyncPool->collectTasks()
#6 src/pocketmine/Server(2456): pocketmine\scheduler\ServerScheduler->mainThreadHeartbeat(integer 399)
#7 src/pocketmine/Server(2221): pocketmine\Server->tick()
#8 src/pocketmine/Server(2100): pocketmine\Server->tickProcessor()
#9 src/pocketmine/Server(1682): pocketmine\Server->start()
#10 src/pocketmine/PocketMine(511): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///home/fac/PocketMine-MP.phar/, string /home/fac/, string /home/fac/plugins/)
#11 /home/fac/PocketMine-MP.phar(1): require_once(string phar:///home/fac/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
PocketMine-MP version: 1.6.2dev #0 [Protocol 113; API 3.0.0-ALPHA7]
Git commit: 0000000000000000000000000000000000000000
uname -a: Linux optimusprime338 2.6.32-48-pve #1 SMP Fri Dec 23 10:22:54 CET 2016 x86_64
PHP Version: 7.0.3
Zend version: 3.0.0
OS : Linux, linux
Thanks for testing so quickly! :) Could you tell me when this crash happened? (Server start, player join ...). Also, is there a message about the error in the console?
when players join! after restart
@DaPigGuy I am sorry but one last request! can you fix email thing,, email thing work while registration in genesis but not in pmmp! why?
it(email) doesnt work in yml and mysql both and in genesis it works with both and in genesis it got no problems and it runs at it best with no errors!
DO NOT REMOVE THIS
Please make sure your issue complies with these guidelines:
General
Please fix this issue , this is has been crashing when ever I want to use PMMP version. I have tried to fix this but cant .. this error spammes when player try to join server and crashesh at some point console error:-
Server Software:
PMMP #### **Version of PiggyAuth:** latest #### **Data Provider:** MySQL - [x] MySQL - [ ] SQLite - [ ] YAML - [ ] JSON #### **Steps to Reproduce the Issue**1.
Extra Information