In multiplayer gates sometimes fail to deactivate #12


  • New
  • Defect
Open
Assigned to _ForgeUser7495956
  • _ForgeUser1196746 created this issue Nov 20, 2012

    What steps will reproduce the problem?

    1. Create multiple gates on a non-local server with a bit of lag/latency
    2. Dial and travel through some gates

    What is the expected output?

    The gate connection should deactivate after passing through.

    What do you see instead?

    Gate remains active indefinitely. Even using the /gate deactivate command on the source gate has no effect and gives message "An internal error occurred while attempting to perform this command"

    What versions are you using? Gates: 1.1b Craftbukkit: 1.4.5-R0.1

    Do you have an error log of what happened?

    2012-11-20 08:43:33 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'gate' in plugin Gates v1.1b
    	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46)
    	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186)
    	at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:502)
    	at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:985)
    	at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:903)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:858)
    	at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:44)
    	at net.minecraft.server.NetworkManager.b(NetworkManager.java:290)
    	at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:113)
    	at net.minecraft.server.ServerConnection.b(SourceFile:39)
    	at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30)
    	at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:595)
    	at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:222)
    	at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:493)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:426)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:856)
    Caused by: java.lang.NullPointerException
    	at org.bukkit.craftbukkit.inventory.CraftInventory.getSize(CraftInventory.java:38)
    	at org.bukkit.craftbukkit.inventory.CraftInventory.clear(CraftInventory.java:378)
    	at dale2507.gates.gate.DHD.clear(DHD.java:141)
    	at dale2507.gates.gate.Activator.clearDhd(Activator.java:292)
    	at dale2507.gates.gate.Activator.deactivate(Activator.java:260)
    	at dale2507.gates.commands.GateCommand.deactivate(GateCommand.java:223)
    	at dale2507.gates.commands.GateCommand.onCommand(GateCommand.java:71)
    	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    	... 15 more
    

    Please provide any additional information below.

    Even a server restart didn't fix it. Now I just get errors when the server starts up too complaining that it can't shut down an incoming connection.

    I use multiverse.

  • _ForgeUser1196746 added the tags New Defect Nov 20, 2012
  • _ForgeUser7495956 posted a comment Nov 20, 2012

    It looks like it is having problems when the chest is being cleared. As a temporary solution for this you could set dhd_clear_stage to 0 in the settings. This should stop the chest being cleared.

    I'll do some testing see if I can reproduce the error. It may also help me if you could tell me what you have set as the following settings:

    • activator_logic
    • dhd_clear_stage
    • dhd_clear_on_fail
    • connection_time
    • auto_off_time

    Also could you post the error log displayed when you start up the server as it should reset all of the gate connections on a restart.

    Thanks,

  • _ForgeUser1196746 posted a comment Nov 20, 2012
    # Settings for creating gates
    gate_creation:
      
      # Material used for creating gates
      # default = 49 (Obisidian)
      gate_material: 49
      
      # Default torch used for chevrons
      # Possible values: 0 (None), 50 (Torch), 76 (Redstone torch)
      # Default: 76 (Redstone Torch)
      default_chevron: 76
      
      # Area used to search for gate components
      # Default: 20x10
      search_area:
        horizontal: 20
        vertical: 10
      
      # Minimum number of item stacks for an address
      # Possible values: 1-9
      # Default: 3
      # Use 7 for stargate theme
      minimum_chevrons: 3
      
      # Allow outgoing only gates
      # Default: true
      outgoing_only: true
      
      # Allow auto dail
      # Default: true
      auto_dial: true
      
      # Indefinite connection item
      # Item to be placed in DHD (Chest for indefinite connections)
      # Default: 0 (Disabled)
      indefinite_item: 0
      
      # Attempts to fix any broken gates when they are loaded
      # Default: true
      fix_on_load: true
        
    # Settings for gate connections
    gate_connection:
      
      # Logic class used for dialling the gate
      # QuickDial - Dials the gate immediately if possible
      # FailBeforeDial - Checks if the destination gate can accept a connection before dialling
      # FailAfterDial - Dials the gate and fails on the last chevron if a connection isn't possible
      # Default: FailBeforeDial
      activator_logic: FailAfterDial
    
      # The stage in the dialling sequence when the chest will be cleared
      # 0 - Disabled (Items not removed)
      # 1 - Start of dialling
      # 2 - End of dialling (default)
      # 3 - On gate disconnect
      dhd_clear_stage: 3
    
      # Determine if the chest should be cleared if the destination gate is not available
      # This setting has no effect if dhd_clear_stage is 0 (disabled) or 3 (on gate disconnect)
      # Default: false
      dhd_clear_on_fail: false
      
      # Maximum connection time in seconds
      # Default: 38
      connection_time: 38
      
      # Auto off time if no traveller goes through gate
      # Default: 10
      auto_off_time: 10
      
      # Delay between dialing each chevron (address item)
      # Default: 15
      chevron_delay: 15
      
      # Use item stack amount as address parameter
      # If creating a gate with this setting false, the address will always be single items even if this setting is changed.
      # i.e. number of items are specific to each address
      # Default: false
      check_amount: false
      
      # Enable vortex
      # Default: true
      vortex: true
      
      # Allow vehicles
      # Default: true
      allow_vehicles: true
      
      # Kill players who try to enter a connection the wrong way
      kill_wrong_way: true
      
      # Iris Material
      # Default: 42 (Iron Block)
      iris_material: 42
    

    I also have Lockette installed... could it be conflicting if I have the sign next to the chest?

  • _ForgeUser1196746 posted a comment Nov 20, 2012

    Ok.. tested without Lockette and same issue

  • _ForgeUser1196746 posted a comment Nov 20, 2012

    Further testing ... it appears to only be a problem when dhd_clear_stage is set to 3

  • _ForgeUser7495956 posted a comment Nov 20, 2012

    Most plugins with signs use the first line as an identifier (e.g. [Gates] for this, I assume [Lock] for lockette). Unless the identifiers are the same, gates shouldn't clash with sign based plugins.

    Thanks for the info. I'll try your settings file tomorrow see if I can reproduce the issue. It could also be limited to the activator_logic setting if you want to try changing that to narrow it down a bit more.

  • _ForgeUser7495956 posted a comment Nov 21, 2012

    I've tried your config but can't reproduce the error. Is it just the one gate or all of them?

  • _ForgeUser1196746 posted a comment Nov 22, 2012

    It was just one gate.

    When I set dhd_clear_stage to anything other than 3 I no longer get the issue.

    However, there appears to be another issue. The same gate vanishes from the /gate list every time I restart the server.

    I've tried repositioning the chest and sign to no avail.

    The only difference between this gate and others is that I have steps at the front of it (to make it easier to enter) ... would that make any difference at all?

  • _ForgeUser7495956 posted a comment Nov 22, 2012

    Does this still happen with the latest version? Also can you check if the file is there for the gate? This should be in plugins/Gates/gate_name.mcg

    Thanks

  • _ForgeUser1196746 posted a comment Nov 22, 2012

    Yes... still happens with latest version.

    Yes gate file still exists in the correct location.

    Noticed the error below in console earlier....

    2012-11-22 23:56:17 [SEVERE] Could not pass event GateStatusChangeEvent to Gates v1.1b
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:341)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
    at dale2507.gates.gate.Gate.setStatus(Gate.java:64)
    at dale2507.gates.gate.Activator.deactivate(Activator.java:263)
    at dale2507.gates.gate.Activator$AutoOff.run(Activator.java:229)
    at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:53)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
    at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:529)
    at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:222)
    at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:493)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:426)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:856)
    Caused by: java.lang.NullPointerException
    at org.bukkit.craftbukkit.block.CraftSign.<init>(CraftSign.java:17)
    at org.bukkit.craftbukkit.block.CraftBlock.getState(CraftBlock.java:227)
    at dale2507.gates.gate.Display.getSign(Display.java:85)
    at dale2507.gates.gate.Display.setStatus(Display.java:133)
    at dale2507.gates.gate.Display.onGateStatusChange(Display.java:171)
    at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:339)
    ... 13 more
    
  • _ForgeUser1196746 posted a comment Nov 22, 2012

    The gate I'm having trouble with is the one in my SkyLand world (I use Multiverse2) ... The gates in the primary world on my server (i.e. the one specified in the server properties) seem to work just fine.

    Only the gate in the 2nd (and only other) world keeps getting lost on a restart.

  • _ForgeUser1196746 posted a comment Nov 22, 2012

    Interestingly after a /reload the gate works normally.

    So it appears to simply not be loading that gate after a restart. If I set my server to do a /reload immediately after a restart the gate seems to work.

  • _ForgeUser7495956 posted a comment Nov 28, 2012

    I've just uploaded a new file which should stop the errors you were getting from causing major problems but the sign for the gate you were getting the error on may not update properly.

    It probably won't be available until tomorrow as it need approval by bukkit first.

  • _ForgeUser7495956 posted a comment Dec 19, 2012

    Has this issue been resolved?


To post a comment, please login or register a new account.