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

    mahari3

    I'm using: 0.7.9
    .. .. .. 'still makes no sense why this is happening, I do thank you for being patient with me, this isn't a very big problem, just a minor annoyance as said before. People ,(And by people I mean me, since i cant publicize my server due to my modem:mad: ) , can still tell what they are buying by left-clicking the showcase itself.
     
  3. Offline

    ledhead900

    Using build in title and the 1.58.8 Nolagg build.

    Code:
    2012-01-27 22:54:28 [SEVERE] Could not pass event org.bukkit.event.world.ChunkLoadEvent to NoLagg
    org.bukkit.event.EventException 
    at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1026) 
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:57) 
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:453) 
    at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:103) 
    at org.bukkit.craftbukkit.CraftWorld.getChunkAt(CraftWorld.java:112) 
    at org.bukkit.craftbukkit.CraftWorld.getBlockAt(CraftWorld.java:76) 
    at org.bukkit.craftbukkit.block.CraftBlockState.getBlock(CraftBlockState.java:102) 
    at com.bukkit.gemo.FalseBook.IC.ICs.BaseIC.getICBlock(BaseIC.java:98) 
    at com.bukkit.gemo.FalseBook.IC.ICs.selftriggered.MC0272.Execute(MC0272.java:68) 
    at com.bukkit.gemo.FalseBook.IC.ICFactory.executeSTICs(ICFactory.java:805) 
    at com.bukkit.gemo.FalseBook.IC.FalseBookICCore.run(FalseBookICCore.java:45) 
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137) 
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:502) 
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434) 
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465) 
    Caused by: java.lang.reflect.InvocationTargetException 
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
    at java.lang.reflect.Method.invoke(Unknown Source) 
    at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1024) 
    ... 14 more 
    Caused by: java.lang.NullPointerException 
    at com.bergerkiller.bukkit.nolagg.meta.ChunkMetaData.add(ChunkMetaData.java:239) 
    at com.bergerkiller.bukkit.nolagg.meta.ChunkMetaData.<init>(ChunkMetaData.java:42) 
    at com.bergerkiller.bukkit.nolagg.meta.WorldMetaData.getChunk(WorldMetaData.java:271) 
    at com.bergerkiller.bukkit.nolagg.meta.ChunkMetaData.get(ChunkMetaData.java:30) 
    at com.bergerkiller.bukkit.nolagg.meta.ChunkMetaData.get(ChunkMetaData.java:27) 
    at com.bergerkiller.bukkit.nolagg.NLListener.onChunkLoad(NLListener.java:145) 
    ... 18 more 
    Hates falsebook but I think falsebook needs update.
     
  4. Offline

    The Wizard

    It is a good feature because many users kill the dragon and only a few get xp.
     
  5. Offline

    rtcabooservb

    bergerkiller
    Spout 730, CB 1824, Java 7
    Code:
    2012-01-27 04:47:06 [SEVERE] java.lang.NullPointerException
    2012-01-27 04:47:06 [SEVERE]    at org.bukkit.event.world.ChunkEvent.<init>(ChunkEvent.java:13)
    2012-01-27 04:47:06 [SEVERE]    at org.bukkit.event.world.ChunkUnloadEvent.<init>(ChunkUnloadEvent.java:16)
    2012-01-27 04:47:06 [SEVERE]    at net.minecraft.server.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:241)
    2012-01-27 04:47:06 [SEVERE]    at net.minecraft.server.World.doTick(World.java:1728)
    2012-01-27 04:47:06 [SEVERE]    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:523)
    2012-01-27 04:47:06 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
    2012-01-27 04:47:06 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    2012-01-27 04:47:06 [SEVERE] Unexpected exception
    java.lang.NullPointerException
        at org.bukkit.event.world.ChunkEvent.<init>(ChunkEvent.java:13)
        at org.bukkit.event.world.ChunkUnloadEvent.<init>(ChunkUnloadEvent.java:16)
        at net.minecraft.server.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:241)
        at net.minecraft.server.World.doTick(World.java:1728)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:523)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Code:
    2012-01-27 04:46:49 [WARNING] Failed to handle packet: java.lang.NullPointerException
    java.lang.NullPointerException
        at net.minecraft.server.Chunk.addEntities(Chunk.java:612)
        at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:92)
        at net.minecraft.server.PlayerInstance.<init>(PlayerInstance.java:31)
        at net.minecraft.server.PlayerManager.a(PlayerManager.java:53)
        at net.minecraft.server.PlayerManager.addPlayer(PlayerManager.java:102)
        at net.minecraft.server.ServerConfigurationManager.moveToWorld(ServerConfigurationManager.java:288)
        at net.minecraft.server.ServerConfigurationManager.changeDimension(ServerConfigurationManager.java:348)
        at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:287)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:316)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:687)
        at net.minecraft.server.Packet10Flying.handle(SourceFile:126)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:552)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:536)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
     
  6. Offline

    Sapd

    Is it save to enable Spout's cache now?
     
    Mercury likes this.
  7. Offline

    Adrenaline

    Bukkit: 1818
    NoLagg: v.158.8
    PHP:
    2012-01-27 10:04:30 [SEVEREjava.lang.NullPointerException
    2012
    -01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressQueue.isAlive(ChunkCompressQueue.java:45)
    2012-01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.nextQueue(ChunkCompressionThread.java:27)
    2012-01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.run(ChunkCompressionThread.java:164)
    2012-01-27 10:04:30 [SEVEREjava.lang.NullPointerException
    2012
    -01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressQueue.isAlive(ChunkCompressQueue.java:45)
    2012-01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.nextQueue(ChunkCompressionThread.java:27)
    2012-01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.run(ChunkCompressionThread.java:164)
    2012-01-27 10:04:30 [SEVEREjava.lang.NullPointerException
    2012
    -01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressQueue.isAlive(ChunkCompressQueue.java:45)
    2012-01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.nextQueue(ChunkCompressionThread.java:27)
    2012-01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.run(ChunkCompressionThread.java:164)
    2012-01-27 10:04:30 [SEVEREjava.lang.NullPointerException
    2012
    -01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressQueue.isAlive(ChunkCompressQueue.java:45)
    2012-01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.nextQueue(ChunkCompressionThread.java:27)
    2012-01-27 10:04:30 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.run(ChunkCompressionThread.java:164)
     
  8. Offline

    Mercury

    Bukkit: 1818
    NoLagg: 1.58.88
    PHP:
    2012-01-27 16:06:58 [SEVEREjava.lang.NullPointerException
    2012
    -01-27 16:06:58 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressQueue.isAlive(ChunkCompressQueue.java:45)
    2012-01-27 16:06:58 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.nextQueue(ChunkCompressionThread.java:27)
    2012-01-27 16:06:58 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.run(ChunkCompressionThread.java:164)
     
  9. Offline

    bergerkiller

    Why am I the only one that doesn't get that error? Sigh...

    Expect an update real soon fixing that error. Also, repost, this one fixes that error:
    http://dl.dropbox.com/u/3681706/NoLagg v1.58.8.zip

    EDIT

    Interesting! So it was a good idea to set all fields null when a chunk was disposed of!
    Time to find out where these clone-unsafe chunks are located and get rid of them.
     
  10. Offline

    Mercury

  11. Offline

    crafteroni

    hey, thx for the great plugin but i have alittle problem...
    i'm using world portal, and all chunks are loaded perfectly fine accept the one you're supposed to land in, so you spawn in a huge hole which you are hovering in.
    can you/or somebody else help me???

    please!!!
     
  12. Offline

    bergerkiller

    Mercury well I decided to ignore Spout in it's entirely, so it won't even cache the chunks right now. (although, what does it cache, the compressed chunk data?)

    crafteroni This happens all the time?
     
  13. Offline

    crafteroni

    no not always, but very often, not only to me but also to other players
    it especially happens with portals that teleport you fare away, if you want, you kann come on my server one day and i'll show you
     
  14. Offline

    bergerkiller

    rtcabooservb Did you have the lighting fixer enabled? I think I got it resolved, but need to be sure that is the cause.
    (Reply to your error posted a page ago)

    crafteroni I'll first try and fix all existing issues...
     
  15. Offline

    migsthegod

    causes server crashes?
    rb 1818
    Code:
    2012-01-26 19:04:31 [SEVERE] java.lang.NullPointerException
     
    2012-01-26 19:04:31 [SEVERE]    at org.bukkit.event.world.ChunkEvent.<init>(ChunkEvent.java:13)
     
    2012-01-26 19:04:31 [SEVERE]    at org.bukkit.event.world.ChunkUnloadEvent.<init>(ChunkUnloadEvent.java:16)
     
    2012-01-26 19:04:31 [SEVERE]    at net.minecraft.server.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:241)
     
    2012-01-26 19:04:31 [SEVERE]    at net.minecraft.server.World.doTick(World.java:1728)
     
    2012-01-26 19:04:31 [SEVERE]    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:523)
     
    2012-01-26 19:04:31 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
     
    2012-01-26 19:04:31 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
     
    2012-01-26 19:04:31 [SEVERE] Unexpected exception
     
    java.lang.NullPointerException
     
        at org.bukkit.event.world.ChunkEvent.<init>(ChunkEvent.java:13)
     
        at org.bukkit.event.world.ChunkUnloadEvent.<init>(ChunkUnloadEvent.java:16)
     
        at net.minecraft.server.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:241)
     
        at net.minecraft.server.World.doTick(World.java:1728)
     
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:523)
     
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
     
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    
     
  16. Offline

    bergerkiller

    migsthegod do you have chunk lighting fixing enabled? if yes, disable it, does that (temporarily) fix the issue or not?
    Next version will probably fix it if this worked.
     
  17. Offline

    rtcabooservb

    No, I use the default config. Fix lighting is off.

    bergerkiller I am now using the version I quoted you above. Still waiting on the other fixes though. I am convinced it was nolagg that crashed the server last night because the two errors I posted were the last two things I received. I could still type /who and use /seen in the console, but players weren't quitting or joining. Plus, people on the website said the server was down and they couldn't connect. Please look into it and update it! D:

    bergerkiller Using the quick update you posted above that I quoted, which still doesn't have all the fixes, I received another error.

    Code:
    2012-01-27 13:55:38 [SEVERE] [NoLagg] An error occurred while sorting a collection:
    2012-01-27 13:55:38 [SEVERE] java.lang.IllegalArgumentException: Comparison method violates its general contract!
    2012-01-27 13:55:38 [SEVERE]    at java.util.TimSort.mergeLo(Unknown Source)
    2012-01-27 13:55:38 [SEVERE]    at java.util.TimSort.mergeAt(Unknown Source)
    2012-01-27 13:55:38 [SEVERE]    at java.util.TimSort.mergeCollapse(Unknown Source)
    2012-01-27 13:55:38 [SEVERE]    at java.util.TimSort.sort(Unknown Source)
    2012-01-27 13:55:38 [SEVERE]    at java.util.TimSort.sort(Unknown Source)
    2012-01-27 13:55:38 [SEVERE]    at java.util.Arrays.sort(Unknown Source)
    2012-01-27 13:55:38 [SEVERE]    at java.util.Collections.sort(Unknown Source)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.sort(ChunkSendQueue.java:324)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.sort(ChunkSendQueue.java:312)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.update(ChunkSendQueue.java:393)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.update(ChunkSendQueue.java:374)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.access$0(ChunkSendQueue.java:336)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue$1.handle(ChunkSendQueue.java:66)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue$Operation.execute(ChunkSendQueue.java:175)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue$Operation.execute(ChunkSendQueue.java:184)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.global(ChunkSendQueue.java:160)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.updateAll(ChunkSendQueue.java:64)
    2012-01-27 13:55:38 [SEVERE]    at com.bergerkiller.bukkit.nolagg.NoLagg$3.run(NoLagg.java:115)
    2012-01-27 13:55:38 [SEVERE]    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    2012-01-27 13:55:38 [SEVERE]    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:502)
    2012-01-27 13:55:38 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
    2012-01-27 13:55:38 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
     
    2012-01-27 13:58:09 [SEVERE] [NoLagg] An error occurred while sorting a collection:
    2012-01-27 13:58:09 [SEVERE] java.lang.IllegalArgumentException: Comparison method violates its general contract!
    2012-01-27 13:58:09 [SEVERE]    at java.util.TimSort.mergeLo(Unknown Source)
    2012-01-27 13:58:09 [SEVERE]    at java.util.TimSort.mergeAt(Unknown Source)
    2012-01-27 13:58:09 [SEVERE]    at java.util.TimSort.mergeCollapse(Unknown Source)
    2012-01-27 13:58:09 [SEVERE]    at java.util.TimSort.sort(Unknown Source)
    2012-01-27 13:58:09 [SEVERE]    at java.util.TimSort.sort(Unknown Source)
    2012-01-27 13:58:09 [SEVERE]    at java.util.Arrays.sort(Unknown Source)
    2012-01-27 13:58:09 [SEVERE]    at java.util.Collections.sort(Unknown Source)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.sort(ChunkSendQueue.java:324)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.sort(ChunkSendQueue.java:312)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.update(ChunkSendQueue.java:393)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.update(ChunkSendQueue.java:374)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.access$0(ChunkSendQueue.java:336)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue$1.handle(ChunkSendQueue.java:66)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue$Operation.execute(ChunkSendQueue.java:175)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue$Operation.execute(ChunkSendQueue.java:184)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.global(ChunkSendQueue.java:160)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.updateAll(ChunkSendQueue.java:64)
    2012-01-27 13:58:09 [SEVERE]    at com.bergerkiller.bukkit.nolagg.NoLagg$3.run(NoLagg.java:115)
    2012-01-27 13:58:09 [SEVERE]    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    2012-01-27 13:58:09 [SEVERE]    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:502)
    2012-01-27 13:58:09 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
    2012-01-27 13:58:09 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    I took out all the players logging in and talking, but could the login have anything to do with the error? CB 1827, Spout 730.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 14, 2016
  18. Offline

    bergerkiller

    rtcabooservb heavily fixing bugs over here. I decided to convert most of NoLagg's code into Util classes (Task and AsyncTask classes), I got tired of all the repeating code everywhere. And, it allows me to share my classes with other plugins, reducing the amount of loaded classes, reducing the amount of 'java permadata space'.
     
  19. Offline

    rtcabooservb

    Any ETA on the fix? Don't rush because I'm impatient to wait. Take your time and get every single bug fixed and tested. If you need testing, I have a server ready with backups.
     
  20. Offline

    ledhead900

    bergerkiller

    Is
    Code:
    2012-01-28 05:23:56 [SEVERE] java.lang.[NullPointerException]
    2012-01-28 05:23:56 [SEVERE] at com.bergerkiller.bukkit.nolagg.sending.ChunkCompressQueue.isAlive(ChunkCompressQueue.java:45)
    2012-01-28 05:23:56 [SEVERE] at
    The lighting or chunk buffer issue I have been reading recently it spams this after a while.

    W8 this errors been fixed in your report I think.

    So what exactly is going on? right now with the build error wise. Is it safe ?

    Alright have a good night.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 9, 2018
  21. Offline

    bergerkiller

    ledhead900 Well this is what is going on. I added a safety check in the buffered chunk loader, which clears the chunk from the 'Bukkit chunk' (a wrapper used by Bukkit). It also sets all internal Buffered chunk fields to null.

    I did this to make sure the chunk object is not stored in some sort of other wrapper class or plugin which doesn't properly dispose the chunk when it unloads, as that plugin then receives the chunk data of another chunk, which easily leads to corruption.

    Now for some reason the chunk provider contains the chunk after it is completely unloaded:
    Code:
    java.lang.NullPointerException
    at org.bukkit.event.world.ChunkEvent.<init>(ChunkEvent.java:13)
    at org.bukkit.event.world.ChunkUnloadEvent.<init>(ChunkUnloadEvent.java:16)
    at net.minecraft.server.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:241)
    at net.minecraft.server.World.doTick(World.java:1728)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:523)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Unexpected exception
    In unloadchunks it tries to obtain a chunk scheduled for unloading and unloads this chunk. Since I dispose my buffered chunk after it gets unloaded (it checks if it is referenced back in the world), it shouldn't be unloaded if it is in there, yet it is. Actually, it shouldn't even be possible that it is in there.

    Now, I don't have these issues, so I suspect some plugin is tampering with the unload coding, storing the chunk temporarily. Is it PTweaks? Nevertheless, I need to make sure the chunk can't possibly be used again after it unloads, as that poses catastrophic results. I might need to re-introduce the chunk to the pool and generate new data (and re-load it) to make sure everything goes right. Unfortunately I can't completely prevent this from happening...

    The chunk lighting fixer DID temporarily create a buffered chunk and set it free again, so I suspected it got added to the world chunk provider, and got rid of the chunk. It now uses several byte arrays (cloned) to read from.

    I need to know what plugins migsthegod was using to properly fix this. If anyone else has similar errors, please post your plugins.
     
  22. Offline

    migsthegod

    Im using:
    anti-pvp logger
    bshortcut
    censorit
    channelchat
    chestshop
    colorme
    deathpenalty
    deathtpplus
    essentials
    essentials spawn
    factions
    iconomy
    jobs
    leaderboard plugin
    lottery
    lwc
    lwc-eco
    mcmmo
    minequery
    remote toolkit
    mobbounty
    mobdisguise
    monsterhunt
    nocheat
    okchat
    pex
    register
    roll
    rtest
    serverlogsaver
    simplehat
    spawneradjuster
    vault
    votifier
    voxelsniper
    wordrank
    worldedit
    worldguard
    xauth
     
  23. Offline

    bergerkiller

    migsthegod so many D:
    And I don't know 2/3 of them...sigh

    Uploaded a beta 1.58.9 on GitHub. It fixes quite a lot of errors previously mentioned, of which:
    It also uses safer threading (all in wrapper classes to prevent confusion and create equality). I also changed the sending order a bit to send more chunks nearby (a 5x5 area now), the 3x3 area of before leaves too many missing chunks behind the player, which can cause weird client issues in the long run.

    Also, I added an exception error in the buffered chunk when it is re-added with empty data. It probably still throws an error now...since I just saw this on the prev page:
    Code:
    2012-01-27 04:46:49 [WARNING] Failed to handle packet: java.lang.NullPointerException
    java.lang.NullPointerException
        at net.minecraft.server.Chunk.addEntities(Chunk.java:612)
        at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:92)
        at net.minecraft.server.PlayerInstance.<init>(PlayerInstance.java:31)
        at net.minecraft.server.PlayerManager.a(PlayerManager.java:53)
        at net.minecraft.server.PlayerManager.addPlayer(PlayerManager.java:102)
        at net.minecraft.server.ServerConfigurationManager.moveToWorld(ServerConfigurationManager.java:288)
        at net.minecraft.server.ServerConfigurationManager.changeDimension(ServerConfigurationManager.java:348)
        at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:287)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:316)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:687)
        at net.minecraft.server.Packet10Flying.handle(SourceFile:126)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:552)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:536)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    That clears up a fair bit, and I also know why the chunk loads. :)

    EDIT

    Too unstable, had to remove it again. I've got a lot to do before I can bring this thing back into the public...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 14, 2016
  24. Offline

    ledhead900


    W8 w8, So I should update and disable chunk buffers ? or risk corruption.
    I think that maybe you are just pushing things too far since there are quite a few things to consider, I always relied on spoutcrafts cache I loved it but that does not work along side this, Prior t the buffer the chunk sending stuff worked well and that was the extra savings we needed.
     
  25. Offline

    bergerkiller

    ledhead900 It's not related to Spout, since it also happened to someone not running Spout. It's a weird internal issue where the buffered unloaded chunk remains in memory, which gets loaded again later on.

    I added some checks in the buffered loader to check if the chunk was actually sent to the buffered chunk loaders' save function after it got unloaded, otherwise plugins that fake chunk_unload events can cause some weird issues.

    See Beta 2 on GitHub. Also, chunk corruption risk is no longer present whatsoever, since it clears all data of the chunk. May something be referencing it, it will probably throw a NPE real soon revealing who it is.

    I'm going to get some sleep (4:14 am lol...)
    https://github.com/bergerkiller/NoLagg/commit/2bca7e03d74f9fd713f60e4ac5c0e05dbf7378d4
    https://github.com/bergerkiller/NoLagg/commit/4f589746c5b431d2398698d9435c94470119fb66
     
  26. Offline

    TehKittyCat

  27. Offline

    Mercury

    http://pastie.org/3270515
    After that server crashed, had to restart.
     
  28. Offline

    SupaYoshi

    Hey can I use your plugin for only TNT caching? I only need that really, I have Multiverse though and Orebfusctator and while using your plguin the server crashes ;)
     
  29. Offline

    bergerkiller

    TehKittyCat I know of CB++, but I have higher hopes for the new Spout server they are making. TBH, CraftBukkit is a nice implementation, but it does not serve the right to be an API. It's too closed-source, uses wrappers instead of the actual classes to interact, generates arrays EVERY SINGLE TIME to allow a plugin to obtain the entities or players. It, simply put, is one huge fortress built around a bucket of water. Want to put lava in the bucket? You'll first have to go through the fortress with endless Java reflection calls.

    As soon the Spout server is alive and running I will probably stop developing for CB and move all of my plugins to Spout. And no, the Spout server does not require the Spoutcraft mod.

    SupaYoshi See the configuration (config.yml), you can set everything in there. You probably want to disable the chunk buffering, as that currently has some issues...

    Mercury yup that is the issue that still exists and which needs fixing.
     
    Inscrutable likes this.
  30. Offline

    SupaYoshi

    bergerkiller, Is that the one you recommend using for people with Multiverse?

    BTw yesterday I had this error while using your plugin, forcing me to remove it:


    Code:
    2012-01-28 02:18:31 [SEVERE] java.lang.NullPointerException
    2012-01-28 02:18:31 [SEVERE]    at org.bukkit.event.world.ChunkEvent.<init>(ChunkEvent.java:13)
    2012-01-28 02:18:31 [SEVERE]    at org.bukkit.event.world.ChunkUnloadEvent.<init>(ChunkUnloadEvent.java:16)
    2012-01-28 02:18:31 [SEVERE]    at net.minecraft.server.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:241)
    2012-01-28 02:18:31 [SEVERE]    at net.minecraft.server.World.doTick(World.java:1728)
    2012-01-28 02:18:31 [SEVERE]    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:523)
    2012-01-28 02:18:31 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
    2012-01-28 02:18:31 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    2012-01-28 02:18:31 [SEVERE] Unexpected exception
    java.lang.NullPointerException
        at org.bukkit.event.world.ChunkEvent.<init>(ChunkEvent.java:13)
        at org.bukkit.event.world.ChunkUnloadEvent.<init>(ChunkUnloadEvent.java:16)
        at net.minecraft.server.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:241)
        at net.minecraft.server.World.doTick(World.java:1728)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:523)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Plugins:
    Orebfuscator, FoundBoxx, GroupManager, Minequery, WorldEdit, SimpleTips, Buycraft, SpamGuard, Vault, Multiverse-Core, CombatTag, TreeAssist, WorldGuard, ObsidianDestroyer, NoPortals, Register, Permissions, ObsidianFlow, OpenInv, mcbans, ChestShop, UnderWaterTNT, NoCheat, Votifier, MonsterBox, mcMMO, Essentials, WorldBorder, Citizens, EssentialsProtect, EssentialsSpawn, Multiverse-Portals, dynmap, EssentialsChat, Factions

    Nolagg settings ;)
    Code:
    # Sets if and how many items are buffered per chunk
    bufferItems: false
    maxItemsPerChunk: 40
    bufferTNT: true
    tntDetonationInterval: 1
    tntDetonationRate: 10
    explosionRate: 5
    useSpawnLimits: false
    spawnlimits:
      default:
        mob: 1000
    useChunkUnloadDelay: true
    chunkUnloadDelay: 5000
    formItemStacks: false
    stackRadius: 1.0
    stackThreshold: 2
    ignoredItemTypes:
    - DIAMOND_PICKAXE
    autoSaveInterval: 400
    updateInterval: 20
    monitorInterval: 40
    autoFixLighting: true
    useBufferedChunkLoading: true
    chunkSending:
      enabled: false
      minRate: 0.25
      maxRate: 2.0
      triggerRate: 0.5
      sendThreadCount: 2
    
    Last but not least, ;) I wanna disable POTION STACKING by adding some stuff like, to ignoreditemTypes, like DIAMOND_PICKAXE, but can I add em like this?:

    Code:
    ignoredItemTypes:
    - DIAMOND_PICKAXE
    - 373:16378
    - 373:16385
    - 373:16386
     
    NOTE: THIS IS AN EXAMPLE, can i use ID's, do I need
    to put all IDS in? I need to disable potion stacking
    cus I have a PVP server. Also people have HUGE FARMS
    which make the server tick rate go down ;)
    SO please help me :) hehe
     
  31. Offline

    bergerkiller

    SupaYoshi does it stack potions then? Last time I checked it didn't stack them. (it stacks the potion bottle, but that is obvious, it can be stacked naturally as well)

    And AFAIK it doesn't look for sub-ids for ignored item types, only the main type. (373)

    It doesn't stack filled bottles.

    EDIT

    Since you also have that error, what CraftBukkit version do you use? Do you use CraftBukkit++?

    Uploaded beta 3. It will prevent that error when an unloaded chunk ends up in the chunk provider: it also outputs a stacktrace to find out from where this chunk was coming. When loading a discarded chunk, it will find out it has no data and it will initialize itself all over again, loading from the buffered chunk loader.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 14, 2016

Share This Page