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

Channel tries to call null function #200

Open
SOF3 opened this issue May 1, 2023 · 3 comments · Fixed by #201
Open

Channel tries to call null function #200

SOF3 opened this issue May 1, 2023 · 3 comments · Fixed by #201
Labels
bug Something isn't working

Comments

@SOF3
Copy link
Owner

SOF3 commented May 1, 2023

Error: "Value of type null is not callable" (EXCEPTION) in "/home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_aeb2c40fe5790109/SOFe/AwaitGenerator/Channel" at line 52
  #0 (): libs\_aeb2c40fe5790109\SOFe\AwaitGenerator\Channel->sendAndWait(object pocketmine\event\player\PlayerMoveEvent#128506)
  #1 /home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_aeb2c40fe5790109/SOFe/AwaitGenerator/Await(332): Generator->rewind()
  #2 /home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_aeb2c40fe5790109/SOFe/AwaitGenerator/Await(129): libs\_aeb2c40fe5790109\SOFe\AwaitGenerator\Await->wakeup(array[2])
  #3 /home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_aeb2c40fe5790109/SOFe/AwaitGenerator/Channel(85): libs\_aeb2c40fe5790109\SOFe\AwaitGenerator\Await::g2c(object Generator#128426)
  #4 /home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_aeb2c40fe5790109/SOFe/WebConsole/Lib/Util(36): libs\_aeb2c40fe5790109\SOFe\AwaitGenerator\Channel->sendWithoutWait(object pocketmine\event\player\PlayerMoveEvent#128506)
  #5 pmsrc/src/event/RegisteredListener(60): libs\_aeb2c40fe5790109\SOFe\WebConsole\Lib\Util::libs\_aeb2c40fe5790109\SOFe\WebConsole\Lib\{closure}(object pocketmine\event\player\PlayerMoveEvent#128506)
  #6 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\player\PlayerMoveEvent#128506)
  #7 pmsrc/src/player/Player(1277): pocketmine\event\Event->call()
  #8 pmsrc/src/player/Player(1368): pocketmine\player\Player->processMostRecentMovements()
  #9 pmsrc/src/world/World(976): pocketmine\player\Player->onUpdate(int 130)
  #10 pmsrc/src/world/World(902): pocketmine\world\World->actuallyDoTick(int 130)
  #11 pmsrc/src/world/WorldManager(350): pocketmine\world\World->doTick(int 130)
  #12 pmsrc/src/Server(1815): pocketmine\world\WorldManager->tick(int 130)
  #13 pmsrc/src/Server(1697): pocketmine\Server->tick()
  #14 pmsrc/src/Server(1056): pocketmine\Server->tickProcessor()
  #15 pmsrc/src/PocketMine(339): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#5, string[41] /home/sofe/proj/WebConsole/local/install/, string[49] /home/sofe/proj/WebConsole/local/install/plugins/)
  #16 pmsrc/src/PocketMine(362): pocketmine\server()
  #17 pmsrc(11): require(string[85] phar:///home/sofe/proj/WebConsole/local/install/PocketMine-MP.phar/src/PocketMin)
@SOF3 SOF3 added the bug Something isn't working label May 1, 2023
@SOF3
Copy link
Owner Author

SOF3 commented May 1, 2023

Caused by unset not resetting the type of $this->state to EmptyChannelState.

@SOF3 SOF3 closed this as completed in #201 May 1, 2023
SOF3 added a commit that referenced this issue May 1, 2023
fix(channel): reset state to EmptyChannelState after unsetting
@SOF3
Copy link
Owner Author

SOF3 commented May 1, 2023

Still reproduced in 3.5.2

@SOF3 SOF3 reopened this May 1, 2023
@SOF3
Copy link
Owner Author

SOF3 commented May 1, 2023

initial debugging seems to suggest that this was caused by a race condition when interrupt/receive happens recursively on the same traverser.

#0 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Traverser.php(113): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\InterruptException::get()
#1 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/WatchHandler.php(515): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Traverser->interrupt()
#2 [internal function]: SOFe\WebConsole\Internal\WatchHandler->watchObjectField(Object(SOFe\WebConsole\Api\FieldDef), Object(libs\_d70aac9e1f8b3404\SOFe\WebConsole\Lib\StreamingObject), Object(libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Loading), Object(libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Traverser))
#3 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(410): Generator->send(Array)
#4 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(332): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await->libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\{closure}()
#5 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(129): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await->wakeup(Object(Closure))
#6 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/WatchHandler.php(456): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await::g2c(Object(Generator))
#7 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/WatchHandler.php(404): SOFe\WebConsole\Internal\WatchHandler->handleAddEvent(Object(libs\_d70aac9e1f8b3404\SOFe\WebConsole\Lib\StreamingObject), '000000000000000...')
#8 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/Handler.php(189): SOFe\WebConsole\Internal\WatchHandler->watchObjects()
#9 [internal function]: SOFe\WebConsole\Internal\Handler->SOFe\WebConsole\Internal\{closure}()
#10 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(458): Generator->send(Array)
#11 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(332): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await->libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\{closure}()
#12 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(129): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await->wakeup(Object(Closure))
#13 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(102): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await::g2c(Object(Generator), NULL, Array)
#14 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/Handler.php(196): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await::f2c(Object(Closure))
#15 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/Handler.php(100): SOFe\WebConsole\Internal\Handler->watchList(Object(SOFe\WebConsole\Api\ObjectDef), Object(Closure), NULL)
#16 [internal function]: SOFe\WebConsole\Internal\Handler->SOFe\WebConsole\Internal\{closure}()
#17 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Traverser.php(68): Generator->valid()
#18 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/HttpClient.php(212): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Traverser->next(NULL)
#19 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/HttpClient.php(161): SOFe\WebConsole\Internal\HttpClient->run(Object(Closure))
#20 [internal function]: SOFe\WebConsole\Internal\HttpClient->SOFe\WebConsole\Internal\{closure}()
#21 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(553): Generator->send('GET /main/log-m...')
#22 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(332): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await->libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\{closure}()
#23 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(317): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await->wakeup(Object(Closure))
#24 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/Await.php(554): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await->wakeupFlat(Object(Closure))
#25 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/libs/_d70aac9e1f8b3404/SOFe/AwaitGenerator/AwaitChild.php(52): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\Await->recheckPromiseQueue(Object(libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\AwaitChild))
#26 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/HttpClient.php(269): libs\_d70aac9e1f8b3404\SOFe\AwaitGenerator\AwaitChild->resolve('GET /main/log-m...')
#27 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/HttpClient.php(277): SOFe\WebConsole\Internal\HttpClient->SOFe\WebConsole\Internal\{closure}()
#28 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/HttpServer.php(108): SOFe\WebConsole\Internal\HttpClient->tick()
#29 phar:///home/sofe/proj/WebConsole/local/WebConsole.phar/src/SOFe/WebConsole/Internal/Main.php(50): SOFe\WebConsole\Internal\HttpServer->tick()
#30 phar:///home/sofe/proj/WebConsole/local/install/PocketMine-MP.phar/src/scheduler/ClosureTask.php(57): SOFe\WebConsole\Internal\Main->SOFe\WebConsole\Internal\{closure}()```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant