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

Server Crash at the end of the start countdown #10

Open
efor89 opened this issue Aug 21, 2021 · 11 comments
Open

Server Crash at the end of the start countdown #10

efor89 opened this issue Aug 21, 2021 · 11 comments

Comments

@efor89
Copy link

efor89 commented Aug 21, 2021

hi
if the start timer is 0 i have this server crash i hope you can help me plz

PocketMine-MP Crash Dump Sat Aug 21 06:30:50 BST 2021

Error: Undefined offset: 2
File: pmsrc/src/pocketmine/network/mcpe/NetworkBinaryStream
Line: 714
Type: ErrorException

Code:
[705] * TODO: implement this properly
[706] *
[707] * @param mixed[][] $rules
[708] * @phpstan-param array<string, array{0: int, 1: bool|int|float, 2: bool}> $rules
[709] */
[710] public function putGameRules(array $rules) : void{
[711] $this->putUnsignedVarInt(count($rules));
[712] foreach($rules as $name => $rule){
[713] $this->putString($name);
[714] ($this->buffer .= ($rule[2] ? "\x01" : "\x00"));
[715] $this->putUnsignedVarInt($rule[0]);
[716] switch($rule[0]){
[717] case GameRuleType::BOOL:
[718] ($this->buffer .= ($rule[1] ? "\x01" : "\x00"));
[719] break;
[720] case GameRuleType::INT:
[721] $this->putUnsignedVarInt($rule[1]);
[722] break;
[723] case GameRuleType::FLOAT:
[724] ($this->buffer .= (\pack("g", $rule[1])));

Backtrace:
#0 pmsrc/src/pocketmine/network/mcpe/NetworkBinaryStream(714): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string[19] Undefined offset: 2, string[129] phar://C:/Users/..../Desktop/PocketMine-MP-minigames-hub/PocketMine-MP.phar/sr, integer 714, array[3])
#1 pmsrc/src/pocketmine/network/mcpe/protocol/GameRulesChangedPacket(44): pocketmine\network\mcpe\NetworkBinaryStream->putGameRules(array[1])
#2 pmsrc/src/pocketmine/network/mcpe/protocol/DataPacket(127): pocketmine\network\mcpe\protocol\GameRulesChangedPacket->encodePayload()
#3 pmsrc/src/pocketmine/network/mcpe/protocol/BatchPacket(86): pocketmine\network\mcpe\protocol\DataPacket->encode()
#4 pmsrc/src/pocketmine/Server(1729): pocketmine\network\mcpe\protocol\BatchPacket->addPacket(object pocketmine\network\mcpe\protocol\GameRulesChangedPacket)
#5 pmsrc/src/pocketmine/level/Level(914): pocketmine\Server->batchPackets(array[1], array[1])
#6 pmsrc/src/pocketmine/level/Level(787): pocketmine\level\Level->actuallyDoTick(integer 1703)
#7 pmsrc/src/pocketmine/Server(2265): pocketmine\level\Level->doTick(integer 1703)
#8 pmsrc/src/pocketmine/Server(2396): pocketmine\Server->checkTickUpdates(integer 1703, double 1629523850.8137)
#9 pmsrc/src/pocketmine/Server(2152): pocketmine\Server->tick()
#10 pmsrc/src/pocketmine/Server(1992): pocketmine\Server->tickProcessor()
#11 pmsrc/src/pocketmine/Server(1586): pocketmine\Server->start()
#12 pmsrc/src/pocketmine/PocketMine(291): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[52] C:\Users.....\Desktop\PocketMine-MP-minigames-hub, string[60] C:\Users....\Desktop\PocketMine-MP-minigames-hub\plugins)
inxomnyaa#13 pmsrc/src/pocketmine/PocketMine(321): pocketmine\server()
#14 pmsrc(11): require(string[107] phar://C:/Users/..../Desktop/PocketMine-MP-minigames-hub/PocketMine-MP.phar/sr)

PocketMine-MP version: 3.22.0 [Protocol 448]
PHP Version: 7.4.14
Zend version: 3.4.0
OS : WINNT, win
Composer libraries:

  • adhocore/json-comment 1.1.2@fc2f76979f0a44a5f5bc2a2b600d0762fe0e78e7
  • daverandom/callback-validator unknown@unknown
  • pocketmine/binaryutils 0.1.13@0abee38d4e2861621f262c79a2a3d699d8a697f4
  • pocketmine/callback-validator 1.0.3@64787469766bcaa7e5885242e85c23c25e8c55a2
  • pocketmine/classloader 0.1.2@9757928424652393b178a3760073113aa7c9911b
  • pocketmine/log 0.2.1@830b44a2cf96ef703c550abe64302f230231ca49
  • pocketmine/log-pthreads 0.1.3@e477ecf6ec214fdd4415ea1da3fdd9d73bf699ea
  • pocketmine/math 0.2.6@43057cb8c179a9859677b496a788db922fd5cfc3
  • pocketmine/nbt 0.2.18@9f82ca4d7f97fcd9a566e44b63c4f18a7657ae82
  • pocketmine/pocketmine-mp 3.22.0@c32c21464c30cd7059a4cbfb0a7d7e493238a561
  • pocketmine/raklib 0.12.11@9cce458b8bfde3e4dfdbf70c659fc7b7fe26b5c4
  • pocketmine/snooze 0.1.5@70b5e7937a06878dd321a3182ceb76d56298f2cd
  • pocketmine/spl 0.4.2@6b08b7cf8c4afa17139c9a1b3bf1b408531de161

Loaded plugins:
BedWars_-_German_Edition 1.1.5 DE by XenialDan, TheNote for API(s) 3.19.0
BuilderTools 1.2.0-beta3 by CzechPMDevs, VixikCZ for API(s) 3.0.0
CityBuildCommands 1.0.0 by efor89 for API(s) 3.0.0
DEVirion 1.2.7 by poggit, SOFe for API(s) 3.0.0
EconomyAPI 5.7.3 by onebone for API(s) 3.0.0
FormAPI 1.3.0 by jojoe77777 for API(s) 3.2.0
InvCrashFix 0.0.1 by for API(s) 3.14.0
MultiWorld 1.6.0-beta2 by CzechPMDevs, VixikCZ, fuyutsuki, kaliiks for API(s) 3.0.0
PureChat 1.4.11 by 64FF00 for API(s) 3.0.0
PurePerms 1.4.3 by 64FF00 & ProjectInfinity for API(s) 3.0.0
WorldGuard 1.1.6-4 by Chalapa for API(s) 3.0.0
WorldProtect 2.3.8 by aliuly for API(s) 3.0.0

@note3crafter
Copy link
Owner

Hey right now I don't have time to worry about it ... I'll have a look at it sometime as soon as I have the time!

@efor89
Copy link
Author

efor89 commented Aug 22, 2021

Es müsste übrigens an der gameapi liegen von xenialdan

@efor89
Copy link
Author

efor89 commented Aug 22, 2021

dort gibs die isso schon aber er wird es nicht fixen

inxomnyaa/gameapi#15

@efor89
Copy link
Author

efor89 commented Aug 22, 2021

ich vermute das es hiermit was zu tun hat

$this->getLevel()->setTime($this->getSettings()->time);
if ($this->getSettings()->stopTime) {
$this->getLevel()->stopTime();
$pk = new GameRulesChangedPacket();
$gamerulelist = new GameRuleList();
$gamerulelist->setRule(new BoolGameRule(GameRuleList::DODAYLIGHTCYCLE, !$this->getSettings()->stopTime));
$pk->gameRules = $gamerulelist->getRules();
$this->getLevel()->broadcastGlobalPacket($pk);
} else {
$this->getLevel()->startTime();
$pk = new GameRulesChangedPacket();
$gamerulelist = new GameRuleList();
$gamerulelist->setRule(new BoolGameRule(GameRuleList::DODAYLIGHTCYCLE, !$this->getSettings()->stopTime));
$pk->gameRules = $gamerulelist->getRules();
$this->getLevel()->broadcastGlobalPacket($pk);
}

@efor89
Copy link
Author

efor89 commented Aug 22, 2021

ist aus der arena.php ab line 240 in der gameapi

@note3crafter
Copy link
Owner

hmm ich schau wenn ich zeit finde... kannste ein video machen mit dem Fehlerbild

@efor89
Copy link
Author

efor89 commented Aug 22, 2021

ok es lag dadran hab es gefixt

@efor89
Copy link
Author

efor89 commented Aug 22, 2021

ich hab es rausgenommen und mir ein alwaysday pl drauf gezogen

@efor89
Copy link
Author

efor89 commented Aug 22, 2021

aber leider kann ich dir nicht sagen was damit nicht stimmt

@supercrafter333
Copy link

Das mit den GameRules wurde in Protocol-Changes geändert. Einfach bisschen die Changes ansehen und dann ist es nicht mehr so schwer zu fixen :)

@note3crafter
Copy link
Owner

wenn ich nur die Zeit dafür hätte🙈

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

No branches or pull requests

3 participants