Pocketmine-mp: Written_Book created with NBT tags crashes client

Created on 9 Jul 2018  路  5Comments  路  Source: pmmp/PocketMine-MP

Issue description

Creating a written book in NBT with /give, then having a player attempt to open said book, will crash the client.

example - /give usernamehere written_book 1 {title:"Book Title",author:"Author Name",pages:["Page 1"]}

  • Expected result: Open the book, see the pages and text.
  • Actual result: Client crashed.

Steps to reproduce the issue

  1. run the command provided in the issue description.
  2. Open the book.

OS and versions

  • Server Versions: PocketMine-MP 3.0.5 for Minecraft: PE v1.4.0 (protocol version 261)
    PocketMine-MP 4.0.0+dev.1236 for Minecraft: PE v1.4.0 (protocol version 261)
  • PHP: 7.2.5
  • Server OS: Windows Server Datacenter, version 1803 build 17134
  • Game version: PE/Win10 (this bug applies to both - aren't they technically the same now anyway???)

Plugins

  • Tested on a clean server without plugins. Check.

Crashdump, backtrace or other files

The feedback to the server is simply - userhere -- logged out due to timeout

Invalid

Most helpful comment

Java version server allows the same command to be used without issue. Book doesn't crash the client though.

Go ahead, shoot yourself in the foot, apparently.

All 5 comments

You've structured the NBT incorrectly. See https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/item/WritableBook.php#L114 for an example.

Got it.

Shouldn't the server check the structure to prevent these crashes in the future?

Java version server allows the same command to be used without issue. Book doesn't crash the client though.

Go ahead, shoot yourself in the foot, apparently.

There's no end of special cases that will crash the client. I have no more intention of taping over this one than any other. This is Mojang's issue to fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dktapps picture dktapps  路  3Comments

MisteFr picture MisteFr  路  3Comments

XDqrkneZ picture XDqrkneZ  路  3Comments

sergeysova picture sergeysova  路  3Comments

Hugheth picture Hugheth  路  3Comments