Inactive [SEC] AntiXRay v0.6.10 - protecting ore from XRay mod and transparent texturepacks [1000]

Discussion in 'Inactive/Unsupported Plugins' started by asdaarg, Apr 11, 2011.

  1. Offline

    asdaarg

    AntiXRay
    Version:v0.6.10

    Reporting Errors the follow things have to be mentioned:
    • CB Version and AXR version
    • Whether you started the AXR version with a fresh ore file or not (doing /axr off before upgrade)
    • If not, since what version you've been using the same ore file.
    • If you get any errors in console, check the debug.log for "Error"s and "Warning"s. and post those.

    Upcoming features for 0.7:
    - AXR Chest chest hiding feature developed by MrSelfDestrukt
    - New advanced visibility test (almost done, only need to test it now and decide whether its going to replace or be an alternative to the original light based test) Details here and here



    Description:

    AntiXRay hides ores from players by turning them into stone until they have been exposed, thus making it impossible for any client side hacks to detect them, as their location is not sent to the client.

    Backup your world(s) I cannot guarantee that ore doesn't disappear from them due to this plugin. Even if you did not backup, there is a foolproof solution here. If you decide to uninstall, type /axr off, and not delete the ore data file before your ore is restored unless your intention is to strip your worlds from ore.



    Downloads:
    If you upgrade from 0.5.21 it is recommended that you do /axr off first flush out errors from the ore file. If you do not have enough RAM, you can do this in steps using 0.6.9 but you need to set lenient=true in the config file to allow the file to be loaded
    NSCommand <-- Required
    AntiXRay
    Source and old versions

    Features:
    - Specify what ores to hide(works with non ore blocks too as long as they don't use data values or extra data such as chests and signs (use some chest locking plugin for keeping your chests from xrayers)
    - Multi world support
    - Permissions support
    - Stores ore data in binary files (one per world) and only keeps data about loaded chunks in physical memory. It is on average 400 bytes per chunk in and guesstimatedly around 450 in physical memory, so it is reasonably small, but some people might play on huge worlds and want to conserve memory.
    - Saves data about chunks immediately on any changes (they are assumed to be by far sufficciently rare that any performance is won by buffering is neglible. As such it also prevents potential ore duplication on server crashes)
    - chunk and world statistics
    - ingame map of loaded chunks
    - background processes that does not freeze the server
    - dump ore statistics into file and compare them to see the changes in ore content.
    - lots of configuration options

    Ores will become visible under any of these circumstances:
    - A surrounding block is lit by torch and player is within the chunk or adjacent chunk and within 16 blocks to player on Y axis.
    - A surrounding block is lit by a third block broken falling or removed by explosion and player is within the chunk or adjacent chunk and within 16 blocks to player on Y axis (occurs once every 2 seconds, but configurable).
    - A surrounding block is broken or falls or removed by explosion
    - A surrounding block is changed by another plugin (can be cpu intensive if you worldedit a big area for instance - might do a workaround for this)

    Current Limitations:
    - Ores at light level above pitch black on chunk generation will not be hidden e.g. near lava or surface cave entrances.
    - Ores will not be found exploring caves in pitch black (who does that anyway?) These two limitations was to allow a light based visibility test that relies on a test already built into the server, thus avoiding extra performance overhead as well as headache of coding it myself. Despite these limitations, AntiXRay should make it far beyond pointless to search for ores using XRay or transparent textures.
    - Gravel and sand dropping on chunk generation may expose ore. This is assumed to be rare enough to have neglible effect.
    - The data file will not repack itself. The ratio between generated ore and mined ore is assumed to be very high, and the file size is considerably small but nonetheless, should you want to "repack" it, just turn axr off and on and the new file will be smaller excluding the gaps between chunk entries. But again, do some basic math and count the amount of ore blocks mined in total, multiply that by 2 bytes. After a month of mining 10000 ore blocks, you shaved 20k off that 3M file.
    - If you place a torch there is a tiny delay as seen in the video due to client side prediction and lag between the time the info of the ore to get back to the client from the server. This can seem unnatural so I might make a better vision test later that doesn't rely on light. However it would be more expensive in terms of cpu cycles.
    - If you have a slow server or a lot of players, you might want to remove coal from the config list. It speeds it up at least 200%. There are some optimizations I can do that I might add later that will speed up things further.

    Commands:

    /axr on - hides all unlit ore
    /axr off - reveals all hidden ore (and deletes the data file!)
    /axr on <world> - hides all unlit ore in specified world
    /axr off <world> - restores ore in specified world
    /axr worlds - world statistics
    /axr chunk - chunk statistics at chunk player is on
    /axr chunk <x> <z> - chunk statistics at specified chunk
    /axr map -shows map of loaded chunks in current world
    /axr map <world> -shows map of loaded chunks in specific world
    /axr map <zoom>
    /axr map <world> <zoom>
    /axr map <x> <z>
    /axr map <world> <x> <z>
    /axr map <zoom> <x> <z>
    /axr map <world> <zoom> <x> <z>
    /axr show
    /axr show <world>
    /axr hide
    /axr hide <world>
    /axr dump <world> <file>
    /axr diff <filein1> <filein2> <fileout>
    /axr gen <world> <x1> <z1> <x2> <z2> command for generating a rectangular area of chunks
    /axr gen copy <world1> <world2> command for generating all the chunks in world2 that are registered in world1
    /axr pack <world> - removes dead space in ore file (not that there is much from just mining but the axr chest will create significant amount of dead space.
    Auto-backup, that will backup your ore file on startup
    /axr backup <world> - backs up the ore file of the world if and only if the file passes the corruption test
    /axr test <world> - test the ore file and memory for errors for a specific world
    /axr test - test the ore file and memory for errors for all worlds
    /axr mirrorworld <world1> <world2> - creates a world world2 with the same seed as world1.
    These functions are not recommended for use unless you know what you're doing: (they can be destructive of tile entites)
    /axr chunk regen - regenerate chunk (to as it was when world was initially generated)
    /axr chunk regen <x> <z> - same but for specified chunk
    /axr chunk regen <x1> <z1> <x2> <z2> - same but for axis aligned rectangular area
    /axr chunk regen ore - only regenerate ores in chunk at player position
    /axr chunk regen ore <x> <z> - same but for specified chunk
    /axr chunk regen ore <x1> <z1> <x2> <z2> - same but for axis aligned rectangular area

    Note about regeneration: ores, trees, flowers and mushrooms are random each time and not tied to world seed (bukkit/mc issue)

    permissions:

    antixray.axr.on
    antixray.axr.off
    antixray.axr.worlds
    antixray.axr.chunk
    antixray.axr.chunk.regen
    antixray.axr.chunk.regen.ore
    antixray.axr.map
    antixray.axr.show
    antixray.axr.hide
    antixray.axr.dump
    antixray.axr.diff
    antixray.axr.gen
    antixray.axr.gen.copy
    antixray.axr.test
    antixray.axr.pack
    antixray.axr.backup
    antixray.axr.mirrorworld
    config.txt:

    timerms - the time between light check by broken third block in milliseconds.
    maxdep - buffer size for number of ores that can occur in a chunk - don't change unless you have another plugin that adds tons of ore.
    maxheight - is the number of Y-levels in your map.
    ChunkFileBuffer - sets how much is buffered for new chunks to be stored until the index is rewritten (at the end of the file.)
    Materials - what ores you want to hide. (has to have same number of elements as maxys)
    maxys - the first Y level from bottom they cannot occur at. (has to have same number of elements as Materials)
    worlds - what worlds are loaded at startup (comma separated)
    autostart=all (normal) worlds are loaded at startup (unless CFGworlds is set)
    nounload = keeps all ore data in physical memory
    debug - turning on writes to a debug file keeping track of important info that may be needed to solve bugs or figure out why lag occurs
    fileindexdebug - turning on debug file needed as a quick check of the consistency of your ore file
    mapcol - the chatcode colour of each type of block in ascending order, shown in /axr map
    mapwidth - the width of the map shown in /axr map
    mapheight - the height of the map shown in /axr map
    schedulerload - 0-100 percentage of time going to execute any background process.
    schedulerstatustimer - time in millisecs between each status report of a background process
    filterorenotinstone - filters ore upon exposition that is not in stone (can be used to restore ore from a backupped ore file or ore file generated from a fresh world with same seed)
    autorepack - pack ore files automatically at startup - on by default
    autobackup - backup ore files automatically at startup(requires autorepack) - on by default
    maxfaces - specify max amount of exposed faces per chunk before error occurs
    lenient - ignore lindex errors when loading file (useful if you have them from before and want to filter them out)
    All CMD_... options are for redefining the commands so you can type something else.


    changelog:
    v0.6.10
    • Fixed Array index out of bounds in listindex accessing materials that has not been loaded yet.
    v0.6.9
    • Added /axr mirrorworld <world> <mirrorworld> command
    v0.6.8
    • Fixed NPE when trying to expose ores in world hole.
    v0.6.7
    • checking whether wrong file exist during repack.
    v0.6.5
    v0.6.6
    • fixed NPEs in some commands that can occur if you use it and the world is off.
    v0.6.5
    • fixed open file pointers during repack.
    v0.6.4
    • fixed NPE during repack when load fails.
    v0.6.3
    • fixed NPE when running test on all worlds and not all worlds are on
    • added various memory checks and chunk data entry overwrite checks
    v0.6.2
    • fixed NPE when trying to flush the debug file when debug file is turned off.
    v0.6.1
    • added lenient config option to ignore lindex errors when loading file (useful if you have them from before and want to filter them out)
    • added more information on error when loading from file
    • added config option maxfaces to specify max amount of exposed faces per chunk before error occurs
    v0.6
    • /axr off now gradually unregisters chunks - as a workaround to what appears to be a problem with chunks not getting fully removed from memory despite trying both unloadchunk calls through bukkit. This allows one to shut down the server and continue restoration after a restart if one does not have enough RAM
    • /axr pack <world> - removes dead space in ore file (not that there is much from just mining but the axr chest will create significant amount of dead space.
    • /axr backup <world> - backs up the ore file of the world if and only if the file passes the corruption test, also packs the new file.
    • /axr test <world> - test the ore file and memory for errors for a specific world
    • /axr test - test the ore file and memory for errors for all worlds
    • autorepack config option - pack ore files automatically at startup (if and only if the file passes the corruption test) - on by default
    • autobackup config option - backup ore files automatically at startup(if and only if the file passes the corruption test, and also requires autorepack) - on by default
    • new .ore extension for ore files (rename your old files)
    • removed glowing redstone ore from default ore list (never occurs naturally anyway)
    • fixed faulty scanning issue
    • fixed hopefully last exposed ore face index error
    • fixed false positive in memory check
    • debug.log flushed when error occurs (it is otherwise flushed once in a period of time)
    • more details in debug log when error occurs
    • removed lindex spam in debug log until lindex error occurs
    v0.5.21
    • Fixed /axr gen not triggering scan anymore
    • Fixed /axr gen not unloading chunks
    • Fixed (workaround) huge memory leak during /axr off /axr show /axr hide and /axr gen caused by bukkit's unloadchunk function
    v0.5.20
    • Additional file corruption checks that will make noise as soon as something goes wrong
    v0.5.19
    • Fixed another potential index derangement bug.
    v0.5.18
    • Fixed array out of bounds exception during previous fix
    v0.5.17
    • Fixed a couple of bugs offsetting exposed ore face indicies when mining adjacent block potentially causing array out of bounds exceptions at a later stage and the revealing of wrong ores when exposed to light.
    • Added debug logging of exposed ore face indices when found, as well as fault intolerant check that will warn you about any corruption of the indices after the event.
    v0.5.16
    • fixed half of ore not being hidden when a chunk is generated on load.
    • removed various unnecessary details to be logged in debug.log
    v0.5.15
    • fixed bug restoring ore, hiding and showing in wrong world
    • revert hack to set block material of a chunk to physical updates due to lacking javadocs to figure out what function to call
    v0.5.14
    • Switched to non physics updating block material setting hack
    • Updated to #733
    v0.5.13
    • Added detailed debug logging of background processes.
    • removed logging of filepointer
    v0.5.12
    • fixed failed scan after /axr gen unloading chunks that were originally not loaded, consequently also /axr gen causing server to freeze and timeouts on clients.
    v0.5.11
    • fixed /axr gen not unloading chunks that were originally not loaded
    v0.5.10
    • /axr gen and /axr gen copy now actually usable
    v0.5.9
    • ore in stone filter now also applies to /axr off and /axr show (not just when it is found by light detection)
    v0.5.8
    • added /axr gen command for generating a rectangular area of chunks
    • added /axr gen copy command for generating all chunks that are registered in another world
    v0.5.7
    • Configuration option CFGfilterorenotinstone implemented, that allows filtering of ores not in stone (can be useful in recovering lost ore from a world with the same seed)
    v0.5.6
    • fixed ore regen not working when axr is off in that world
    • removed physics lock spam
    v0.5.5
    • fixed more concurrency errors during background processes (hopefully for the last time)
    v0.5.3
    • fixed more concurrency errors during background processes
    v0.5.2
    • fixed concurrency errors during background processes
    v0.5.1
    • fixed debug off in config file causing unable to start (again! although different place now)
    v0.5
    • ore stats dump - listing all chunks ore counts into a text file
    • ore stats diff - showing difference between two ore stats dump files (these two tools are useful if you are worried that your ores might disappear)
    • show command - reveals the ore but does not unregister them or delete the file
    • hide command - hides again ore that was revealed with show.
    • show, hide and ore stat dump are background processes that does not freeze the server.
    • axr off is now a background process
    • load percentage of background processes can be configured
    • specify map zoom and center
    v0.4.1
    • Fixed file index debug listing not showing
    • file index debug listing can be turned off in config.txt (fileindexdebug)
    • area regeneration functions now tolerate any two coorner in rectangle in any order.
    • fixed debug off in config file causing unable to start
    v0.4
    • added axr map command for showing map of loaded chunks
    • fixed light expose unmapped material (probably why you got grass/smooth stones)
    • fixed light expose restored block being block at exposed face
    • fixed light expose no chunk location offset (why you got it at spawn)
    • fixed exposed face location wrong axis (probably floating blocks)
    • removed unnecessary cacheing of chunks at startup by not using chunks as keys for file index(probably solve memory problems for large worlds)
    • bypassing unnecessary cacheing of blocks using minecraft hackery.
    • revised scan algorithm, bypassing bukkit wrapcode resulting in at 5-10 times faster scanning.
    • fixed queries on unloaded sidechunks during scan resulting in loading and even generation of chunks that on top of it due to eventlock get ignored by onChunkLoad, thus leaving chunks of unhidden ore.
    • fixed light expose filling 0s after removed index
    • probably more bug fixes, can't remember them all
    v0.3.3
    • world statistics: type axr world - shows also what worlds are on/off
    • chunk statistics when axr is off no longer causes world to be registered without any chunks being loaded
    • axr on doesn't show NaN when there is nothing to hide
    • proper colouring
    • empty chunks are no longer ignored.
    v0.3.2
    • Fixed potential ore type shift bug
    • Moved listindex before file is loaded so debug info can be displayed even if it crashes while loading.
    • added rectangular area regen functions
    v0.3.1
    • Fixed silly nullpointer exceptions
    v0.3
    • Specify what worlds to turn on and off
    • Specify what worlds to load at startup
    • option to keep all ore data in memory
    • chunk statistics (useful for checking that your ore doesn't disappear or duplicate)
    • chunk regenertaion (restore a chunk to state at world generation)
    • chunk ore regenertaion (restore only ore)
    v0.2.5
    • Fixed some other bugs related to exposed-face-to-ore index
    • Index debug file working again (it was still expecting 0.1.5 files)
    • Added potential ore file corruption warnings to debug file output
    v0.2.4
    • Fixed bug locating exposed-face-to-ore index elements having no array bounds check.
    v0.2.3
    • Fixed bug exposed-face-to-ore index elements not being removed
    v0.2.2
    • Fixed bug exposed-face-to-ore index not being updated when ores are recovered and removed from hidden ore list (new bug in 0.2)
    • Fixed bug at y levels above 128-16 looking for ores above the map
    v0.2.1
    • Uses NSCommand now (it did right from the start but its now a separate plugin)
    • auto-creation of config files
    • defaults to ops only when permissions is not present
    v0.2
    • Light detection optimization based on a separate list of faces exposed to nonsolid materials (this might not work with all materials yet such as stairs and singlesteps, but its not like the world generator puts them in the caves anyway) resulting in at least 10 times faster execution of light checks. This should reduce all lag that's not due to scanning new chunks for ore.
    • Once again more detailed debug log
    v0.1.5
    • Fixed bug in ore restoring function causing large veins of ore to be generated out of nothing
    • More detailed debug log
    v0.1.4
    • Removed file corruption check that's hogging up some cpu cycles during file load and write events (the latter occured during scan event) - so this should speed up scan events.
    • pseudo error "load error 1" moved to debug log.
    • Added 1 tick delay of scan in onload event since it appears bukkit fires it before the chunk is populated with ore. This fixed the bug of ore appearing if you teleport or walk far away from initially scanned chunks.
    • removed physics event logging since it appears to always be neglible.
    • Added message at startup informing you about the waiting time of scanning all loaded chunks may take a while.
    v0.1.3
    • Fixed bug starting server without plugin data folder causing it unable to write debug file
    • Added more debug file details (when its scanning, loading from file, or just loading from memory when neither is shown)
    • Those who who don't hide coal, should experience faster chunk scanning now
    v0.1.2
    • Fixed bug due to player location being null for some weird reason
    • Added debug logging of time spent on the main time consuming procedures.
    v0.1.1
    • Fixed config file not loading properly
    • Removed wtfexception spam
    v0.1
    • Initial Release
    Donate (Not necessary but appreciated)
     
  2. Offline

    asdaarg

    Sorry, my bad, fixed now, I think.
     
  3. Offline

    Magesblood

    Thank you. Dl'ing now. works now.
     
  4. Offline

    ntwitch

    Perhaps you are trying the command from the console? As far as I know, the AntiXRay commands only work from a player ingame. At least, I encountered that problem with /axr off and /axr on.

    P.S. @Asdaarg: Can you fix this so we can do commands from the console?
     
  5. Offline

    asdaarg

    Actually I made a little mistake, but should be working now. I'll see if I can make the commands work in the console.
     
  6. Offline

    Magesblood

    Newest version of CB for MC 1.5 gives this error.

    Code:
    [Lnet.minecraft.server.Statistic;@239cf00a
    146 recipes
    [Lnet.minecraft.server.Statistic;@239cf00a
    16 achievements
    14:07:36 [INFO] Starting minecraft server version Beta 1.5_02
    14:07:36 [INFO] Loading properties
    14:07:36 [INFO] Starting Minecraft server on *:25565
    14:07:36 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-672-g5034311-b703jnks (MC: 1.5_02)
    14:07:36 [INFO] Preparing level "PvP"
    14:07:36 [INFO] Preparing start region
    14:07:37 [INFO] Preparing spawn area: 4%
    14:07:38 [INFO] Preparing spawn area: 16%
    14:07:39 [INFO] Preparing spawn area: 24%
    14:07:40 [INFO] Preparing spawn area: 36%
    14:07:41 [INFO] Preparing spawn area: 48%
    14:07:42 [INFO] Preparing spawn area: 61%
    14:07:43 [INFO] Preparing spawn area: 73%
    14:07:44 [INFO] Preparing spawn area: 89%
    14:07:45 [INFO] AntiXRay version 0.5.10: Permissions not detected.  Ops only
    14:07:45 [INFO] AXR: Loading/Scanning Chunks - Please Wait. This may take anything from a few seconds to several minutes depending on how many chunks
    are loaded
    14:07:45 [SEVERE] net.minecraft.server.Chunk.a(III)I loading AntiXRay v0.5.10 (Is it up to date?)
    java.lang.NoSuchMethodError: net.minecraft.server.Chunk.a(III)I
            at com.asdaarg.bukkit.antixray.MineHack.getChunkBlockId(MineHack.java:23)
            at com.asdaarg.bukkit.antixray.BChunk.Scan(BChunk.java:91)
            at com.asdaarg.bukkit.antixray.AWorld.Load(AWorld.java:177)
            at com.asdaarg.bukkit.antixray.AntiXRay.axr_on(AntiXRay.java:275)
            at com.asdaarg.bukkit.antixray.AntiXRay.CMD_axr_on(AntiXRay.java:207)
            at com.asdaarg.bukkit.antixray.AntiXRay.onEnable(AntiXRay.java:89)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:584)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    14:07:45 [INFO] NSCommand 0.2 enabled.
    14:07:45 [INFO] Done (0.897s)! For help, type "help" or "?"
    >
     
  7. Offline

    The PC Tech Guy

    @Magesblood

    Maybe you shouldn't post up errors unless it's a RB you're using. Use MC 1.4 and CB 684 (assuming you backed up the minecraft_server.jar file).
     
  8. Offline

    asdaarg

    Yeah, its not 1.5 compatible yet.

    Edit: The bukkit people have gone and renamed the functions I carefully tried to figure out what they did since they used to be named "a" "b" "d" etc..
     
  9. Offline

    RazMaTaz

    for the command /axr gen copy <world1> <world2>

    What is the definition of Registered Chunks?

    Doing some experimenting with the regeneration/restoration procedure and had some questions.

    I installed Multiverse to import the world after making a copy of the world folder and deleting the region folder.

    I made sure Multiverse was working by TP to back and forth to both worlds. I then did a /axr gen copy MysticForest M1

    I wish I had kept my command log a little better because I'm not sure how many chunks it generatied.

    Next was /axr on M1 , it went through 1235 chunks and said it had hidden 315414 ores in 1235 chunks.

    Next was /axr worlds
    It reported that MysticForest had 1355 registered, 393 axr loaded 393 mc loaded and
    M1 1235 registered 1235 axr loaded 1235 mc loaded.

    Whats the difference in the registered amounts? That's why I'm asking what registered really means.

    Afterwords, I stopped the server, changed ore files (didn't do anything with indexes now that I think of it), started back up and did /axr off on the MysticForest world. Thought all was well, shutdown and fired up mine xray to take a look and noticed some oddites, still looking into that btw. I'll report more on that later If I think its an issue, right now I think I'm not doing something correctly.

    So I did it again, deleted the region folder started the server, logged in and did the gen copy again, this time with different results, (witch afterwords only looked like where I was standing) got generated. So I thought I would try the
    /axr gen world -125 -125 125 125 command..

    after that I could no longer issue commands, no status etc and got a console error. And it sorta looks out of order (I mean the RazMage tried command line versus the errors.

    Show Spoiler
    Code:
    2011-04-21 18:22:14 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:22:19 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:22:24 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:22:29 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:22:33 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:22:37 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:22:41 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:22:45 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:22:49 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:22:53 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:22:57 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:23:01 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:23:05 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:23:09 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:23:14 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:23:19 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:23:24 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:23:33 [INFO] More than 1000000 updates, aborting lighting updates
    2011-04-21 18:26:01 [SEVERE] null
    java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.asdaarg.bukkit.NSCommand.NSCmdCatNode.call(NSCmdCatNode.java:48)
        at com.asdaarg.bukkit.NSCommand.NSCmdCatNode.call(NSCmdCatNode.java:63)
        at com.asdaarg.bukkit.NSCommand.NSCmdCatNode.call(NSCmdCatNode.java:63)
        at com.asdaarg.bukkit.NSCommand.NSCommand.Command(NSCommand.java:219)
        at com.asdaarg.bukkit.NSCommand.NSCommand$1.onPlayerCommandPreprocess(NSCommand.java:43)
        at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:228)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
        at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:618)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:589)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:583)
        at net.minecraft.server.Packet3Chat.a(SourceFile:24)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.OutOfMemoryError: Java heap space
        at java.util.HashMap.addEntry(HashMap.java:808)
        at java.util.HashMap.put(HashMap.java:416)
        at java.util.HashSet.add(Unknown Source)
        at net.minecraft.server.World.c(World.java:900)
        at net.minecraft.server.BlockSand.e(SourceFile:17)
        at net.minecraft.server.Chunk.a(Chunk.java:307)
        at net.minecraft.server.World.setTypeId(World.java:235)
        at net.minecraft.server.WorldGenMinable.a(SourceFile:57)
        at net.minecraft.server.ChunkProviderGenerate.a(SourceFile:463)
        at net.minecraft.server.ChunkProviderServer.a(ChunkProviderServer.java:176)
        at net.minecraft.server.ChunkProviderServer.c(ChunkProviderServer.java:103)
        at org.bukkit.craftbukkit.CraftWorld.loadChunk(CraftWorld.java:224)
        at org.bukkit.craftbukkit.CraftWorld.loadChunk(CraftWorld.java:114)
        at com.asdaarg.bukkit.antixray.AXRUtil$6.run(AXRUtil.java:525)
        at com.asdaarg.bukkit.antixray.AXRUtil.autoSchedule(AXRUtil.java:334)
        at com.asdaarg.bukkit.antixray.AXRUtil.Generate(AXRUtil.java:520)
        at com.asdaarg.bukkit.antixray.AntiXRay.CMD_axr_gen(AntiXRay.java:498)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.asdaarg.bukkit.NSCommand.NSCmdCatNode.call(NSCmdCatNode.java:48)
        at com.asdaarg.bukkit.NSCommand.NSCmdCatNode.call(NSCmdCatNode.java:63)
        at com.asdaarg.bukkit.NSCommand.NSCmdCatNode.call(NSCmdCatNode.java:63)
        at com.asdaarg.bukkit.NSCommand.NSCommand.Command(NSCommand.java:219)
        at com.asdaarg.bukkit.NSCommand.NSCommand$1.onPlayerCommandPreprocess(NSCommand.java:43)
        at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:228)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
        at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:618)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:589)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:583)
    2011-04-21 18:26:01 [SEVERE] Exception in thread "Thread-15" Exception in thread "Listen thre
    2011-04-21 18:26:01 [SEVERE] ad" 
    2011-04-21 18:26:01 [SEVERE] java.lang.OutOfMemoryError: Java heap space
    2011-04-21 18:26:01 [SEVERE]     at java.lang.StringBuilder.toString(Unknown Source)
    2011-04-21 18:26:01 [INFO] RazMage issued server command: axr gen M1 -125 -125 125 125
    2011-04-21 18:26:01 [SEVERE]     at net.minecraft.server.NetworkManager.<init>(NetworkManager.java:62)
    2011-04-21 18:26:01 [SEVERE]     at net.minecraft.server.NetLoginHandler.<init>(NetLoginHandler.java:21)
    2011-04-21 18:26:01 [SEVERE]     at net.minecraft.server.NetworkAcceptThread.run(SourceFile:49)
    2011-04-21 18:26:01 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-04-21 18:26:10 [INFO] RazMage lost connection: disconnect.endOfStream
    Show Spoiler


    I'm posting this for one to check myself in order of operations so I can do this in a timely manner on the production server, and know how to do it correctly.. :)

    Hope this helps, feel free to tell me I did something wrong!:)

    Btw- my test machine is a Windows7 Ultimate 64bit, 16 Gigs ram, Intel i-2600k cpu running at normal 3.8 speeds(turbo)

    Tia
     
  10. Offline

    asdaarg

    Registered chunk is basically a chunk axr has ore data about. It can be loaded or not loaded (in the latter case it is only on disk.) It looks like you did step 6 before step 5. You have to do /axr gen while axr is on, or it wont ensure all chunks get scanned. /axr gen world -125 -125 125 125 might be a bit of overkill, and so you ran out of memory. Maybe do it in smaller steps.

    Edit: There's a bug that prevents axr gen from unloading chunks that were not loaded from the start, which is why you ran out of memory, fixed now.
     
  11. Offline

    RazMaTaz

    Will try again this weekend for sure !:)
     
  12. Offline

    Magik

    ughhhh plugin is making server use 100% cpu, and eventually just locks it up CB#677

    now I'm trying to remove the plugin, and I want to turn off the anti-xray, so i restart the server, and log in and try to use /axr off - and then it just lags the server out again.... =(

    what do you recommend as a way to get rid of the plugin safely and retain my ores?

    also after waiting a bit after using /axr off, I get this in console:

    19:55:47 [INFO] Read timed out
    19:57:20 [INFO] More than 1000000 updates, aborting lighting updates

    it'd be nice if i could do this from the console.... as it seems logging in starts some chain of events that cause immense lag...

    edit:
    ok, so I finally got /axr off to work - i just had to log into the server and let axr get it's chunk loading done and then i did the /axr off and it responded with the messages about it fixing the chunks. And now I think I've safely removed the plugin and retained my ores ( hopefully.... )

    and here's a link to my debug.log - jesus christ 18 megs after only a couple days?
    http://mc.slaps.me/debug.log
     
  13. Offline

    asdaarg

    Thanks for the feedback. I'm looking at the log, but there doesn't seem to be anything unusual going on, the numbers seems reasonable. Was there constant lag, periodic or just lag spikes, and under what circumstances? Did it grow and become worse with time?

    Edit: I just saw you mentioned logging in, yes that can cause lag when you log in at a place that hasn't been scanned for ores yet. There isn't really much I can do about that except delay the scanning however that opens up the possibility of ore locations leaking out. The scanning algorithm is pretty much as optimized as it can get now. Anyways, once everybody has logged in once, it should not occur, unless you teleport greater distances into new areas or new worlds (new meaning areas that has not been scanned yet).
     
  14. Offline

    Magik

    when I first installed the plugin, the server was empty, so I tried it out a bit, didn't seem to have excessive lag or anything.

    The server has been a bit empty since the 1.5 update, but today there were 2 people on - and I go to check the server stats, and it's running at around 70% cpu usage ( core i7, just one core though ). I drop into my minecraft console and notice numerous Can't keep up messages.

    So I check on dynmap to see if the 2 guys are in any new areas or anything - I've seen some lag related to chunk generation sometimes when a lot of people are exploring new areas. But they don't seem to be anywhere out of the normal. It was definitely not crashing at this point. So I try to log on myself to start trying some /axr commands, and that's when the shit hit the fan. I tried to log in, and the server just grinds to a 100% cpu halt and eventually all the connections time out and everyone gets dropped.

    Also, while the 2 guys were on the server, I did a tail -f debug.log on your debug log and notice it doesn't seem to be doing anything out of the ordinary - just some periodic light checks, and every now and then the chunk load/unload messages.

    After logging in and trying to see if I could tell anything with /axr, like I said above it just ground to a halt. I eventually had to kill -9 the java proc to get it to stop. At this point the console was slightly responsive, but would not produce any result messages of anything - but it would drop to the new line with a >

    I then restarted the server, and would try to log in and immediately type /axr off. At this point it again would grind to a halt, and when I checked the debug.log, it was producing a lot of these types of messages:

    2011.04.22 08:04:25 [fp:930799]

    I tried to allow it to run, thinking maybe it was just doing a lot of processing and would eventually stop. But the log file itself seemed to crash and burn, and at the end of the log file, I would have a line similar to the above, but wasn't finished writing the entire line. At this point ( it was probably about 2-3 minutes of waiting ), I would just have to kill -9 the process and try again.

    When I finally did get the /axr off to work, I had to do this - boot up the server, log in, then I waited for all the chunks to be loaded ( I could tell they were loaded because they had been sent to the client ). And then I typed the /axr off and it seemed to respond ok.

    Are the #s in your logs in the square brackets at the end how long it spend doing that task? Because I see quite a lot of light checks taking anywhere from 90 to 900 seconds, and the ore scans from file are in the 300-900 second range. Ahh actually now looking back at those numbers, I imagine the ? mark on my system is me forgetting to use UTF-8 encoding in my screen, and likely that ? is a mu character, so those are in microseconds....

    If you are looking at those logs, I believe anything after about 4/22 7:40 is me doing a lot of reloads and trying to get /axr off working. So the lag area would be just before this. I'm not sure how cpu intensive it was before any of this... actually wait I have logs of that too, let me check real quick.....

    And yeah, actually, it doesn't look like this event happened anytime in the past couple of hours ( but I don't know if anyone was even online ). The only thing I can guess is that this started when those 2 guys logged in.

    Have you tested this plugin with a large player base online? I know my server isn't the fastest out there, but I wouldn't think 2 people would/should cause this lag....

    or as you said in the above post, maybe they were tp'ing around to unscanned areas.... My world is somewhat large - it weighs in around 750 MB right now. Maybe you could try to add some functionality to do a whole world scan if requested? That way maybe you could save the lag caused by scanning to just happen once at an admin chosen time.
     
  15. Offline

    zlavik

    there seems to be a major problem with mine, i cant fix it... can you help me? add me on skype please zlavik928
     
  16. Offline

    asdaarg

    If you log in at an area with no scanned chunks, 625 chunks are scanned and that should take ~ 6 seconds (I just checked your log and find such a 6 second lag e.g. 2011.04.20 10:55:05 -2011.04.20 10:55:11 but thats 438 chunks so 8-9 seconds if 625 are scanned. However a timeout would need it to take longer (20 seconds?) Maybe two people trying to log in at once?
    What version of axr are you using? In the 0.5.x series /axr off should be doing it in the background and give you a progress report every few seconds. It should not freeze the server. fp means file pointer, and are written once per chunk written (the location of the chunk ore entry in the file) If you have a large map this can take a lot of time though, but there should still be a progress report so you have an idea how long it will take.
    Yes, thats mu as in micro.
    Not myself but others have and have reported it reasonable after 0.4.x optimizations were put in, with the exception of the same logging in causing timeout issue you had.
    You can use /axr gen to generate a rectangular area (if it is not loaded, it will load and unload if the chunk is already generated, otherwise it will also generate it.) This will trigger the scan of those chunks. Note that they are in chunk coordinates, not block coordinates. Currently it cannot scan all generated chunks as bukkit has no function to see what chunks are generated, only which are loaded.
     
  17. Offline

    RazMaTaz

    Unless I'm doing something wrong yet again, it looks like /axr gen word x1 z1 x2 z2 does not create ore. Generates the land and that is all, best I can tell.

    When looking at the map afterwords even after a /axr off there is only ore around the spawn area, no where else. not even a single block.

    I am currently trying the /axr chunk regen ore x1 z1 x2 z2 command but its taking ... forever ... and server is unusable as I half expected will let it run for awhile and see what happens. And i'm only generating the min/max for my map. Used minemapper to see chunk ranges

    Trying to regen ore caused out of memory/java heap space. Console messages were from two other plugins. Nothing noticed for AntiXRay:)
     
  18. Offline

    asdaarg

    It is not suppose to create ore. Only have chunks loaded and unloaded if they are not (generated when necessary.) What this will do is trigger a scan of those chunks. In the recovery process without backups, you're suppose to run it on the copy, not the original, and you're suppose to delete the region folder first (in the copy) so it can generate new ore, and scan those into a new ore file, which you can use in the original world.
     
  19. Offline

    RazMaTaz

    Sounds like I am doing it correctly, and that's why there is only ore around the spawn location, when the second world gets imported / created.

    I really hate to ask this, but can I get another step by step set of instructions for generation/recovery. And lets just say my original world has NO ore, and chunk ranges are -98, -73, 82, 86
     
  20. Offline

    asdaarg

    It does not really matter whether there is any ore or not in the original world. In step 7 you simply do /axr gen w2 -98, -73, 82, 86
    where w2 is the name of your copy
     
  21. Offline

    RazMaTaz

    Original: MysticForest
    New: M1

    Install Nscommand.jar
    Install AntiXRay.jar

    Install MultiVerse.jar

    Start Server

    Client Login

    /axr worlds (Just because)
    /mvimport M1 normal

    /axr on M1

    /axr worlds

    /axr gen M1 -98 -73 82 86

    client time out

    wait for server console to catch up

    client login

    /axr worlds

    /axr off M1

    client disconnect

    stop the server

    There is no M1 ore file, only MysticForest

    Using a map viewer on M1 I can tell that map is indeed generated.


    This is interesting, viewing the map with Mine X-Ray 3.0.0 and flying through the map, I only see ore around the spawn, and around where I have been. Even though the map really is already generated.
     

    Attached Files:

  22. Offline

    asdaarg

    Thanks for the bugreport, there's clearly at least 2 bugs here, the scan doesn't seem to be triggered despite generation, and it should not do a timeout on the client (server freeze).
    Edit: and another one, that there is no ore file.
    Edit: The debug file shows that there's air at the bottom floor of the chunks, which I have no idea why it occurs, perhaps onload event is triggered before it is generated, but then again the scan is done in the following tick, so that would mean the generation is delayed too? Makes no sense. Also the debug file claims the ore file for M1 was created. But was not? Is there an error in server.log at 2011.04.23 02:59:05 ?
    Edit: Did it myself and confirmed the first and third bug, but the ore file was created.
    Edit: Fixed
     
  23. Offline

    RazMaTaz

    In your instructions you say to do a /axr off W2 ... which restores the ore and deletes the ore file.....

    Show Spoiler
    Code:
    2011-04-23 14:58:59 [INFO] [MultiVerse] M1 - World Created as - normal
    2011-04-23 14:58:59 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-04-23 14:59:20 [INFO] [BackupPlugin]  Starting backup process..
    2011-04-23 14:59:21 [INFO] [BackupPlugin]  Rebuilding Cache. This can take several minutes, depending on the world size.
    2011-04-23 14:59:21 [INFO] [BackupPlugin]  Deleting cache, might be obsolete.
    2011-04-23 14:59:25 [INFO] [BackupPlugin]  Backup sucessfull
    2011-04-23 15:01:56 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    2011-04-23 15:01:56 [INFO] RazMage lost connection: disconnect.endOfStream
    2011-04-23 15:01:56 [INFO] [StealthLogin] RazMage logged out secretly!


    I had the same issue previously, when I waited for the backup to finish and the start the axr process.

    I am very confused about the ore, and here is why. Flying around the level with Mine X-Ray 3, it shows ore only where I have been. I left AntiXRay off and walked from one point to another, and it felt like the world was generating chunks again and then ore was showing in xray program. Well, I'm not sure if AntiXray was on or off now.. might have been on, scanning chunks and then did a /axr off before I quit and shutdown the server to check the level in the program.

    MineCraft XRay
    http://apocalyptech.com/minecraft/xray/
     
  24. Offline

    asdaarg

    Well, it turns out it unloaded the chunk before it got scanned, hence the air chunk. But you would think it would load it again when getblock is called, but no, it doesn't do that. Anyways fixed now, and you should be able to generate the chunks and trigger the scan as intended.
     
  25. Offline

    RazMaTaz

    Sweet I see every little bit helps. One last question should I really be doing a /axr off M1 (my second world) before shutting down the server?

    That attempt was same, but I see console still said 0.5.11 so I will download it again..
     
  26. Offline

    asdaarg

    Erm... No, what am I thinking, that would delete the ore file :D I think you might want to do it later on your original world to ensure that floating ores are filtered out at once rather than gradually, and doesn't suddenly pop up in stone you place when you build above ground smooth stone structures.
    Edit: updated instructions.
     
  27. Offline

    RazMaTaz

    :) Thats why I was asking for another set of instructions.. :)

    I'm having a heck of a time downloading the plugin again.. very very slow... if that.

    Ok. In process now, got disconnected (timed out) after the gen command..

    Running server on same pc if it makes any difference.

    also after the gen command I can no longer do any other commands, chat etc.

    Doing the same steps as before, same everything, got this..

    Show Spoiler
    Code:
    19:43:01 [INFO] [MultiVerse] M1 - World Created as - normal
    19:43:01 [WARNING] Can't keep up! Did the system time change, or is the server o
    verloaded?
    19:47:39 [INFO] More than 1000000 updates, aborting lighting updates
    19:47:43 [INFO] More than 1000000 updates, aborting lighting updates
    19:47:48 [INFO] More than 1000000 updates, aborting lighting updates
    19:47:53 [INFO] More than 1000000 updates, aborting lighting updates
    19:47:58 [INFO] More than 1000000 updates, aborting lighting updates
    19:48:03 [INFO] More than 1000000 updates, aborting lighting updates
    19:48:08 [INFO] More than 1000000 updates, aborting lighting updates
    19:48:12 [INFO] More than 1000000 updates, aborting lighting updates
    19:48:18 [INFO] More than 1000000 updates, aborting lighting updates
    19:48:24 [INFO] More than 1000000 updates, aborting lighting updates
    19:48:30 [INFO] More than 1000000 updates, aborting lighting updates
    19:48:35 [INFO] More than 1000000 updates, aborting lighting updates
    19:48:40 [INFO] More than 1000000 updates, aborting lighting updates
    19:48:49 [INFO] More than 1000000 updates, aborting lighting updates
    19:51:01 [SEVERE] Exception in thread "Thread-8"
    19:51:01 [SEVERE] null
    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at com.asdaarg.bukkit.NSCommand.NSCmdCatNode.call(NSCmdCatNode.java:48)
            at com.asdaarg.bukkit.NSCommand.NSCmdCatNode.call(NSCmdCatNode.java:63)
            at com.asdaarg.bukkit.NSCommand.NSCmdCatNode.call(NSCmdCatNode.java:63)
            at com.asdaarg.bukkit.NSCommand.NSCommand.Command(NSCommand.java:219)
            at com.asdaarg.bukkit.NSCommand.NSCommand$1.onPlayerCommandPreprocess(NS
    Command.java:43)
            at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.ja
    va:228)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:618)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:589)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:583)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.OutOfMemoryError: Java heap space
    19:51:01 [SEVERE] Exception in thread "Thread-15"
    19:51:01 [SEVERE] java.lang.OutOfMemoryError: Java heap space
    19:51:01 [INFO] RazMage issued server command: axr gen M1 -98 -73 82 86
    19:51:01 [SEVERE] java.lang.OutOfMemoryError: Java heap space
    19:51:01 [SEVERE]       at java.util.Arrays.copyOfRange(Unknown Source)
    19:51:01 [WARNING] Can't keep up! Did the system time change, or is the server o
    verloaded?
    19:51:01 [SEVERE]       at java.lang.String.<init>(Unknown Source)
    19:51:01 [SEVERE]       at java.lang.StringBuilder.toString(Unknown Source)
    19:51:07 [SEVERE]       at com.minerealm.borderguard.BorderGuard$1bgthread.run(B
    orderGuard.java:87)
    19:51:07 [SEVERE]       at java.lang.Thread.run(Unknown Source)
    >


    Can't stop server :( I shut it down hard.
    Here is debug, but it looks good .. to me anyways.

    Will attempt it again from the beginning.. tomorrow I think. :)
     

    Attached Files:

  28. Offline

    asdaarg

    That's weird, it worked for me.
     
  29. Offline

    RazMaTaz

    Can other java programs running cause any interference? I did have another java app totally unrelated to MC going this time. Like I said I will attempt Sunday
     
  30. Offline

    asdaarg

    I just hada look at the debug log and it looks like it does do the scanning, it just freezes for you while it doesn't for me, so it will probably work after the server is done. It still puzzles me why it freezes for you.
    Edit: It just hit me that all background processes seem to share the same issue, it works for some while for others it freezes, and perhaps it related too to the problem that some people have timeouts when they log in.
     
  31. Offline

    RazMaTaz

    Think there is a plugin compatibility problem? I can strip them all out and just use axr to see what happens.

    I do wish there was some kinda of onscreen/console status to know for sure when its done, but it looks like to me that when the console responds (catches up that I lost connection) its done.
     

Share This Page