eldoriarpg / BigDoorOpener

Control the state of doors created by BigDoors by time and by approaching, permissions and more.
GNU Affero General Public License v3.0
5 stars 4 forks source link

Rotation direction WARN #11

Closed SlimeDog closed 4 years ago

SlimeDog commented 4 years ago

Spigot 1.16.1 BigDoors Alpha 0.1.8.20 BigDoorsOpener 1.2a-BETA

On server startup [QUOTE][16:55:54] [Server thread/INFO]: [BigDoorsOpener] Locale messages_de_DE.properties is up to date. [16:55:54] [Server thread/INFO]: [BigDoorsOpener] Locale messages_en_US.properties is up to date. [16:55:54] [Server thread/INFO]: [BigDoorsOpener] Metrics enabled. Thank you very much! [16:55:56] [Server thread/WARN]: [BigDoors] Rotation direction is null for door Dragonstone-portal-door-S (8)! [16:55:56] [Server thread/WARN]: [BigDoors] Rotation direction is null for door Dragonstone-portal-door-N (9)![/QUOTE] Four other doors, similarly configured in the same world, produce no warnings. The WARN messages occur only with BigDoorsOpener installed.

BigDoorsOpener/config.yml (relevant bits):

- ==: de.eldoria.bigdoorsopener.config.TimedDoor
  doorUID: '8'
  world: world_westeros
  position:
    ==: Vector
    x: 2510.0
    y: 76.5
    z: 2848.0
  permission: ''
  ticksClose: 13000
  ticksOpen: 1000
  range: 0.0
  invertOpen: false
- ==: de.eldoria.bigdoorsopener.config.TimedDoor
  doorUID: '9'
  world: world_westeros
  position:
    ==: Vector
    x: 2510.0
    y: 76.5
    z: 2851.5
  permission: ''
  ticksClose: 13000
  ticksOpen: 1000
  range: 0.0
  invertOpen: false
rainbowdashlabs commented 4 years ago

I have 4 questions regarding this:

  1. Can you confirm that these two doors have no explicit rotation defined? I think they will have one.
  2. Does the door still work and is opened by door opener correctly?
  3. Does this warning also occur when you perform a reload bdo reload?
  4. Which door type is the door of.
SlimeDog commented 4 years ago
  1. Door definition in BigDoors database:

    id          name                       world                                 isOpen      xMin        yMin        zMin        xMax        yMax        zMax        engineX     engineY     engineZ     isLocked    type        engineSide  powerBlockX  powerBlockY  powerBlockZ  openDirection  autoClose   chunkHash      blocksToMove
    ----------  -------------------------  ------------------------------------  ----------  ----------  ----------  ----------  ----------  ----------  ----------  ----------  ----------  ----------  ----------  ----------  ----------  -----------  -----------  -----------  -------------  ----------  -------------  ------------
    8           Dragonstone-portal-door-S  34354cdd-46f9-48de-bc3b-f0b32a62109b  0           2510        71          2847        2510        82          2849        2510        71          2847        0           0           -1          2510         70           2847         2              -1          -144432451324  0           
    9           Dragonstone-portal-door-N  34354cdd-46f9-48de-bc3b-f0b32a62109b  0           2510        71          2850        2510        82          2853        2510        71          2853        0           0           -1          2510         70           2853         1              -1          -144432443132  0           

    I think that openDirection indicates rotation. The other four "doors" -- which do not display the same WARN -- are portcullis, and have openDirection=3 or openDirection=4.

  2. No. The doors started life closed. BDO opened the doors at tick=1000. Afterwards, BigDoors cannot operate the doors -- by command -- because it believes the door is closed after BDO has opened it. BDO did not close the doors at tick=13000.

  3. Yes, same WARN on /bdo reload

  4. Type 0 = door.

rainbowdashlabs commented 4 years ago

Mhmm thats weird. Yes you're right. The open direction 1 and 2 are clock and counter clockwise. 3 and 4 up and down. This seems so far pretty right.

Whats exactly happening is that Big Doors tries to determine the rotation direction based on the engine and the boundaries of the door. This somehow fails. I don't know why, because it should return a value. So I'm a bit confused here.

Also bdo does nothing else, then executing the toggleDoor command. Can you still toggle the door with e.g. /toggledoor 8 when bdo does not close the door. If not: do you get an error or nothing?

This sounds familiar to a bug I encountered after a server crash. But I cant toggle some doors anymore even with bdo disabled.

SlimeDog commented 4 years ago

Can you still toggle the door with e.g. /toggledoor 8 when bdo does not close the door. If not: do you get an error or nothing?

No, the door cannot be toggled. As above, the door is visibly open, but BigDoors thinks it is closed. Results of GUI info (consistent with database dump above):

8: Dragonstone-portal-door-S, Min(2510;71;2847), Max(2510;82;2849), Engine(2510;71;2847), 
 NOT locked; Type=DOOR, PowerBlockPos = (2510;70;2847) = (-144432451324). It is CLOSED.
 OpenDir = COUNTERCLOCKWISE, Looking SOUTH. It does not auto close.

When I try /toggledoor 8 I get In-game

<red>The door cannot open as it is obstructed</red>

At console

[BigDoors] Rotation direction is null for door Dragonstone-portal-door-S (8)!
PimvanderLoos commented 4 years ago

It sounds like the BigDoors database and your world somehow got out of sync. If you were to run /shadowtoggledoor 8 and /shadowtoggledoor 9 the doors might be fixed again. This isn't really a solution to the problem, but it has a good chance of fixing its effects.

This command executes a door-toggle in just the database, so it won't check for blocks that might be in the way and it won't affect the world. It doesn't always have the same data to rely on as a regular toggle, so it might not always have the desired effect.

Regarding the issue of why it happened in the first place, it'll be a bit harder to track down. It's most likely a BigDoors bug, though. There was an issue last year where toggling it multiple times per second had a small chance of causing the world and the database to go out of sync. Oddly enough, the probability of it happening got higher the closer you were to 15TPS (both higher and lower than that drastically improved reliability).

SlimeDog commented 4 years ago

If you were to run /shadowtoggledoor 8 and /shadowtoggledoor 9 the doors might be fixed again.

No. The doors are still visible/database out-of-sync.

Until this is resolved, I cannot use BDO for timed door actions (they work fine on portcullis objects). Note that my configuration sets range-activation off (in case that is a contributing factor).

rainbowdashlabs commented 4 years ago

The range shouldn't be a problem here.

I assume that the problem with the door still persists when you remove BDO from your server.

Anyway the upcoming 1.3 will be a nearly complete rewrite of the system and will be more consistent in calls to doors. So if this is caused by too many calls from BDO which I am currently not sure about, the new version will probably fix this.

SlimeDog commented 4 years ago

As a side note, at some point the database became corrupted, and one of the doors was "off". I was able to fix the physical blocks and the database, and all is well. But that was most disturbing.

I suspect shadowtoggle, but I do not want to break everything again to verify.

rainbowdashlabs commented 4 years ago

The Bug should be fixed with the new BD Version 0.1.8.21. I will leave this open until BDO 1.3 which will also add a mechanic to avoid this behavior.

SlimeDog commented 4 years ago

Confirmed fixed in BD 0.1.8.21-b524. Doors now open and close on the timers. Thanks.