Inactive [FIX/ADMN] NoLagg v1.88.1 - Prevent common lag causes on your server [2338]

Discussion in 'Inactive/Unsupported Plugins' started by bergerkiller, Sep 17, 2011.

  1. Offline

    bergerkiller

    I had already made this plugin before after having a major lag issue. (lots of torches being filled, turned into items, lag for 20 minutes) It also works for 1060.

    Some feature ideas are taken over from PerformanceTweaks by @LexManos so some credit goes to him. Code, however, written from scratch by me. :)

    Important:

    If you get a warning message [NoLagg TLN] followed up with a stack trace in the log, this has to do with the main thread not having responded within 10 seconds. When a plugin takes more than this time to enable, it will show that. The warning is NOT an error and is no bug, and not a bug related to NoLagg. To disable this feature, disable 'threadlocknotifier' in the config.yml. This feature is mainly intended to notify you what plugin is causing the server to freeze, may it ever happen. It is used to debug plugins in general, as they may get stuck for whatever reason.

    NoLagg's features in a nutshell

    Description

    Prevent lag caused by many items

    Every time an item gets spawned, it is buffered per chunk. For example, you spawn 30 items using Q and the maximum allowed items per chunk is 20, then the 10 remaining items are not spawned. They are spawned as soon the item count in this chunk is < 20 again.

    Read more...

    Form item stacks - fully automatically

    Whenever two or more (configurable) items or experience orbs get near each other, they form a single stack of that item type. If someone drops 64 dirt blocks on the ground using Q, it will show a single item of 64 dirt instead.

    Read more...

    Prevent lag caused by TNT

    This plugin takes over tnt ignition caused by explosions. When exploding stacks of tnt, it does not rush all tnts into a single tick, but detonate them nicely in sync. This results in pretty awesome fireworks. :)

    Read more...

    Prevent lag caused by lighting glitches

    Whenever a new chunk is generated, it's lighting information is generated and all nearby players receive the updated chunk data. If the auto-method fails, you can use /nolagg fix to do it manually. This fixing fixes, for example, dark spots in and around caves lagging the client.

    Read more...

    Set entity spawn limits

    You can set a spawn limit on virtually every entity in the game. From mobs to items to TNT. Only thing being excluded is Players, since I can't simply kick someone 'like that'. :)
    Note: It removes already spawned entities too. So, if you want to keep your animals alive, don't set mob or animal limits, or it will possibly clear your farm animals. (or you can disable the spawn limiter all together)

    I recommend finding an alternative plugin for this instead. Removing entities after they are spawned causes more lag than it prevents!

    Global auto-saver

    Since asynchronous chunk saving is now implemented internally, it is no longer a problem to save entire worlds frequently. You can set auto-save intervals in the configuration. If used with an interval higher than 400 ticks (20 seconds) it will use a scheduled task instead of the internal saver to prevent chunks never getting saved. Another benefit is that player information is also auto-saved, preventing your players losing their inventory state.

    New chunk sending mechanics

    Instead of loading chunks all around the player, the player direction is used to load the visible chunks first. This means that players can expect chunks in front of them to load quickly, while chunks on the sides take a bit longer to appear. When the player looks into another direction, the direction changes and thus the new visible chunks get loaded first. Only if all chunks ahead of the player are loaded, chunks around the player are sent. This all can be configured using a simple minimum and maximum sending rate.

    Read more...

    Examining the server tick rate

    If you encounter very low tick rates and you want to find out what plugin is causing it, you can use the examine component to find it out. It comes with a graphic viewer, which makes bug tracking the easiest thing ever.

    Read more...

    Prevent cross-thread access for events

    As it seems, some plugins don't follow the rules and use Bukkit methods in another thread. This plugin will notify you and cancel if possible whenever this happens so other plugins understand their mistake. If you encounter a lot of spam in the console, first check the stack trace for the plugin that caused the error. Report this error to the author or remove the plugin, if you have questions you are free to ask.



    Configuration (on BukkitDev)

    Commands and Permissions (on BukkitDev)

    Synchronized code accessed by another thread? (BukkitDev)



    Media



    Video by brandcool86


    FAQ

    - Help I experience missing chunks
    If you are using Spout, don't use Reloads. This is also the reason why Spout added a warning when a player tries to reload the server. Not using Spout, then it's a bug which you can report.

    - Can this plugin be used with PTweaks
    (this message was really old...) Yes, they are compatible, but if certain features overlap, make sure you disable these features in either plugin.

    - I get a warning about the async auto save and interval. Wat do?
    Change the autoSaveInterval value in the configuration to a value higher than 400, like 600. The warning is to prevent endless autosaves to occur, clogging up CPU.

    - I have experienced CPU usage
    CPU usage is not the same as lag. NoLagg uses multiple (2-3) extra threads to prevent tick and network lag. If a lot has to be done, it does this quicker, but this takes more CPU obviously.

    - I have lag when using NoLagg
    See also the FAQ above. Explain what type of lag you have: tick lag, client lag, network lag and/or 'block placement' lag. You can use /nolagg monitor to check the tick rate. If this is normal (>15), then you have network lag. Client lag is when the FPS drops. Block placement lag is lag when the tick rate is normal and other network messages, like chat, are instant.

    - WorldEdit causes lag...
    YES because it is unsafe to take over the main thread while another plugin is having hold over it. I can try fixing this, but it could ultimately lead to some serious concurrency exceptions. Don't expect this to be implemented very soon...

    - Do spawn limits interfere with mob-spawning plugins like MobArena?
    No, it does not. It only limits mobs spawned by 'nature': all custom creature spawns are ignored throughout the run of the plugin. Only after you reload will it lose track of these entities and will it remove custom-spawned mobs. If you use MobArena, be sure nothing is going on when you reload the server.

    - Does item stacking interfere with Showcase or BleedingMobs?
    It supports Showcase and ShowcaseStandalone entirely. (showcased items are completely ignored at all times) The same applies to the 'particles' created by the BleedingMobs plugin. Know of a plugin where it stacks items which should not be stacked? Post the plugin name so I can add support. You are an owner and want to add support? Only having a function in your plugin to check if an item is 'ignored' is enough.

    - Can this plugin be used with Chunk Manager
    If you want to use the Chunk Manager with Nolagg, disable the chunk sending of Nolagg first. If you don't do that, this plugin will do that by itself and send a warning in the log. Of course, compare the results first. :)

    - What are the best settings if I have a lot of RAM memory?
    This plugin does not deal with reduced RAM memory. If I could, I would, but you simply can't reduce the amount of memory Java uses. This data is locked and secured, so I can't simply throw away bits of data or write and read data from/to disk. Any plugin claiming to reduce RAM usage on a server, is probably 'garbage collecting'. This fakes having less RAM usage by removing unused data, but Java does this by itself as well once it hits a certain limit. All these plugins will do is make the Garbage Collector run in overdrive, which will only kill your tick rate and/or CPU speeds. A bad thing.

    - I get a lot of 'Synchronized code accessed from another thread' errors
    Find out what plugin is acting up by inspecting the stack trace. If the plugin that causes this is inactive, all you can do is wait for a refurnished version or someone to fix it for you, or use an alternative plugin. If it's still under development, notify the author of this, it IS an error caused by that plugin. If you can't find out the cause, PM me or post in this thread.


    Before you begin writing a lag issue

    This is very important, just posting a 'it causuz lagz und shitz' won't do, won't help and I won't be able to help you any further either. Question is if I even want to help you, if you post such a message without anything worth looking at. Things to include in your message:
    - Errors in the log if possible
    - What CB version you use and what NoLagg version you use
    - When this lag occurs. Tick rate drop in general?
    - The configuration you used when running this plugin
    - What type of lag if applicable. Options are: tick lag, client lag, network lag (see above)

    Important links

    NoLagg Download page and others at Dev Bukkit
    View the source code of NoLagg at GitHub

    Use an archive extracting program (WinRar, WinZip) to open the archive.

    TODO-list:
    - Add option to disable physics when the tick delay becomes too high

    Changelog

    Show your appreciation for my plugins by donating
    [​IMG]
     
  2. Offline

    kalez

    oh sorry forgot the plugin part. um the only one that deal with chunks, i assume, would be dynmap.
     
  3. Offline

    in0de

    Many thanks for the update!

    A '/back' command, which is from the AdminCMD that no different from an ordinary teleport command, is raising an error below.
    Is it from Bukkit? or AdminCMD? or NoLagg?
    Every plug-ins are up-to-date. (CB 1609, AdminCMD latest dev build, NoLagg 1.53)

    Code:
    15:44:54 [INFO] [AdminCmd] kim10714 [CMD: bal_back] (ARGS:[] Flags : [])
    15:44:54 [SEVERE] Could not pass event PLAYER_TELEPORT to NoLagg
    java.lang.IllegalAccessError: Synchronized code got accessed from another thread: java.util.concurrent.ThreadPoolExecuto
    r$Worker
            at org.bukkit.event.player.PlayerListener.onPlayerTeleport(PlayerListener:0)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:321)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:297)
            at org.bukkit.craftbukkit.entity.CraftEntity.teleport(CraftEntity.java:156)
            at be.Balor.Manager.Commands.Tp.LastLocation.execute(LastLocation.java:58)
            at be.Balor.Manager.Commands.ACCommandContainer.execute(ACCommandContainer.java:62)
            at be.Balor.Manager.CommandManager$NormalCommand.run(CommandManager.java:408)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    15:49:22 [INFO] kim10714 lost connection: disconnect.quitting

    Anyway I had to rollback to previous build of CB and others, there's also a server hang. I assume it's because of other modules' version gone too far.

    Code:
    2011-12-20 20:42:56 [SEVERE] Could not pass event CHUNK_LOAD to NoLagg
    java.lang.IllegalAccessError: Synchronized code got accessed from another thread: java.util.concurrent.ThreadPoolExecutor$Worker
        at org.bukkit.event.world.WorldListener.onChunkLoad(WorldListener:0)
        at org.bukkit.plugin.java.JavaPluginLoader$52.execute(JavaPluginLoader.java:626)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:92)
        at org.bukkit.craftbukkit.CraftWorld.getChunkAt(CraftWorld.java:105)
        at org.bukkit.craftbukkit.CraftWorld.getChunkAt(CraftWorld.java:456)
        at com.ubempire.bananachunk.BCPlayerListener.onPlayerTeleport(BCPlayerListener.java:35)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:321)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:297)
        at org.bukkit.craftbukkit.entity.CraftEntity.teleport(CraftEntity.java:156)
        at be.Balor.Manager.Commands.Tp.LastLocation.execute(LastLocation.java:58)
        at be.Balor.Manager.Commands.ACCommandContainer.execute(ACCommandContainer.java:62)
        at be.Balor.Manager.CommandManager$NormalCommand.run(CommandManager.java:408)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
     
  4. Offline

    bergerkiller

    @in0de fml why do all plugin developers use f*ing THREADS when executing a command? A TELEPORT COMMAND? Seriously? I understand the issues with cross-threading, but come on...I thought some people at least knew how to write a plugin :(

    And yes, it's from AdminCMD ("Balor"?)
     
  5. Offline

    Sepulzera

    When using both, NoLagg and http://dev.bukkit.org/server-mods/minecartpermanence/]MinecartPermanence] I'm getting this error:

    Show Spoiler
    Code:
    2011-12-20 18:55:29 [SEVERE] [NoLagg] An error occured while performing a routine update:
    2011-12-20 18:55:29 [SEVERE] java.util.ConcurrentModificationException
    2011-12-20 18:55:29 [SEVERE] 	at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
    2011-12-20 18:55:29 [SEVERE] 	at java.util.HashMap$ValueIterator.next(Unknown Source)
    2011-12-20 18:55:29 [SEVERE] 	at com.bergerkiller.bukkit.nolagg.meta.WorldMetaData.update(WorldMetaData.java:232)
    2011-12-20 18:55:29 [SEVERE] 	at com.bergerkiller.bukkit.nolagg.meta.WorldMetaData.updateAll(WorldMetaData.java:62)
    2011-12-20 18:55:29 [SEVERE] 	at com.bergerkiller.bukkit.nolagg.NoLagg$2.run(NoLagg.java:100)
    2011-12-20 18:55:29 [SEVERE] 	at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    2011-12-20 18:55:29 [SEVERE] 	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:493)
    2011-12-20 18:55:29 [SEVERE] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    2011-12-20 18:55:29 [SEVERE] 	at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)


    As the dev of MinecartPermanence seems to be inactive, could you try to fix it?
     
  6. Offline

    bergerkiller

    @Sepulzera Ah I see, I didn't add that x/z/world check yet. Next update will probably fix this. (but it will use my new 'global' configuration system, and I need to test this configuration system thoroughly first)

    Some servers seem to cope with chunk reference issues (the != no longer works), whatever it is...
     
  7. Sorry for "double-posting" (Here and ticket) but just because someone is using a different style of coding does not mean he does not knew how to code things. As always there are no PERFECT ways of doing something. There are bad, best and ok but never perfect or right! So saying someone can not write plugins is (for me) almost a defamatory statement. Probably it is saver to not "cross-thread" but the fault is neither with you or any other plugin developer, it is bukkit making this possible. IMO they should make sure if one thread asks for a particular info it should lock it until that thread is finished with whatever it does to it (Semaphores!!!)
     
  8. Offline

    bergerkiller

    @Lathanael No, it is strictly stated
    ALL events are also unsafe. What if data is accessed from an event? Then you get the 'if you modify from another thread' issue, which I am now checking against. It's not a different coding style, it's a programmers' error. When developing NoLagg I have done a lot of research and concluded that none of my worker threads may access Bukkit directly.
    If you run your commands on another thread, then you're just asking for trouble. Threads and async tasks are for longwhile operations that can be run independent of your server/plugin, NOT for simple tasks.

    tldr; It's not a coding style, it's a programmers' mistake.

    And adding thread checks in all Bukkit methods will tear down performance. And yes, I know, there are plugin developers around that are not as 'professional', but that doesn't mean we have to turn Bukkit into some sort of wall of safety with band-aid all around it.

    The only reason I added cross-thread checks is that I simply got too many concurrent modification errors on my side, which is impossible without more than one thread. I was using synchronized checks previously, but then other plugins started to get the same issues. (TrainCarts)
     
  9. Offline

    Zathras

    @bergerkiller a Null Pointer Exception
    Code:
    09:44:04 [INFO] This server is running Craftbukkit version git-Bukkit-1.0.1-R1-b1597jnks (MC: 1.0.1) (Implementing API version 1.0.1-R1)
    ...
    09:44:12 [INFO] [NoLagg] NoLagg version 1.52.8 is enabled!
    ...
    12:37:17 [SEVERE] [NoLagg] An error occured while performing a routine update:
    12:37:17 [SEVERE] java.lang.NullPointerException
    12:37:17 [SEVERE]     at org.bukkit.craftbukkit.inventory.CraftItemStack.setAmount(CraftItemStack.java:112)
    12:37:17 [SEVERE]     at com.bergerkiller.bukkit.nolagg.StackFormer.mergeStacks(StackFormer.java:118)
    12:37:17 [SEVERE]     at com.bergerkiller.bukkit.nolagg.StackFormer.mergeItems(StackFormer.java:136)
    12:37:17 [SEVERE]     at com.bergerkiller.bukkit.nolagg.StackFormer.updateItems(StackFormer.java:150)
    12:37:17 [SEVERE]     at com.bergerkiller.bukkit.nolagg.StackFormer.update(StackFormer.java:86)
    12:37:17 [SEVERE]     at com.bergerkiller.bukkit.nolagg.meta.WorldMetaData.update(WorldMetaData.java:227)
    12:37:17 [SEVERE]     at com.bergerkiller.bukkit.nolagg.meta.WorldMetaData.updateAll(WorldMetaData.java:63)
    12:37:17 [SEVERE]     at com.bergerkiller.bukkit.nolagg.NoLagg$2.run(NoLagg.java:100)
    12:37:17 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    12:37:17 [SEVERE]     at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:493)
    12:37:17 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    12:37:17 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    12:42:04 [SEVERE] [NoLagg] An error occured while performing a routine update:
    12:42:04 [SEVERE] java.lang.NullPointerException
    12:42:04 [SEVERE]     at org.bukkit.craftbukkit.inventory.CraftItemStack.setAmount(CraftItemStack.java:112)
    12:42:04 [SEVERE]     at com.bergerkiller.bukkit.nolagg.StackFormer.mergeStacks(StackFormer.java:118)
    12:42:04 [SEVERE]     at com.bergerkiller.bukkit.nolagg.StackFormer.mergeItems(StackFormer.java:136)
    12:42:04 [SEVERE]     at com.bergerkiller.bukkit.nolagg.StackFormer.updateItems(StackFormer.java:150)
    12:42:04 [SEVERE]     at com.bergerkiller.bukkit.nolagg.StackFormer.update(StackFormer.java:86)
    12:42:04 [SEVERE]     at com.bergerkiller.bukkit.nolagg.meta.WorldMetaData.update(WorldMetaData.java:227)
    12:42:04 [SEVERE]     at com.bergerkiller.bukkit.nolagg.meta.WorldMetaData.updateAll(WorldMetaData.java:63)
    12:42:04 [SEVERE]     at com.bergerkiller.bukkit.nolagg.NoLagg$2.run(NoLagg.java:100)
    12:42:04 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    12:42:04 [SEVERE]     at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:493)
    12:42:04 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    12:42:04 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    
    config.yml:
    Code:
    bufferItems: true
    bufferTNT: true
    useSpawnLimits: true
    useChunkUnloadDelay: true
    chunkUnloadDelay: 10000
    tntDetonationInterval: 1
    tntDetonationRate: 10
    explosionRate: 5
    maxItemsPerChunk: 40
    formItemStacks: true
    autoSaveInterval: 400
    updateInterval: 20
    stackRadius: 3.0
    stackThreshold: 3
    monitorInterval: 40
    autoFixLighting: false
    chunkSending:
      enabled: true
      minRate: 0.25
      maxRate: 2.0
      boost: 25
    crossThreadExceptions: []
    
     
  10. Offline

    bergerkiller

    @Zathras aah interesting, as it seems if an infinite item gets stacked it's count becomes 'o', and the next time it stacks it will throw a NPE because the item is actually null. Will add checks against this sort of infinite stacking.
     
  11. Offline

    bergerkiller

    @VADemon in that case you can except the stack trace line:
    Code:
    crossThreadExceptions:
    - org.theanticookie.bukkit.httpconsole.ConsoleRequestHandler.executeConsoleCommand
     
  12. @bergerkiller
    Yea I know that it would help! Thanks anyway :D
     
  13. Offline

    GameFAQsRolo

    @bergerkiller 1.53.1 is removing the settings in config for chunksending and spawnlimits.

    After a restart, they get reset to:
    Code:
    spawnlimits: {}
    chunkSending: {}
    I think the rest of the config remains intact.
     
  14. Offline

    atento

    Attention

    Code:
    2011-12-22 15:53:02 [SEVERE] Could not pass event PLAYER_TELEPORT to NoLagg
    java.lang.IllegalAccessError: Synchronized code got accessed from another thread: com.cypherx.xauth.xAuth$1
        at org.bukkit.event.player.PlayerListener.onPlayerTeleport(PlayerListener:0)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:321)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:297)
        at org.bukkit.craftbukkit.entity.CraftEntity.teleport(CraftEntity.java:156)
        at com.garbagemule.MobArena.Arena.movePlayerToEntry(Unknown Source)
        at com.garbagemule.MobArena.Arena.playerLeave(Unknown Source)
        at com.garbagemule.MobArena.MAListener.onPlayerKick(Unknown Source)
        at com.garbagemule.MobArena.MAPlayerListener.onPlayerKick(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader$4.execute(JavaPluginLoader.java:286)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at net.minecraft.server.NetServerHandler.disconnect(NetServerHandler.java:107)
        at lishid.orebfuscator.utils.NetServerHandlerProxy.disconnect(NetServerHandlerProxy.java:49)
        at org.bukkit.craftbukkit.entity.CraftPlayer.kickPlayer(CraftPlayer.java:185)
        at com.cypherx.xauth.xAuth$1.run(xAuth.java:263)
        at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2011-12-22 15:53:02 [SEVERE] java.lang.IllegalAccessError: Synchronized code got accessed from another thread: com.cypherx.xauth.xAuth$1
    2011-12-22 15:53:02 [SEVERE]     at com.all.bukkit.threadcheck.ThreadCheck.check(ThreadCheck.java:83)
    2011-12-22 15:53:02 [SEVERE]     at com.bergerkiller.bukkit.nolagg.ChunkSendQueue.remove(ChunkSendQueue.java:348)
    2011-12-22 15:53:02 [SEVERE]     at net.minecraft.server.PlayerInstance.b(PlayerInstance.java:63)
    2011-12-22 15:53:02 [SEVERE]     at net.minecraft.server.PlayerManager.removePlayer(PlayerManager.java:109)
    2011-12-22 15:53:02 [SEVERE]     at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:159)
    2011-12-22 15:53:02 [SEVERE]     at net.minecraft.server.NetServerHandler.disconnect(NetServerHandler.java:128)
    2011-12-22 15:53:02 [SEVERE]     at lishid.orebfuscator.utils.NetServerHandlerProxy.disconnect(NetServerHandlerProxy.java:49)
    2011-12-22 15:53:02 [SEVERE]     at org.bukkit.craftbukkit.entity.CraftPlayer.kickPlayer(CraftPlayer.java:185)

    xauth stop no need password to login
     
  15. Offline

    bergerkiller

    @atento First of all: Update NoLagg. Second, either exclude xAuth from NoLagg's configuration (crossThreadException) or disable thread checking.
     
  16. If you are using Towny you will need to add an exception as below...

    - com.palmergames.bukkit.towny.tasks.TownClaim

    This is because the plot regen system runs in it's own thread to prevent lag. However, this will trigger the 'Synchronized code accessed from another thread' error in NoLagg.
    It's not actually an error as the regen doesn't care what the current block state is, it simply attempts to set each block back to a snaphot which was taken when the plot was claimed. This is all performed at a slow rate.

    It might be an idea for the dev of ths plugin to add this exception as a default, simiar to the xAuth one.
     
  17. Offline

    bergerkiller

    @ElgarL No, the difference is that you use the Bukkit method to do this: block.setType or world.setType.
    This triggers block_physics, which in turn causes all other plugins that use this event with any type of collection to break. Especially since this event is fired on the main thread several times per tick this risk is high.

    Even if your idea is safe and all you do seems safe, if it affects any type of unsynchronized collection it can and will cause concurrent modification exceptions. I only added the thread exception for XAuth because it is inactive, what they did is still a bad thing. It simply can't be resolved and thus I had to add it there. It's up to the author of Towny to fix the concurrent issues.

    I suggest using the native chunk directly and alter the block data/material type arrays. This way no events are fired and nothing goes wrong.

    It is an error, because it causes a block_physics event on another thread. Bukkit methods are thus called on that thread thread, and thus it will harm other plugins that use this event. Towny may get no errors, but other plugins will get to handle concurrent mod. errors. And just saying 'let those plugins synchronized their stuff' is ungrounded, Towny is the cause. Plus it can cause thread locks if you synchronize too much, which will greatly slow down the server.
     
  18. Offline

    chrisgun

    I dont know if this is a bug, but it is possible to stack Potions when you drop them and then pick them up again.

    Is it possible to ignore Potions with ignoredItemTypes? If so what to write?
     
  19. Offline

    Sepulzera

    still waiting for the death animation fix.

    [ironic]You are complaining about devs being not able to write plugins but your plugin creates bug where it shouldn't, either [/ironic]
     
  20. Offline

    bergerkiller

    @Sepulzera I know, so feel free to complain to me the same way :)
    At least I manage to bring out an update against them at a great pace to cope with it...

    Now adding a fix against stacking potions as mentioned multiple times. Then I'll upload a fix for that issue + the configuration issue + stacking potions.

    Updated
     
  21. Offline

    Zathras

    @bergerkiller thanks for identifying this... i just installed 1.53.1
     
  22. Offline

    bergerkiller

    @Zathras use 1.53.2 I just uploaded, the issue is resolved in that version AFAIK.
    EDIT: nvm , 1.53.1 fixes this too, yet I recommend updating as it fixes the configuration wiping issues too.
     
  23. Offline

    Sepulzera

    1.53.2 does not fix the death animations.
    They are still skipped, thought less hard.
    Just check if the smoke animation is done and you will see, when you have fixed it.

    Furthermore it's conflicting with AdminCMD.
    When spawning a mob an error occurs:
    Show Spoiler
    Code:
    2011-12-23 10:47:09 [SEVERE] java.lang.IllegalAccessError: Synchronized code got accessed from another thread: be.Balor.Manager.Commands.Mob.SpawnMob$NormalMob
    2011-12-23 10:47:09 [SEVERE] 	at org.bukkit.event.entity.EntityListener.onCreatureSpawn(EntityListener:0)
    2011-12-23 10:47:09 [SEVERE] 	at org.bukkit.plugin.java.JavaPluginLoader$72.execute(JavaPluginLoader.java:767)
    2011-12-23 10:47:09 [SEVERE] 	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    2011-12-23 10:47:09 [SEVERE] 	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    2011-12-23 10:47:09 [SEVERE] 	at org.bukkit.craftbukkit.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:259)
    2011-12-23 10:47:09 [SEVERE] 	at net.minecraft.server.World.addEntity(World.java:883)
    2011-12-23 10:47:09 [SEVERE] 	at org.bukkit.craftbukkit.CraftWorld.spawn(CraftWorld.java:820)
    2011-12-23 10:47:09 [SEVERE] 	at org.bukkit.craftbukkit.CraftWorld.spawn(CraftWorld.java:655)
    2011-12-23 10:47:09 [SEVERE] 	at org.bukkit.craftbukkit.CraftWorld.spawnCreature(CraftWorld.java:323)
    2011-12-23 10:47:09 [SEVERE] 	at be.Balor.Manager.Commands.Mob.SpawnMob$NormalMob.run(SpawnMob.java:168)
    2011-12-23 10:47:09 [SEVERE] 	at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
     
  24. Offline

    bergerkiller

    @VADemon that's odd, why is it loading a chunk from within the chunk operation? It already has the native chunk when it starts to process them...

    @Sepulzera Then I honestly can't tell what is causing the animations to skip. Other than entity limits there is nothing that interacts with these entities/mobs, and all that happens in those functions is removing the entity at most. Does this issue go away if you remove NoLagg?

    And report those errors at the author of AdminCMD, not me. I don't cause them in NoLagg, I merely report them happening. It's an error which is added on purpose: to prevent cross-thread access issues in plugins. It's a bug which has to be addressed, and it's better to throw the error now than to cause other plugins to throw errors and possibly crash some of their running tasks.
     
  25. Offline

    Sepulzera

    Yep death animations are working fine without your plugin. Even when just running CB with NoLagg only, death animations are fucked up.

    So you throw out tons of exception errors in my log, even if it is working fine?
    Sounds more like a debug option and you should implement it like this, with a setting to toggle it.
     
  26. Offline

    bergerkiller

    @Sepulzera you can disable it already, but I obviously keep it enabled so I don't have to repeatedly ask for what plugins they use after which I have to decompile the source code to find yet again async thread access issue. I am tired of that and this will keep me and the other authors informed of such issues.

    Also, I don't see it skipping death animations (?) What is your configuration? When I kill a chicken, I see it turning red, fall on it's side, make the death sound and disappear as it should. What are you getting then...
     
  27. @bergerkiller
    So will you try to fix it? I will disable NoLagg anyway until it's fixed :(
     
  28. Offline

    bergerkiller

    @VADemon yeah I already fixed it here, I used world.getLightLevel and apparently this loads nearby chunks too. I turned it around and used a function of the chunk to do the same. Only downside is that it will fail to fix lighting near the edges of the chunk. (only from one-two directions)
     
  29. Offline

    Sepulzera

    Config (open)
    Code:
    bufferItems: true
    bufferTNT: true
    useSpawnLimits: false
    useChunkUnloadDelay: false
    tntDetonationInterval: 1
    tntDetonationRate: 30
    explosionRate: 60
    maxItemsPerChunk: 100
    formItemStacks: true
    chunkUnloadDelay: 10000
    autoSaveInterval: 200
    updateInterval: 20
    stackRadius: 2.5
    stackThreshold: 5
    monitorInterval: 40
    autoFixLighting: true
    chunkSending:
      enabled: true
      minRate: 0.25
      maxRate: 2.0
      boost: 25
    crossThreadExceptions:
    - com.cypherx.xauth.xAuth$2.run
    threadCheckEnabled: false
    ignoredItemTypes: []



    Same for me, just that it is skipped in the course, anywhere (randomly).
    So sometimes they get removed before they fall to ground, sometimes when they hit the ground, sometimes they fall to the ground and sometimes there are even the death animation smoke particles...
     

Share This Page