Depenizen icon indicating copy to clipboard operation
Depenizen copied to clipboard

Tag Parser time out

Open DNx5 opened this issue 8 years ago • 6 comments

When using Depenizen extension tags inside world script events, it never get filled and resulting in server crash when its too long waiting. example:

TestScript:
  type: world
  events:
    on test command:
    - narrate <player.is_afk>
    - determine fulfilled

Environment: Server: Paper version git-Paper-1452 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT) Denizen: version: 1.0.2-SNAPSHOT (build 383), core version: 1.15 (Build 148) Depenizen: version: 1.0.0 (build 408)

DNx5 avatar Jul 03 '18 22:07 DNx5

@mcmonkey4eva I think it's highly unlikely this is Depenizen's fault?

Morphan1 avatar Jul 04 '18 05:07 Morphan1

Adjusted my test environment to match yours as closely as possible: Citizens current build Denizen build 383 Depenizen build 408 Essentials 2.15.0.16

Paper build 1482

Default Denizen config

Input your exact script, typed /test a few times in a row. Typed it from the server as well. Everything worked as expected (In-game narrated "false" a few times, server gave missing player errors)


Cannot replicate issue.

If you can gather a proper debug log of the error and any other relevant details, while on an up-to-date clean server (running Spigot (not Paper!) latest, Denizen latest dev, Depenizen latest), please do post all info on the Denizen issues page (Not Depenizen!).

mcmonkey4eva avatar Jul 04 '18 11:07 mcmonkey4eva

So I managed to reproduce it with minimal setup, here is the debug log http://old.mcmonkey.org/paste/48538 it seems like only happen when both of Quests and Vault enabled config.yml

# Whether debug information about Denizen should appear in the
# server console
Debug:
  Show: false
  Ex command help: true
  # Adjust to your console width minus 16. Ideally, we'd calculate this, but we currently can't.
  Console width: 64
  Trim length: 512
  # Whether to permit the "server.redirect_logging" mechanism
  Allow console redirection: false
  # Whether to send basic statistic information to the Denizen central server.
  # This is purely to maintain basic information on things like how many servers run any given version of Denizen.
  # Please do not disable this unless it is throwing errors (Please report any errors you receive as well).
  Stats: true
  # Whether to force the help command to be the default bukkit help.
  Override help: true

Scripts:
  World:
    Events:
      On player chats:
        # Whether to use the dangerous 'async' chat event (not recommended!)
        Use asynchronous event: false
      On time changes:
        Frequency of check: 250t
  Queue speed: 0.5s
  Scripts location:
    Use default script folder: true
    Alternative folder path: 'plugins/Denizen'

# The default options for new Denizen NPCs

# Whether to spawn NPCs with given traits, and what settings to have by default
Traits:
  Health:
    Enabled: false
    Respawn:
      Enabled: false
      Delay: 10s
    Animated death:
      Enabled: false

# Whether triggers are on by default, and their individual settings
Triggers:
  Chat:
    Enabled: true
    Use asynchronous event: true
    Cooldown: 2s
    Range: 3
    Overhearing range: 4
    Prerequisites:
      Must be looking in direction of NPC: true
      Must be able to see NPC: true
    Formats:
      Player to NPC: "You -> <npc.name.nickname>: <text>"
      Player to NPC overheard: "<player.name> -> <npc.name.nickname>: <text>"
    Appears globally:
      If triggers missing: true
      If triggers failed: false
      If NPC uninteractable: true
  Click:
    Enabled: true
    Cooldown: 2s
    Allows left click: false
  Damage:
    Enabled: false
    Cooldown: 0.5s
  Proximity:
    Enabled: false
    Cooldown: 1s
    Range: 10

Commands:
  Engage:
    # the default timeout for engage, if not specifically set otherwise
    Timeout: 150s
  While:
    # how many times the WHILE command can loop before it gives up
    # Set to 0 for infinite
    Max loops: 10000
  Chat:
    # settings for the Chat command, these override Citizens2 settings
    Options:
      Multiple targets format: "%target%, %target%, %target%, and others"
      # set to -1 to disable bystanders overhearing, or 0 for all players on the server to hear
      Range for bystanders: 5.0
    Formats:
      No target: "<def[talker].name><&8>:<&f> <def[message]>"
      To target: "<def[talker].name> <&8>-><&7> You<&8>:<&f> <def[message]>"
      With target to bystanders: "<def[talker].name> <&8>-><&7> <def[target].name><&8>:<&f> <def[message]>"
      With targets to bystanders: "<def[talker].name> <&8>-> [<&7><def[targets]><&8>]:<&f> <def[message]>"
  Delete:
        # Whether scripts are allowed to delete files from your server
        # This is mostly to clean up saves, but could potentially be abused.
        # Set to 'false' if you're worried about security.
        Allow file deletion: true
  Restart:
        # Whether scripts are allowed to stop or restart your server.
        # This is usually only done intentionally, and quite identifiable if done on accident,
        # Though you may wish to disable this if your server is stopping and you don't know why,
        # or are just concerned about security in general.
        # Generally only restart should be on. Exception examples include a server manager system, which would restart
        # a server that stops more 'properly' than the restart command might.
        #
        # Note that it is still possible at this time to 'execute' a stop or restart instruction, which can be
        # blocked by blocking the commands themselves with the command event, like so: 'on stop|restart command'
        Allow server stop: false
        Allow server restart: true
  Filecopy:
        # Whether scripts are allowed to copy files across your server
        # Note that this could be abused by overwriting existing files.
        # Set to 'false' if you're worried about security.
        Allow copying files: true
  Java:
        # Whether scripts are allowed to run arbitrary Java code.
        # This is extremely dangerous and should be kept off unless monitored carefully.
        # Set to 'false' if you're worried about security.
        Allow running java: false
  Log:
        # The log command writes to file, which is potentially dangerous
        # Set to 'false' if you're worried about security.
        Allow logging: true
  Yaml:
        # Whether the YAML command is allowed to save outside the minecraft folder.
        # Set to 'false' if you're worried about security.
        Allow saving outside folder: true
  Webget:
        # Whether to allow scripts to read arbitrary data from the web, which can also enable tracking of your private server data.
        Allow: true
  General:
        # NEVER EVER ENABLE ANY OF THESE.
        # THEY WILL BORK YOUR SERVER.
        # ESPECIALLY NOT IF YOU'RE NOT A JAVA DEVELOPER!!!
        Allow stupid file abuse you moron dont enable this: false
        are you sure: false
        are you absolutely seriously sure dont enable this: false
        This one dont touch: false
    # GENERAL SECURITY NOTE: Always run your server on a user with access to nothing but the minecraft folder
    # Otherwise, a bad script or plugin could potentially damage things
    # ALSO: Always read scripts you download for anything suspicious looking, EG the log command, the file_delete mechanism, ...

Tags:
  # How long a tag can parse before force-closing the tag parser engine. Set to 0 to disable tag parse timing entirely.
  Timeout: 1
  # Settings for tags like cuboid.get_blocks, location.find.blocks, ...
  Block tags:
    # How many blocks can be read, max, before stopping the tag in place
    Max blocks: 1000000
  Path finding:
    # How far away the path finder can search before giving up
    Max distance: 100
  Chat history:
    # How many player messages will be stored for each player (<player.chat_history>, etc.)
    Max messages: 10

Packets:
  # Whether to allow Denizen to intercept packets from and to player clients.
  # This enables access to certain ScriptEvents, such as PlayerSteers and PlayerReceivesMessage.
  # It also enables hiding item script IDs and most likely has no real reason to be disabled.
  # Note that changing this setting requires a full server restart.
  Interception: true

# The version of this configuration file, used to check if your
# configuration file is outdated or too new
Config:
  Version: 14

DNx5 avatar Jul 10 '18 06:07 DNx5

is_afk is an essentials tag... 0.o

mcmonkey4eva avatar Jul 10 '18 06:07 mcmonkey4eva

Possibly Quests being enabled at all causes player tags to break? It has to parse Bukkit.getPluginManager().getPlugin("Quests") every time rn because Quests screwed their stuff up, which might be borkish. I'll push a patch to try

mcmonkey4eva avatar Jul 10 '18 06:07 mcmonkey4eva

The problem goes away with last patch, thanks!

DNx5 avatar Jul 10 '18 06:07 DNx5