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 - Binary::WriteLFloat() error #990

Closed
kabluinc opened this issue Jun 3, 2017 · 2 comments
Closed

Server crash - Binary::WriteLFloat() error #990

kabluinc opened this issue Jun 3, 2017 · 2 comments
Labels
Category: Core Related to internal functionality Resolution: Fixed

Comments

@kabluinc
Copy link

kabluinc commented Jun 3, 2017

Issue description

Server is continuously crashing when a player joins. Crash dump below. Sorry if this has already been asked however I have tried with latest commit 902957c

Steps to reproduce the issue

Run server, player joins.

OS and versions

  • PocketMine-MP: 1.6.2 dev 902957c
  • PHP: 7.0.14
  • Server OS: Windows 10
  • Game version: PE 1.1.0.55

Crashdump, backtrace or other files

`
PocketMine-MP Crash Dump Sat Jun 3 18:31:01 BST 2017

Error: Argument 1 passed to pocketmine\utils\Binary::writeLFloat() must be of the type float, null given, called in phar://E:/UserFiles/LIAMG/GameServers/TC03428615845884033855301/PocketMine-MP.phar/src/pocketmine/utils/BinaryStream.php on line 160
File: /src/pocketmine/utils/Binary
Line: 320
Type: notice

Code:
[311] return round(self::readLFloat($str), $accuracy);
[312] }
[313]
[314] /**
[315] * Writes a 4-byte little-endian floating-point number.
[316] *
[317] * @param float $value
[318] * @return string
[319] /
[320] public static function writeLFloat(float $value) : string{
[321] return ENDIANNESS === self::BIG_ENDIAN ? strrev(pack("f", $value)) : pack("f", $value);
[322] }
[323]
[324] /
*
[325] * Returns a printable floating-point number.
[326] *
[327] * @param float $value
[328] * @return string
[329] */
[330] public static function printFloat(float $value){

Backtrace:
#0 /src/pocketmine/utils/BinaryStream(160): pocketmine\utils\Binary::writeLFloat(NULL )
#1 /src/pocketmine/network/mcpe/protocol/DataPacket(354): pocketmine\utils\BinaryStream->putLFloat(NULL )
#2 /src/pocketmine/network/mcpe/protocol/AddEntityPacket(72): pocketmine\network\mcpe\protocol\DataPacket->putVector3f(NULL , NULL , NULL )
#3 /src/pocketmine/network/mcpe/RakLibInterface(193): pocketmine\network\mcpe\protocol\AddEntityPacket->encode(boolean)
#4 /src/pocketmine/Player(1081): pocketmine\network\mcpe\RakLibInterface->putPacket(pocketmine\Player Player(1), pocketmine\network\mcpe\protocol\AddEntityPacket object, boolean , boolean )
#5 /Slapper-master/src/slapper/entities/SlapperEntity(84): pocketmine\Player->dataPacket(pocketmine\network\mcpe\protocol\AddEntityPacket object)
#6 /src/pocketmine/Player(820): slapper\entities\SlapperEntity->spawnTo(pocketmine\Player Player(1))
#7 /src/pocketmine/level/Level(2378): pocketmine\Player->sendChunk(integer -5, integer 7, pocketmine\network\mcpe\protocol\BatchPacket object)
#8 /src/pocketmine/level/Level(2419): pocketmine\level\Level->sendChunkFromCache(integer -5, integer 7)
#9 /src/pocketmine/level/format/io/ChunkRequestTask(88): pocketmine\level\Level->chunkRequestCallback(integer -5, integer 7, pocketmine\network\mcpe\protocol\BatchPacket object)
#10 /src/pocketmine/scheduler/AsyncPool(158): pocketmine\level\format\io\ChunkRequestTask->onCompletion(pocketmine\Server object)
#11 /src/pocketmine/scheduler/ServerScheduler(339): pocketmine\scheduler\AsyncPool->collectTasks(boolean)
#12 /src/pocketmine/Server(2414): pocketmine\scheduler\ServerScheduler->mainThreadHeartbeat(integer 852)
#13 /src/pocketmine/Server(2182): pocketmine\Server->tick(boolean)
#14 /src/pocketmine/Server(2064): pocketmine\Server->tickProcessor(boolean)
#15 /src/pocketmine/Server(1646): pocketmine\Server->start(boolean)
#16 /src/pocketmine/PocketMine(501): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar://E:\UserFiles\LIAMG\GameServers\TC03428615845884033855301\PocketMine-MP.phar/, string E:\UserFiles\LIAMG\GameServers\TC03428615845884033855301, string E:\UserFiles\LIAMG\GameServers\TC03428615845884033855301\plugins)
#17 (1): require_once(string phar://E:/UserFiles/LIAMG/GameServers/TC03428615845884033855301/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

PocketMine-MP version: 1.6.2dev #0 [Protocol 113; API 3.0.0-ALPHA5]
Git commit: 0000000000000000000000000000000000000000
uname -a: Windows NT NS306121 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
PHP Version: 7.0.10
Zend version: 3.0.0
OS : WINNT, win`

@dktapps
Copy link
Member

dktapps commented Jun 3, 2017

This is a Slapper issue. Are you using the latest version of Slapper?

@kabluinc
Copy link
Author

kabluinc commented Jun 3, 2017

Using latest commit on master branch. jojoe77777/Slapper@e1ab06b

@dktapps dktapps closed this as completed in 5baf59c Jun 3, 2017
@dktapps dktapps added Category: Core Related to internal functionality Resolution: Fixed labels Jun 3, 2017
inxomnyaa pushed a commit to ClearSkyTeam/PocketMine-MP that referenced this issue Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core Related to internal functionality Resolution: Fixed
Projects
None yet
Development

No branches or pull requests

2 participants