RevivalPMMP / PureEntitiesX

A Revival of the original PureEntities, a plugin which provides MobAI for PMMP - Coming back soon
GNU General Public License v3.0
166 stars 76 forks source link

Monsters crossing walls, sheeps flying around #252

Closed feikede closed 4 years ago

feikede commented 6 years ago

Required Information

PocketMine-MP Version: 1.7dev-318 Plugin Version: 0.2.8-3.alpha9 Where you got the plugin: Cloned from github

Optional Information

PHP version: PHP 7.2.0RC6 (cli) Other Installed Plugins: none OS Version: aarch64 linux.suse 4.4.92-18.36-default on Raspberry 3

Steps to reproduce the issue.

  1. Play the game, see monsters crossing walls and animals flying around. Also on sea.
  2. ...

If you can give me initial orientation (WalkingEntity ?), I could maybe provide a fix as pull request.

Thanks, regards, Rainer Feike

jasonw4331 commented 6 years ago

Wow, I thought we knew all the bugs. Flying sheep is a new one...

95CivicSi commented 6 years ago

Agreed. I'm looking into it.

Alderander commented 6 years ago

I also noticed cows, sheeps and horses blocked in the walls

ghost commented 6 years ago

Also while jumping, skeleton flies on slabs

Taraman17 commented 6 years ago

I also experience this bug. especially when hitting creatures, they are catapulted away as if gravity is very low and thereafter sink into the ground. From time to time I also get an exception running this plugin - I'll post it here, when I see it again.

Taraman17 commented 6 years ago

Here we go I'm not entirely sure that this error is in conjunction with this here, but the function getCollisionCubes seems to be fitting when animals cross solid blocks:

2018-01-03 [16:46:40] [Server thread/CRITICAL]: Welt "world" konnte nicht getickt werden: Call to a member function getCollisionCubes() on null
2018-01-03 [16:46:40] [Server thread/CRITICAL]: Error: "Call to a member function getCollisionCubes() on null" (EXCEPTION) in "src/pocketmine/entity/Entity" at line 1524
2018-01-03 [16:46:40] [Server thread/DEBUG]: #0 PureEntitiesX_0.2.8_dev3.phar/src/revivalpmmp/pureentities/entity/other/XPOrb(122): pocketmine\entity\Entity->move(double -0.021886352783992, double 0, double -0.11218142168659)
2018-01-03 [16:46:40] [Server thread/DEBUG]: #1 src/pocketmine/level/Level(751): revivalpmmp\pureentities\entity\other\XPOrb->onUpdate(integer 22425)
2018-01-03 [16:46:40] [Server thread/DEBUG]: #2 src/pocketmine/Server(2377): pocketmine\level\Level->doTick(integer 22425)
2018-01-03 [16:46:40] [Server thread/DEBUG]: #3 src/pocketmine/Server(2534): pocketmine\Server->checkTickUpdates(integer 22425, double 1514998000.4441)
2018-01-03 [16:46:40] [Server thread/DEBUG]: #4 src/pocketmine/Server(2274): pocketmine\Server->tick()
2018-01-03 [16:46:40] [Server thread/DEBUG]: #5 src/pocketmine/Server(2149): pocketmine\Server->tickProcessor()
2018-01-03 [16:46:40] [Server thread/DEBUG]: #6 src/pocketmine/Server(1737): pocketmine\Server->start()
2018-01-03 [16:46:40] [Server thread/DEBUG]: #7 src/pocketmine/PocketMine(554): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/minecraft/peServer/, string /home/minecraft/peServer/plugins/)
2018-01-03 [16:46:40] [Server thread/DEBUG]: #8 /home/minecraft/peServer/PocketMine-MP.phar(1): require(string phar:///home/minecraft/peServer/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
2018-01-03 [16:48:00] [Server thread/CRITICAL]: TypeError: "reset() expects parameter 1 to be array, null given" (EXCEPTION) in "src/pocketmine/entity/Entity" at line 789
2018-01-03 [16:48:00] [Server thread/DEBUG]: #0 src/pocketmine/entity/Entity(789): reset(NULL )
2018-01-03 [16:48:00] [Server thread/DEBUG]: #1 src/pocketmine/entity/Entity(795): pocketmine\entity\Entity->getSaveId()
2018-01-03 [16:48:00] [Server thread/DEBUG]: #2 src/pocketmine/level/format/io/region/Anvil(70): pocketmine\entity\Entity->saveNBT()
2018-01-03 [16:48:00] [Server thread/DEBUG]: #3 src/pocketmine/level/format/io/region/RegionLoader(184): pocketmine\level\format\io\region\Anvil->nbtSerialize(pocketmine\level\format\Chunk object)
2018-01-03 [16:48:00] [Server thread/DEBUG]: #4 src/pocketmine/level/format/io/region/McRegion(317): pocketmine\level\format\io\region\RegionLoader->writeChunk(pocketmine\level\format\Chunk object)
2018-01-03 [16:48:00] [Server thread/DEBUG]: #5 src/pocketmine/level/Level(1043): pocketmine\level\format\io\region\McRegion->saveChunk(integer 10, integer 6)
2018-01-03 [16:48:00] [Server thread/DEBUG]: #6 src/pocketmine/level/Level(1031): pocketmine\level\Level->saveChunks()
2018-01-03 [16:48:00] [Server thread/DEBUG]: #7 src/pocketmine/Server(2422): pocketmine\level\Level->save(boolean )
2018-01-03 [16:48:00] [Server thread/DEBUG]: #8 src/pocketmine/Server(2564): pocketmine\Server->doAutoSave()
2018-01-03 [16:48:00] [Server thread/DEBUG]: #9 src/pocketmine/Server(2274): pocketmine\Server->tick()
2018-01-03 [16:48:00] [Server thread/DEBUG]: #10 src/pocketmine/Server(2149): pocketmine\Server->tickProcessor()
2018-01-03 [16:48:00] [Server thread/DEBUG]: #11 src/pocketmine/Server(1737): pocketmine\Server->start()
2018-01-03 [16:48:00] [Server thread/DEBUG]: #12 src/pocketmine/PocketMine(554): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/minecraft/peServer/, string /home/minecraft/peServer/plugins/)
2018-01-03 [16:48:00] [Server thread/DEBUG]: #13 /home/minecraft/peServer/PocketMine-MP.phar(1): require(string phar:///home/minecraft/peServer/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
2018-01-03 [16:48:00] [Server thread/EMERGENCY]: Ein nicht-behebbarer Fehler ist aufgetreten und der Server stürzte ab. Erstelle einen Crash-Dump...
2018-01-03 [16:48:00] [Server thread/EMERGENCY]: Bitte lade die "/home/minecraft/peServer/crashdumps/Wed_Jan_3-16.48.00-UTC_2018.log" Datei in das Crash-Archiv hoch und reiche den Link auf der Bug-Reporting Seite ein. Gib so viele Informationen wie möglich.
2018-01-03 [16:48:00] [Server thread/INFO]: Deaktiviere PureEntitiesX v0.2.8-3.alpha10
2018-01-03 [16:48:00] [Server thread/NOTICE]: [PureEntitiesX] Disabled!
Taraman17 commented 6 years ago

And finally the corresponding crash-log: https://crash.pmmp.io/view/8928

95CivicSi commented 6 years ago

Thanks for the error info @Taraman. The error you posted has something to do with XP orbs and isn't directly related.

sbyholm commented 6 years ago

We also had monsters flying around and walking inside hills etc, we were three players at the time and we had two copies of the plugin in the plugin folder, i.e. I had made a copy of the phar file by mistake. Have not been able to reproduce though, have not had other players here for a while.

Taraman17 commented 6 years ago

Tested with the latest release and corresponding PocketMine Version - still same beaviour. It looked like it may be a performance related bug though. I run the server on a raspi. After starting it, everything seems to be ok, but after a while, the mobs start lagging and then the block crossing starts.

sbyholm commented 6 years ago

+1 for a performance related bug, we run three players on a QNAP and it happens from time to time that animals fly around, hitting a cow it may catapult up into the air, and animals may go into the ground. Another thing that seems related is that the game time sometimes gets broken, like sun starts to rise, then it jumps back to night and the sun starts to rise again in a cycle that is sometimes just two minutes long. Problem seems to go away if all players log out and log in again.

feikede commented 6 years ago

I don't think it's CPU performance related, I get that on an Intel I7 5500U with just two players. But maybe it's related to network latency (or maybe both, but more on the network side).

sbyholm commented 6 years ago

As for network we run it with iPad clients on a local Wifi network, with the server on the QNAP wired to the wifi router, have not measured latency though.

95CivicSi commented 6 years ago

Performance is a confirmed problem that contributes to this issue. While your CPU performance may not be maxed while this is happening, the Main thread of PMMP is getting lagged because of how long it takes to cycle through large numbers of entities. When that happens, this issue becomes very prominent. Resolution for this is going to require major changes to how entityBaseTick works and updateMove. These changes are coming.

ZandercraftGames commented 5 years ago

Yeah... This is getting annoying because animals are climbing walls and suffocating in them. XD

ZandercraftGames commented 5 years ago

Funny to watch, but annoying.

95CivicSi commented 5 years ago

This appears to be linked to this: https://github.com/pmmp/PocketMine-MP/issues/1215

dktapps commented 5 years ago

@95CivicSi I doubt it. The referenced issue is specifically targeted at player movements. It doesn't affect general entity movement.

95CivicSi commented 4 years ago

While performance in general, directly causes some of this to happen, the majority of it appears to have been fixed in https://github.com/RevivalPMMP/PureEntitiesX/commit/f85a659901564620b88ac0db0b59f2537a210f38