CortexPE / TeaSpoon

☕ A PLUGIN to Extend PMMP's Functionality without completely changing it.
GNU Affero General Public License v3.0
144 stars 100 forks source link

"Division by zero" (EXCEPTION) in "TeaSpoon_dev-144.phar/src/CortexPE/entity/object/Lightning" at line 85 #200

Closed teracube closed 6 years ago

teracube commented 6 years ago

Issue Description

A short description about the issue "Division by zero" (EXCEPTION) in "TeaSpoon_dev-144.phar/src/CortexPE/entity/object/Lightning" at line 85

Steps to Reproduce

  1. ...running PocketMine-MP version 1.7dev-711� "[REDACTED]" (API 3.0.0-ALPHA11)
  2. ...running TeaSpoon dev-144
  3. ...

sorry i don't know how reproduce this issue

Crashdump, Backtrace or Other Files

2018-02-14 [07:47:32] [Server thread/CRITICAL]: ErrorException: "Division by zero" (EXCEPTION) in "TeaSpoon_dev-144.phar/src/CortexPE/entity/object/Lightning" at line 85
2018-02-14 [07:47:32] [Server thread/DEBUG]: #0 TeaSpoon_dev-144.phar/src/CortexPE/entity/object/Lightning(85): pocketmine\error_handler(integer 2, string Division by zero, string phar:///home/gsp_1485/g3.hmserv.eu-19144/plugins/TeaSpoon_dev-144.phar/src/CortexPE/entity/object/Lightning.php, integer 85, array Array())
2018-02-14 [07:47:32] [Server thread/DEBUG]: #1 src/pocketmine/level/Level(775): CortexPE\entity\object\Lightning->onUpdate(integer 2050988)
2018-02-14 [07:47:32] [Server thread/DEBUG]: #2 src/pocketmine/Server(2389): pocketmine\level\Level->doTick(integer 2050988)
2018-02-14 [07:47:32] [Server thread/DEBUG]: #3 src/pocketmine/Server(2546): pocketmine\Server->checkTickUpdates(integer 2050988, double 1518590852.5858)
2018-02-14 [07:47:32] [Server thread/DEBUG]: #4 src/pocketmine/Server(2285): pocketmine\Server->tick()
2018-02-14 [07:47:32] [Server thread/DEBUG]: #5 src/pocketmine/Server(2158): pocketmine\Server->tickProcessor()
2018-02-14 [07:47:32] [Server thread/DEBUG]: #6 src/pocketmine/Server(1744): pocketmine\Server->start()
2018-02-14 [07:47:32] [Server thread/DEBUG]: #7 src/pocketmine/PocketMine(385): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/gsp_1485/g3.hmserv.eu-19144/, string /home/gsp_1485/g3.hmserv.eu-19144/plugins/)
2018-02-14 [07:47:32] [Server thread/DEBUG]: #8 /home/gsp_1485/g3.hmserv.eu-19144/PocketMine-MP.phar(1): require(string phar:///home/gsp_1485/g3.hmserv.eu-19144/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
2018-02-14 [07:47:32] [Server thread/CRITICAL]: Could not tick level "faction": Division by zero
2018-02-14 [07:47:32] [Server thread/CRITICAL]: ErrorException: "Division by zero" (EXCEPTION) in "TeaSpoon_dev-144.phar/src/CortexPE/entity/object/Lightning" at line 85
2018-02-14 [07:47:32] [Server thread/DEBUG]: #0 TeaSpoon_dev-144.phar/src/CortexPE/entity/object/Lightning(85): pocketmine\error_handler(integer 2, string Division by zero, string phar:///home/gsp_1485/g3.hmserv.eu-19144/plugins/TeaSpoon_dev-144.phar/src/CortexPE/entity/object/Lightning.php, integer 85, array Array())
2018-02-14 [07:47:32] [Server thread/DEBUG]: #1 src/pocketmine/level/Level(775): CortexPE\entity\object\Lightning->onUpdate(integer 2050989)
2018-02-14 [07:47:32] [Server thread/DEBUG]: #2 src/pocketmine/Server(2389): pocketmine\level\Level->doTick(integer 2050989)
2018-02-14 [07:47:32] [Server thread/DEBUG]: #3 src/pocketmine/Server(2546): pocketmine\Server->checkTickUpdates(integer 2050989, double 1518590852.6952)
2018-02-14 [07:47:32] [Server thread/DEBUG]: #4 src/pocketmine/Server(2285): pocketmine\Server->tick()
2018-02-14 [07:47:32] [Server thread/DEBUG]: #5 src/pocketmine/Server(2158): pocketmine\Server->tickProcessor()
2018-02-14 [07:47:32] [Server thread/DEBUG]: #6 src/pocketmine/Server(1744): pocketmine\Server->start()
2018-02-14 [07:47:32] [Server thread/DEBUG]: #7 src/pocketmine/PocketMine(385): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/gsp_1485/g3.hmserv.eu-19144/, string /home/gsp_1485/g3.hmserv.eu-19144/plugins/)
2018-02-14 [07:47:32] [Server thread/DEBUG]: #8 /home/gsp_1485/g3.hmserv.eu-19144/PocketMine-MP.phar(1): require(string phar:///home/gsp_1485/g3.hmserv.eu-19144/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Paste your crashdump here (if theres any)

<!-- Privacy concerns about the TeaSpoonDumps? You can check out the code for yourself ;) As it doesn't collect any sensitive information other than in-depth server information -->
```text
# Paste the contents of your TeaSpoonDump here ( by running /bugreport ) [can be found at <TeaSpoon Plugin Folder>/dumps/<time>]
CortexPE commented 6 years ago

Well that was weird... You'd have to be sooooo accurate to determine when and precisely where a lightning will strike...

I'll add a quick fix for this when I have time...