From acc46c3ce491c7b9f3a2ed3092cf5515ebfe5f3e Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 13 Jan 2016 20:52:06 +0300 Subject: [PATCH] test revert https://gitlab.prok.pw/KCauldron/KCauldron/commit/75eb280f0ee40352910bf8148337e866adfe957a --- .gitignore | 3 +- hs_err_pid7636.log | 364 ++++++++++++++++++ .../world/gen/ChunkProviderServer.java.patch | 104 ++--- .../kcauldron/wrapper/LongHashMapTrove.java | 40 -- .../wrapper/VanillaChunkHashMap.java | 36 -- .../org/bukkit/craftbukkit/CraftWorld.java | 52 ++- 6 files changed, 436 insertions(+), 163 deletions(-) create mode 100644 hs_err_pid7636.log delete mode 100644 src/main/java/kcauldron/wrapper/LongHashMapTrove.java delete mode 100644 src/main/java/kcauldron/wrapper/VanillaChunkHashMap.java diff --git a/.gitignore b/.gitignore index 21961e1..1ef2fec 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ build fix_bug_comp *.rej clean_patch -symlink.bat \ No newline at end of file +symlink.bat +hs_err_pid7636.log \ No newline at end of file diff --git a/hs_err_pid7636.log b/hs_err_pid7636.log new file mode 100644 index 0000000..a480f8f --- /dev/null +++ b/hs_err_pid7636.log @@ -0,0 +1,364 @@ +# +# A fatal error has been detected by the Java Runtime Environment: +# +# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000576acf8a, pid=7636, tid=7612 +# +# JRE version: OpenJDK Runtime Environment (7.0-b15) (build 1.7.0_91-b15) +# Java VM: OpenJDK 64-Bit Server VM (24.91-b15 mixed mode windows-amd64 compressed oops) +# Problematic frame: +# V [jvm.dll+0x37cf8a] +# +# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows +# +# If you would like to submit a bug report, please visit: +# http://www.azulsystems.com/support/ +# + +--------------- T H R E A D --------------- + +Current thread (0x000000000242f000): GCTaskThread [stack: 0x0000000006280000,0x0000000006380000] [id=7612] + +siginfo: ExceptionCode=0xc0000005, reading address 0xffffffffffffffff + +Registers: +RAX=0xfc40aa41efd5dc6c, RBX=0x00000007e2055168, RCX=0x0000000000000007, RDX=0x0000000000000000 +RSP=0x000000000637f810, RBP=0x0000000000000004, RSI=0x000000000ad66390, RDI=0x00000d5f00000846 +R8 =0x00000000881c55d3, R9 =0x1fffffffffffffff, R10=0x00000007881c7108, R11=0x00000000024255b0 +R12=0x00000000578cdab0, R13=0xfc40aa41efd5dc6e, R14=0x0000000000000000, R15=0x000000000242f2a0 +RIP=0x00000000576acf8a, EFLAGS=0x0000000000010286 + +Top of Stack: (sp=0x000000000637f810) +0x000000000637f810: 00000007e2055208 0000000000000003 +0x000000000637f820: 000000000ad66390 000000000242bc00 +0x000000000637f830: 00000007f2671680 00000000576ad684 +0x000000000637f840: 00000007881c5118 0000000000000400 +0x000000000637f850: 0000000000000000 000000000242bc01 +0x000000000637f860: 00000000578cdab0 00000000576ad300 +0x000000000637f870: 00000007881c5624 0000000000000000 +0x000000000637f880: 000000000ad66390 00000d5f00000846 +0x000000000637f890: 00000007881c5624 00000000576add45 +0x000000000637f8a0: 0000000000000005 00000000578cdab0 +0x000000000637f8b0: 00000007881902b8 00000000576ad20e +0x000000000637f8c0: 00000d5f00000846 0000000000000003 +0x000000000637f8d0: 000000000ad66390 00000d5f00000846 +0x000000000637f8e0: 000000000242f290 00000d5e00000846 +0x000000000637f8f0: 0000117900000992 000016eb00000469 +0x000000000637f900: 000000000242f290 000000000242bc40 + +Instructions: (pc=0x00000000576acf8a) +0x00000000576acf6a: 48 83 c2 10 48 8b cb e8 3a 7c ca ff 48 63 e8 41 +0x00000000576acf7a: 0f b6 c5 f6 d0 a8 01 49 8b c5 74 06 48 83 e0 fd +0x00000000576acf8a: 8b 00 48 c1 e8 03 83 e0 0f 3b 05 ef 92 3a 00 0f +0x00000000576acf9a: 8d 2b 01 00 00 48 8b 7e 08 48 8d 04 ef 48 3b c7 + + +Register to memory mapping: + +RAX=0xfc40aa41efd5dc6c is an unknown value +RBX=0x00000007e2055168 is an unknown value +RCX=0x0000000000000007 is an unknown value +RDX=0x0000000000000000 is an unknown value +RSP=0x000000000637f810 is an unknown value +RBP=0x0000000000000004 is an unknown value +RSI=0x000000000ad66390 is an unknown value +RDI=0x00000d5f00000846 is an unknown value +R8 =0x00000000881c55d3 is an unknown value +R9 =0x1fffffffffffffff is an unknown value +R10= +[error occurred during error reporting (printing register info), id 0xc0000005] + +Stack: [0x0000000006280000,0x0000000006380000], sp=0x000000000637f810, free space=1022k +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [jvm.dll+0x37cf8a] + + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) + 0x000000000d5b5800 JavaThread "File lock request listener" [_thread_in_native, id=6984, stack(0x000000000ea00000,0x000000000eb00000)] + 0x000000000ade3800 JavaThread "Service Thread" daemon [_thread_blocked, id=8152, stack(0x000000000c870000,0x000000000c970000)] + 0x000000000ade1000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=6512, stack(0x000000000c6e0000,0x000000000c7e0000)] + 0x000000000addc000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=7564, stack(0x000000000c3e0000,0x000000000c4e0000)] + 0x000000000add9000 JavaThread "Attach Listener" daemon [_thread_blocked, id=8032, stack(0x000000000c4e0000,0x000000000c5e0000)] + 0x000000000add4000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2304, stack(0x000000000c230000,0x000000000c330000)] + 0x000000000ad77800 JavaThread "Finalizer" daemon [_thread_blocked, id=7576, stack(0x000000000c0d0000,0x000000000c1d0000)] + 0x000000000ad70800 JavaThread "Reference Handler" daemon [_thread_blocked, id=7432, stack(0x000000000bec0000,0x000000000bfc0000)] + 0x000000000250f000 JavaThread "main" [_thread_blocked, id=4280, stack(0x0000000002800000,0x0000000002900000)] + +Other Threads: + 0x000000000ad6b000 VMThread [stack: 0x000000000bc30000,0x000000000bd30000] [id=7392] + 0x000000000c978800 WatcherThread [stack: 0x000000000cf10000,0x000000000d010000] [id=5416] + +=>0x000000000242f000 (exited) GCTaskThread [stack: 0x0000000006280000,0x0000000006380000] [id=7612] + +VM state:at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) +[0x000000000250d100] Threads_lock - owner thread: 0x000000000ad6b000 +[0x000000000250d600] Heap_lock - owner thread: 0x000000000250f000 + +Heap + PSYoungGen total 282624K, used 279595K [0x00000007d5e00000, 0x00000007f2680000, 0x0000000800000000) + eden space 258048K, 100% used [0x00000007d5e00000,0x00000007e5a00000,0x00000007e5a00000) + from space 24576K, 87% used [0x00000007e5a00000,0x00000007e6f0aed0,0x00000007e7200000) + to space 27136K, 99% used [0x00000007f0c00000,0x00000007f267e058,0x00000007f2680000) + ParOldGen total 127488K, used 126975K [0x0000000781a00000, 0x0000000789680000, 0x00000007d5e00000) + object space 127488K, 99% used [0x0000000781a00000,0x00000007895fff30,0x0000000789680000) + PSPermGen total 38912K, used 38867K [0x000000077c800000, 0x000000077ee00000, 0x0000000781a00000) + object space 38912K, 99% used [0x000000077c800000,0x000000077edf4ca8,0x000000077ee00000) + +Card table byte_map: [0x0000000005900000,0x0000000005d20000] byte_map_base: 0x0000000001d1c000 + +Polling page: 0x0000000000230000 + +Code Cache [0x0000000002900000, 0x0000000002e70000, 0x0000000005900000) + total_blobs=1811 nmethods=1176 adapters=586 free_code_cache=43794Kb largest_free_block=44635840 + +Compilation events (10 events): +Event: 22.230 Thread 0x000000000ade1000 1340 com.sun.tools.javac.parser.JavacParser::variableDeclaratorId (97 bytes) +Event: 22.239 Thread 0x000000000ade1000 nmethod 1340 0x0000000002e254d0 code [0x0000000002e256a0, 0x0000000002e25ba0] +Event: 22.241 Thread 0x000000000ade1000 1341 com.sun.tools.javac.parser.JavacParser::parExpression (21 bytes) +Event: 22.250 Thread 0x000000000ade1000 nmethod 1341 0x0000000002e24110 code [0x0000000002e24320, 0x0000000002e248b0] +Event: 22.286 Thread 0x000000000ade1000 1342 com.sun.tools.javac.parser.JavacParser::classOrInterfaceBodyDeclaration (609 bytes) +Event: 22.302 Thread 0x000000000addc000 nmethod 1339 0x0000000002e695d0 code [0x0000000002e699e0, 0x0000000002e6c7b0] +Event: 22.310 Thread 0x000000000addc000 1344 com.sun.tools.javac.tree.TreeMaker::NewClass (28 bytes) +Event: 22.312 Thread 0x000000000addc000 nmethod 1344 0x0000000002e19a10 code [0x0000000002e19b60, 0x0000000002e19cd8] +Event: 22.312 Thread 0x000000000addc000 1345 com.sun.tools.javac.tree.JCTree$JCNewClass:: (42 bytes) +Event: 22.313 Thread 0x000000000addc000 nmethod 1345 0x0000000002e07c90 code [0x0000000002e07dc0, 0x0000000002e07e98] + +GC Heap History (10 events): +Event: 3.290 GC heap after +Heap after GC invocations=5 (full 0): + PSYoungGen total 71680K, used 5104K [0x00000007d5e00000, 0x00000007df700000, 0x0000000800000000) + eden space 66560K, 0% used [0x00000007d5e00000,0x00000007d5e00000,0x00000007d9f00000) + from space 5120K, 99% used [0x00000007d9f00000,0x00000007da3fc030,0x00000007da400000) + to space 11776K, 0% used [0x00000007deb80000,0x00000007deb80000,0x00000007df700000) + ParOldGen total 86016K, used 15963K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000) + object space 86016K, 18% used [0x0000000781a00000,0x0000000782996d58,0x0000000786e00000) + PSPermGen total 21504K, used 21061K [0x000000077c800000, 0x000000077dd00000, 0x0000000781a00000) + object space 21504K, 97% used [0x000000077c800000,0x000000077dc91790,0x000000077dd00000) +} +Event: 4.375 GC heap before +{Heap before GC invocations=6 (full 0): + PSYoungGen total 71680K, used 71664K [0x00000007d5e00000, 0x00000007df700000, 0x0000000800000000) + eden space 66560K, 100% used [0x00000007d5e00000,0x00000007d9f00000,0x00000007d9f00000) + from space 5120K, 99% used [0x00000007d9f00000,0x00000007da3fc030,0x00000007da400000) + to space 11776K, 0% used [0x00000007deb80000,0x00000007deb80000,0x00000007df700000) + ParOldGen total 86016K, used 15963K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000) + object space 86016K, 18% used [0x0000000781a00000,0x0000000782996d58,0x0000000786e00000) + PSPermGen total 24064K, used 23805K [0x000000077c800000, 0x000000077df80000, 0x0000000781a00000) + object space 24064K, 98% used [0x000000077c800000,0x000000077df3f558,0x000000077df80000) +Event: 4.393 GC heap after +Heap after GC invocations=6 (full 0): + PSYoungGen total 143872K, used 11086K [0x00000007d5e00000, 0x00000007df900000, 0x0000000800000000) + eden space 132096K, 0% used [0x00000007d5e00000,0x00000007d5e00000,0x00000007ddf00000) + from space 11776K, 94% used [0x00000007deb80000,0x00000007df653ab0,0x00000007df700000) + to space 12800K, 0% used [0x00000007ddf00000,0x00000007ddf00000,0x00000007deb80000) + ParOldGen total 86016K, used 15963K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000) + object space 86016K, 18% used [0x0000000781a00000,0x0000000782996d58,0x0000000786e00000) + PSPermGen total 24064K, used 23805K [0x000000077c800000, 0x000000077df80000, 0x0000000781a00000) + object space 24064K, 98% used [0x000000077c800000,0x000000077df3f558,0x000000077df80000) +} +Event: 6.504 GC heap before +{Heap before GC invocations=7 (full 0): + PSYoungGen total 143872K, used 143182K [0x00000007d5e00000, 0x00000007df900000, 0x0000000800000000) + eden space 132096K, 100% used [0x00000007d5e00000,0x00000007ddf00000,0x00000007ddf00000) + from space 11776K, 94% used [0x00000007deb80000,0x00000007df653ab0,0x00000007df700000) + to space 12800K, 0% used [0x00000007ddf00000,0x00000007ddf00000,0x00000007deb80000) + ParOldGen total 86016K, used 15963K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000) + object space 86016K, 18% used [0x0000000781a00000,0x0000000782996d58,0x0000000786e00000) + PSPermGen total 29184K, used 28887K [0x000000077c800000, 0x000000077e480000, 0x0000000781a00000) + object space 29184K, 98% used [0x000000077c800000,0x000000077e435c60,0x000000077e480000) +Event: 6.557 GC heap after +Heap after GC invocations=7 (full 0): + PSYoungGen total 144896K, used 12784K [0x00000007d5e00000, 0x00000007e8400000, 0x0000000800000000) + eden space 132096K, 0% used [0x00000007d5e00000,0x00000007d5e00000,0x00000007ddf00000) + from space 12800K, 99% used [0x00000007ddf00000,0x00000007deb7c010,0x00000007deb80000) + to space 18432K, 0% used [0x00000007e7200000,0x00000007e7200000,0x00000007e8400000) + ParOldGen total 86016K, used 24461K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000) + object space 86016K, 28% used [0x0000000781a00000,0x00000007831e3520,0x0000000786e00000) + PSPermGen total 29184K, used 28887K [0x000000077c800000, 0x000000077e480000, 0x0000000781a00000) + object space 29184K, 98% used [0x000000077c800000,0x000000077e435c60,0x000000077e480000) +} +Event: 10.587 GC heap before +{Heap before GC invocations=8 (full 0): + PSYoungGen total 144896K, used 144880K [0x00000007d5e00000, 0x00000007e8400000, 0x0000000800000000) + eden space 132096K, 100% used [0x00000007d5e00000,0x00000007ddf00000,0x00000007ddf00000) + from space 12800K, 99% used [0x00000007ddf00000,0x00000007deb7c010,0x00000007deb80000) + to space 18432K, 0% used [0x00000007e7200000,0x00000007e7200000,0x00000007e8400000) + ParOldGen total 86016K, used 24461K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000) + object space 86016K, 28% used [0x0000000781a00000,0x00000007831e3520,0x0000000786e00000) + PSPermGen total 34816K, used 34421K [0x000000077c800000, 0x000000077ea00000, 0x0000000781a00000) + object space 34816K, 98% used [0x000000077c800000,0x000000077e99d5c8,0x000000077ea00000) +Event: 10.620 GC heap after +Heap after GC invocations=8 (full 0): + PSYoungGen total 276480K, used 18408K [0x00000007d5e00000, 0x00000007e9000000, 0x0000000800000000) + eden space 258048K, 0% used [0x00000007d5e00000,0x00000007d5e00000,0x00000007e5a00000) + from space 18432K, 99% used [0x00000007e7200000,0x00000007e83fa210,0x00000007e8400000) + to space 24576K, 0% used [0x00000007e5a00000,0x00000007e5a00000,0x00000007e7200000) + ParOldGen total 86016K, used 32791K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000) + object space 86016K, 38% used [0x0000000781a00000,0x0000000783a05db8,0x0000000786e00000) + PSPermGen total 34816K, used 34421K [0x000000077c800000, 0x000000077ea00000, 0x0000000781a00000) + object space 34816K, 98% used [0x000000077c800000,0x000000077e99d5c8,0x000000077ea00000) +} +Event: 17.646 GC heap before +{Heap before GC invocations=9 (full 0): + PSYoungGen total 276480K, used 276456K [0x00000007d5e00000, 0x00000007e9000000, 0x0000000800000000) + eden space 258048K, 100% used [0x00000007d5e00000,0x00000007e5a00000,0x00000007e5a00000) + from space 18432K, 99% used [0x00000007e7200000,0x00000007e83fa210,0x00000007e8400000) + to space 24576K, 0% used [0x00000007e5a00000,0x00000007e5a00000,0x00000007e7200000) + ParOldGen total 86016K, used 32791K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000) + object space 86016K, 38% used [0x0000000781a00000,0x0000000783a05db8,0x0000000786e00000) + PSPermGen total 35840K, used 35473K [0x000000077c800000, 0x000000077eb00000, 0x0000000781a00000) + object space 35840K, 98% used [0x000000077c800000,0x000000077eaa4568,0x000000077eb00000) +Event: 17.683 GC heap after +Heap after GC invocations=9 (full 0): + PSYoungGen total 282624K, used 21547K [0x00000007d5e00000, 0x00000007f2680000, 0x0000000800000000) + eden space 258048K, 0% used [0x00000007d5e00000,0x00000007d5e00000,0x00000007e5a00000) + from space 24576K, 87% used [0x00000007e5a00000,0x00000007e6f0aed0,0x00000007e7200000) + to space 27136K, 0% used [0x00000007f0c00000,0x00000007f0c00000,0x00000007f2680000) + ParOldGen total 86016K, used 36778K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000) + object space 86016K, 42% used [0x0000000781a00000,0x0000000783deab70,0x0000000786e00000) + PSPermGen total 35840K, used 35473K [0x000000077c800000, 0x000000077eb00000, 0x0000000781a00000) + object space 35840K, 98% used [0x000000077c800000,0x000000077eaa4568,0x000000077eb00000) +} +Event: 22.356 GC heap before +{Heap before GC invocations=10 (full 0): + PSYoungGen total 282624K, used 279595K [0x00000007d5e00000, 0x00000007f2680000, 0x0000000800000000) + eden space 258048K, 100% used [0x00000007d5e00000,0x00000007e5a00000,0x00000007e5a00000) + from space 24576K, 87% used [0x00000007e5a00000,0x00000007e6f0aed0,0x00000007e7200000) + to space 27136K, 0% used [0x00000007f0c00000,0x00000007f0c00000,0x00000007f2680000) + ParOldGen total 86016K, used 36778K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000) + object space 86016K, 42% used [0x0000000781a00000,0x0000000783deab70,0x0000000786e00000) + PSPermGen total 38912K, used 38867K [0x000000077c800000, 0x000000077ee00000, 0x0000000781a00000) + object space 38912K, 99% used [0x000000077c800000,0x000000077edf4ca8,0x000000077ee00000) + +Deoptimization events (10 events): +Event: 21.283 Thread 0x000000000250f000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002dee7a0 method=com.sun.tools.javac.parser.JavacParser.term3()Lcom/sun/tools/javac/tree/JCTree$JCExpression; @ 632 +Event: 21.624 Thread 0x000000000250f000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002dd82a4 method=com.sun.tools.javac.parser.JavacParser.parseStatement()Lcom/sun/tools/javac/tree/JCTree$JCStatement; @ 498 +Event: 21.682 Thread 0x000000000250f000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002e0d414 method=com.sun.tools.javac.parser.JavacParser.classOrInterfaceBodyDeclaration(Lcom/sun/tools/javac/util/Name;Z)Lcom/sun/tools/javac/util/List; @ 203 +Event: 21.685 Thread 0x000000000250f000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002e15cf0 method=sun.misc.FloatingDecimal.readJavaFormatString(Ljava/lang/String;)Lsun/misc/FloatingDecimal; @ 790 +Event: 21.696 Thread 0x000000000250f000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002e2bd4c method=com.sun.tools.javac.parser.JavacParser.bracketsSuffix(Lcom/sun/tools/javac/tree/JCTree$JCExpression;)Lcom/sun/tools/javac/tree/JCTree$JCExpression; @ 21 +Event: 22.034 Thread 0x000000000250f000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000002e12be0 method=com.sun.tools.javac.parser.JavacParser.parseCompilationUnit()Lcom/sun/tools/javac/tree/JCTree$JCCompilationUnit; @ 283 +Event: 22.034 Thread 0x000000000250f000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000002e03914 method=com.sun.tools.javac.tree.TreeMaker.TopLevel(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/tree/JCTree$JCExpression;Lcom/sun/tools/javac/util/List;)Lcom/sun/tools/jaS�>606@ +Event: 22.188 Thread 0x000000000250f000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002dc0824 method=com.sun.tools.javac.parser.Scanner.scanDocComment()V @ 163 +Event: 22.198 Thread 0x000000000250f000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002db4a18 method=com.sun.tools.javac.parser.Scanner.scanDocComment()V @ 163 +Event: 22.202 Thread 0x000000000250f000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002e26b68 method=com.sun.tools.javac.parser.JavacParser.methodDeclaratorRest(ILcom/sun/tools/javac/tree/JCTree$JCModifiers;Lcom/sun/tools/javac/tree/JCTree$JCExpression;Lcom/sun/tools/javac/u�L�}H5@ + +Internal exceptions (10 events): +Event: 18.825 Thread 0x000000000250f000 Threw 0x00000007da1c8040 at C:\jenkins\workspace\zulu7u-silver-build-win64\zulu-src\hotspot\src\share\vm\prims\jvm.cpp:1319 +Event: 18.825 Thread 0x000000000250f000 Threw 0x00000007da1c8dd0 at C:\jenkins\workspace\zulu7u-silver-build-win64\zulu-src\hotspot\src\share\vm\prims\jvm.cpp:1319 +Event: 18.825 Thread 0x000000000250f000 Threw 0x00000007da1cf078 at C:\jenkins\workspace\zulu7u-silver-build-win64\zulu-src\hotspot\src\share\vm\prims\jvm.cpp:1319 +Event: 18.825 Thread 0x000000000250f000 Threw 0x00000007da1cff08 at C:\jenkins\workspace\zulu7u-silver-build-win64\zulu-src\hotspot\src\share\vm\prims\jvm.cpp:1319 +Event: 18.825 Thread 0x000000000250f000 Threw 0x00000007da1d0c98 at C:\jenkins\workspace\zulu7u-silver-build-win64\zulu-src\hotspot\src\share\vm\prims\jvm.cpp:1319 +Event: 18.825 Thread 0x000000000250f000 Threw 0x00000007da1d6f40 at C:\jenkins\workspace\zulu7u-silver-build-win64\zulu-src\hotspot\src\share\vm\prims\jvm.cpp:1319 +Event: 18.825 Thread 0x000000000250f000 Threw 0x00000007da1dcd70 at C:\jenkins\workspace\zulu7u-silver-build-win64\zulu-src\hotspot\src\share\vm\prims\jvm.cpp:1319 +Event: 18.827 Thread 0x000000000250f000 Threw 0x00000007da1fdee0 at C:\jenkins\workspace\zulu7u-silver-build-win64\zulu-src\hotspot\src\share\vm\classfile\systemDictionary.cpp:185 +Event: 18.850 Thread 0x000000000250f000 Threw 0x00000007da3019c0 at C:\jenkins\workspace\zulu7u-silver-build-win64\zulu-src\hotspot\src\share\vm\prims\jvm.cpp:1319 +Event: 18.851 Thread 0x000000000250f000 Threw 0x00000007da302c20 at C:\jenkins\workspace\zulu7u-silver-build-win64\zulu-src\hotspot\src\share\vm\prims\jvm.cpp:1319 + +Events (10 events): +Event: 22.198 Thread 0x000000000250f000 DEOPT PACKING pc=0x0000000002db4a18 sp=0x00000000028fb3a0 +Event: 22.198 Thread 0x000000000250f000 DEOPT UNPACKING pc=0x00000000029375a4 sp=0x00000000028fb398 mode 2 +Event: 22.202 Thread 0x000000000250f000 Uncommon trap: trap_request=0xffffff75 fr.pc=0x0000000002e26b68 +Event: 22.202 Thread 0x000000000250f000 DEOPT PACKING pc=0x0000000002e26b68 sp=0x00000000028fb4b0 +Event: 22.203 Thread 0x000000000250f000 DEOPT UNPACKING pc=0x00000000029375a4 sp=0x00000000028fb468 mode 2 +Event: 22.250 Thread 0x000000000ade1000 flushing nmethod 0x0000000002c4ff90 +Event: 22.303 Thread 0x000000000addc000 flushing nmethod 0x0000000002cd0490 +Event: 22.303 Thread 0x000000000addc000 flushing nmethod 0x0000000002ceff90 +Event: 22.312 Thread 0x000000000addc000 flushing nmethod 0x0000000002cfdd10 +Event: 22.356 Executing VM operation: ParallelGCFailedAllocation + + +Dynamic libraries: +0x000000013f7c0000 - 0x000000013f7f1000 D:\nmine\zulu1.7.0_91\bin\java.exe +0x0000000076cb0000 - 0x0000000076e59000 C:\Windows\SYSTEM32\ntdll.dll +0x00000000765d0000 - 0x00000000766ef000 C:\Windows\system32\kernel32.dll +0x000007fefd450000 - 0x000007fefd4bc000 C:\Windows\system32\KERNELBASE.dll +0x000007fefeee0000 - 0x000007fefefbb000 C:\Windows\system32\ADVAPI32.dll +0x000007fefe650000 - 0x000007fefe6ef000 C:\Windows\system32\msvcrt.dll +0x000007fefd5d0000 - 0x000007fefd5ef000 C:\Windows\SYSTEM32\sechost.dll +0x000007fefe520000 - 0x000007fefe64d000 C:\Windows\system32\RPCRT4.dll +0x0000000076a50000 - 0x0000000076b4a000 C:\Windows\system32\USER32.dll +0x000007fefd600000 - 0x000007fefd667000 C:\Windows\system32\GDI32.dll +0x000007fefd4e0000 - 0x000007fefd4ee000 C:\Windows\system32\LPK.dll +0x000007fefd670000 - 0x000007fefd739000 C:\Windows\system32\USP10.dll +0x000007fefbb30000 - 0x000007fefbd2c000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\COMCTL32.dll +0x000007fefe6f0000 - 0x000007fefe761000 C:\Windows\system32\SHLWAPI.dll +0x000007fefd760000 - 0x000007fefd78e000 C:\Windows\system32\IMM32.DLL +0x000007fefe8f0000 - 0x000007fefe9f9000 C:\Windows\system32\MSCTF.dll +0x000007fefd0d0000 - 0x000007fefd101000 C:\Windows\system32\nvinitx.dll +0x000007fefd0c0000 - 0x000007fefd0cc000 C:\Windows\system32\VERSION.dll +0x000000000f000000 - 0x000000000f006000 C:\Program Files\NVIDIA Corporation\CoProcManager\detoured.dll +0x000007fef9b50000 - 0x000007fef9b82000 C:\Program Files\NVIDIA Corporation\CoProcManager\nvd3d9wrapx.dll +0x000007fefea50000 - 0x000007fefec27000 C:\Windows\system32\SETUPAPI.dll +0x000007fefd2a0000 - 0x000007fefd2d6000 C:\Windows\system32\CFGMGR32.dll +0x000007fefd4f0000 - 0x000007fefd5c7000 C:\Windows\system32\OLEAUT32.dll +0x000007fefecd0000 - 0x000007fefeed3000 C:\Windows\system32\ole32.dll +0x000007fefd4c0000 - 0x000007fefd4da000 C:\Windows\system32\DEVOBJ.dll +0x000007fef9b20000 - 0x000007fef9b42000 C:\Program Files\NVIDIA Corporation\CoProcManager\nvdxgiwrapx.dll +0x0000000057ad0000 - 0x0000000057ba1000 D:\nmine\zulu1.7.0_91\jre\bin\msvcr100.dll +0x0000000057330000 - 0x0000000057aca000 D:\nmine\zulu1.7.0_91\jre\bin\server\jvm.dll +0x000007fef8450000 - 0x000007fef8459000 C:\Windows\system32\WSOCK32.dll +0x000007fefea00000 - 0x000007fefea4d000 C:\Windows\system32\WS2_32.dll +0x000007fefd5f0000 - 0x000007fefd5f8000 C:\Windows\system32\NSI.dll +0x000007fef9a40000 - 0x000007fef9a7b000 C:\Windows\system32\WINMM.dll +0x0000000076e80000 - 0x0000000076e87000 C:\Windows\system32\PSAPI.DLL +0x000007fef5e90000 - 0x000007fef5e9f000 D:\nmine\zulu1.7.0_91\jre\bin\verify.dll +0x000007feeef50000 - 0x000007feeef78000 D:\nmine\zulu1.7.0_91\jre\bin\java.dll +0x000007feef0d0000 - 0x000007feef0e6000 D:\nmine\zulu1.7.0_91\jre\bin\zip.dll +0x000007feeefd0000 - 0x000007feeefea000 D:\nmine\zulu1.7.0_91\jre\bin\net.dll +0x000007fefc870000 - 0x000007fefc8c5000 C:\Windows\system32\mswsock.dll +0x000007fefc860000 - 0x000007fefc867000 C:\Windows\System32\wship6.dll +0x000007feeeef0000 - 0x000007feeef01000 D:\nmine\zulu1.7.0_91\jre\bin\nio.dll +0x000007feeedb0000 - 0x000007feeedc2000 C:\Users\�������������\.gradle\native\19\windows-amd64\native-platform.dll +0x000007fefc8d0000 - 0x000007fefc8e7000 C:\Windows\system32\CRYPTSP.dll +0x000007fefc5d0000 - 0x000007fefc617000 C:\Windows\system32\rsaenh.dll +0x000007fefc380000 - 0x000007fefc39e000 C:\Windows\system32\USERENV.dll +0x000007fefd110000 - 0x000007fefd11f000 C:\Windows\system32\profapi.dll +0x000007fefcf50000 - 0x000007fefcf5f000 C:\Windows\system32\CRYPTBASE.dll +0x000007fefad90000 - 0x000007fefadb7000 C:\Windows\system32\IPHLPAPI.DLL +0x000007fefac50000 - 0x000007fefac5b000 C:\Windows\system32\WINNSI.DLL +0x000007fefab20000 - 0x000007fefab38000 C:\Windows\system32\dhcpcsvc.DLL +0x000007fefaa70000 - 0x000007fefaa81000 C:\Windows\system32\dhcpcsvc6.DLL +0x000007fef2920000 - 0x000007fef292b000 D:\nmine\zulu1.7.0_91\jre\bin\management.dll +0x000007fefd040000 - 0x000007fefd097000 C:\Windows\system32\apphelp.dll +0x000007feeed50000 - 0x000007feeed74000 D:\nmine\zulu1.7.0_91\jre\bin\sunec.dll +0x000007feef140000 - 0x000007feef14b000 D:\nmine\zulu1.7.0_91\jre\bin\sunmscapi.dll +0x000000000cd70000 - 0x000000000ceda000 C:\Windows\system32\CRYPT32.dll +0x000007fefd1b0000 - 0x000007fefd1bf000 C:\Windows\system32\MSASN1.dll +0x000007fefc250000 - 0x000007fefc257000 C:\Windows\System32\wshtcpip.dll +0x000007fefc6f0000 - 0x000007fefc74b000 C:\Windows\system32\DNSAPI.dll +0x000007fef4690000 - 0x000007fef4698000 C:\Windows\system32\rasadhlp.dll +0x000007fefab50000 - 0x000007fefaba3000 C:\Windows\System32\fwpuclnt.dll +0x000007feeb5d0000 - 0x000007feeb6f5000 C:\Windows\system32\dbghelp.dll + +VM Arguments: +jvm_args: -Dorg.gradle.appname=gradle +java_command: org.gradle.launcher.GradleMain jar +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=D:\nmine\zulu1.7.0_91 +PATH=C:\Users\�������������\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\�������������\bin;C:\Python27;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\PC Connectivity Solution;D:\Perl\bin;C:\Program Files (x86)\Common Files\Symbian\Tools;C:\CBuilderX\bin;C:\Program Files (x86)\CSL Arm Toolchain\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Microsoft SQL Server\80\Tools\BINN;Z:\Program Files (x86)\Microsoft SQL Server (x86) (x86)\90\Tools\binn;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Skype\Phone;C:\Program Files\apache-maven-3.3.3\bin;C:\Program Files\gradle-2.0\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;E:\jet11.0-eval-amd64\bin;C:\CBuilderX\bin;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\Nmap;C:\Program Files (x86)\FreeArc\bin;C:\Program Files (x86)\FreeArc\bin;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl +USERNAME=������������� +SHELL=C:\Program Files\Git\usr\bin\bash +DISPLAY=needs-to-be-defined +OS=Windows_NT +PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel + + + +--------------- S Y S T E M --------------- + +OS: Windows 7 , 64 bit Build 7601 Service Pack 1 + +CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 42 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, ht, tsc, tscinvbit + +Memory: 4k page, physical 8274548k(3140360k free), swap 18758464k(12182612k free) + +vm_info: OpenJDK 64-Bit Server VM (24.91-b15) for windows-amd64 JRE (1.7.0_91-b15), built on Oct 22 2015 01:31:27 by "tester" with MS VC++ 10.0 (VS2010) + +time: Tue Jan 12 20:23:04 2016 +elapsed time: 22 seconds + diff --git a/patches/net/minecraft/world/gen/ChunkProviderServer.java.patch b/patches/net/minecraft/world/gen/ChunkProviderServer.java.patch index f4b1663..617ddd0 100644 --- a/patches/net/minecraft/world/gen/ChunkProviderServer.java.patch +++ b/patches/net/minecraft/world/gen/ChunkProviderServer.java.patch @@ -1,38 +1,10 @@ --- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderServer.java +++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderServer.java -@@ -1,7 +1,13 @@ - package net.minecraft.world.gen; - - import com.google.common.collect.Lists; -+ - import cpw.mods.fml.common.registry.GameRegistry; -+import gnu.trove.impl.sync.TSynchronizedLongObjectMap; -+import gnu.trove.map.TLongObjectMap; -+import gnu.trove.map.hash.TLongObjectHashMap; -+import gnu.trove.procedure.TObjectProcedure; -+ - import java.io.IOException; - import java.util.ArrayList; - import java.util.Collections; -@@ -9,6 +15,7 @@ - import java.util.List; - import java.util.Set; - import java.util.concurrent.ConcurrentHashMap; -+ - import net.minecraft.crash.CrashReport; - import net.minecraft.crash.CrashReportCategory; - import net.minecraft.entity.EnumCreatureType; -@@ -33,22 +40,52 @@ +@@ -32,23 +32,42 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; - -+ -+ -+ -+ +// CraftBukkit start +import java.util.Random; -+ +import net.minecraft.block.BlockSand; + +import org.bukkit.Server; @@ -40,11 +12,6 @@ +import org.bukkit.craftbukkit.util.LongHashSet; +import org.bukkit.craftbukkit.util.LongObjectHashMap; +import org.bukkit.event.world.ChunkUnloadEvent; -+ -+ -+ -+ -+ +// CraftBukkit end +// Cauldron start +import cpw.mods.fml.common.FMLCommonHandler; @@ -52,7 +19,7 @@ +import net.minecraftforge.cauldron.configuration.CauldronConfig; +import net.minecraftforge.cauldron.CauldronHooks; +// Cauldron end -+ +- public class ChunkProviderServer implements IChunkProvider { private static final Logger logger = LogManager.getLogger(); @@ -67,12 +34,13 @@ - public List loadedChunks = new ArrayList(); + public boolean loadChunkOnProvideRequest = MinecraftServer.getServer().cauldronConfig.loadChunkOnRequest.getValue(); // Cauldron - if true, allows mods to force load chunks. to disable, set load-chunk-on-request in cauldron.yml to false + public int initialTick; // Cauldron counter to keep track of when this loader was created -+ public TLongObjectMap loadedChunkHashMap_KC = new TSynchronizedLongObjectMap(new TLongObjectHashMap()); ++ public LongObjectHashMap loadedChunkHashMap_KC = new LongObjectHashMap(); + public List loadedChunks = new ArrayList(); // Cauldron - vanilla compatibility public WorldServer worldObj; private Set loadingChunks = com.google.common.collect.Sets.newHashSet(); + public LongHashMap loadedChunkHashMap = new kcauldron.wrapper.VanillaChunkHashMap(loadedChunkHashMap_KC); // KCauldron - vanilla/mystcraft compatibility private static final String __OBFID = "CL_00001436"; ++ private boolean mUnloading; public ChunkProviderServer(WorldServer p_i1520_1_, IChunkLoader p_i1520_2_, IChunkProvider p_i1520_3_) { @@ -80,7 +48,7 @@ this.defaultEmptyChunk = new EmptyChunk(p_i1520_1_, 0, 0); this.worldObj = p_i1520_1_; this.currentChunkLoader = p_i1520_2_; -@@ -57,10 +94,10 @@ +@@ -57,10 +76,10 @@ public boolean chunkExists(int p_73149_1_, int p_73149_2_) { @@ -93,7 +61,7 @@ { return this.loadedChunks; } -@@ -74,26 +111,45 @@ +@@ -74,26 +93,47 @@ int l = p_73241_2_ * 16 + 8 - chunkcoordinates.posZ; short short1 = 128; @@ -132,36 +100,33 @@ public void unloadAllChunks() { - Iterator iterator = this.loadedChunks.iterator(); -- -- while (iterator.hasNext()) -- { -- Chunk chunk = (Chunk)iterator.next(); -- this.unloadChunksIfNotNearSpawn(chunk.xPosition, chunk.zPosition); -- } -+ this.loadedChunkHashMap_KC.forEachValue(new TObjectProcedure() { -+ @Override -+ public boolean execute(Chunk chunk) { -+ unloadChunksIfNotNearSpawn(chunk.xPosition, chunk.zPosition); -+ return true; -+ } -+ }); ++ mUnloading = true; ++ Iterator iterator = this.loadedChunkHashMap_KC.values().iterator(); // CraftBukkit + + while (iterator.hasNext()) + { + Chunk chunk = (Chunk)iterator.next(); + this.unloadChunksIfNotNearSpawn(chunk.xPosition, chunk.zPosition); + } ++ mUnloading = false; } public Chunk loadChunk(int p_73158_1_, int p_73158_2_) -@@ -103,9 +159,9 @@ +@@ -103,9 +143,10 @@ public Chunk loadChunk(int par1, int par2, Runnable runnable) { - long k = ChunkCoordIntPair.chunkXZ2Int(par1, par2); - this.chunksToUnload.remove(Long.valueOf(k)); - Chunk chunk = (Chunk)this.loadedChunkHashMap.getValueByKey(k); ++ if (mUnloading) return null; + this.chunksToUnload.remove(par1, par2); + Chunk chunk = (Chunk) this.loadedChunkHashMap_KC.get(LongHash.toLong(par1, par2)); + boolean newChunk = false; AnvilChunkLoader loader = null; if (this.currentChunkLoader instanceof AnvilChunkLoader) -@@ -113,6 +169,8 @@ +@@ -113,6 +154,8 @@ loader = (AnvilChunkLoader) this.currentChunkLoader; } @@ -170,13 +135,14 @@ // We can only use the queue for already generated chunks if (chunk == null && loader != null && loader.chunkExists(this.worldObj, par1, par2)) { -@@ -142,18 +200,19 @@ +@@ -142,18 +185,20 @@ public Chunk originalLoadChunk(int p_73158_1_, int p_73158_2_) { - long k = ChunkCoordIntPair.chunkXZ2Int(p_73158_1_, p_73158_2_); - this.chunksToUnload.remove(Long.valueOf(k)); - Chunk chunk = (Chunk)this.loadedChunkHashMap.getValueByKey(k); ++ if (mUnloading) return null; + this.chunksToUnload.remove(p_73158_1_, p_73158_2_); + Chunk chunk = (Chunk) this.loadedChunkHashMap_KC.get(LongHash.toLong(p_73158_1_, p_73158_2_)); + boolean newChunk = false; // CraftBukkit @@ -195,7 +161,7 @@ if (chunk == null) { chunk = this.safeLoadChunk(p_73158_1_, p_73158_2_); -@@ -176,18 +235,39 @@ +@@ -176,18 +221,39 @@ CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Exception generating new chunk"); CrashReportCategory crashreportcategory = crashreport.makeCategory("Chunk to be generated"); crashreportcategory.addCrashSection("Location", String.format("%d,%d", new Object[] {Integer.valueOf(p_73158_1_), Integer.valueOf(p_73158_2_)})); @@ -240,12 +206,13 @@ } return chunk; -@@ -195,11 +275,29 @@ +@@ -195,13 +262,32 @@ public Chunk provideChunk(int p_73154_1_, int p_73154_2_) { - Chunk chunk = (Chunk)this.loadedChunkHashMap.getValueByKey(ChunkCoordIntPair.chunkXZ2Int(p_73154_1_, p_73154_2_)); - return chunk == null ? (!this.worldObj.findingSpawnPoint && !this.loadChunkOnProvideRequest ? this.defaultEmptyChunk : this.loadChunk(p_73154_1_, p_73154_2_)) : chunk; ++ if (mUnloading) return null; + // CraftBukkit start + Chunk chunk = (Chunk) this.loadedChunkHashMap_KC.get(LongHash.toLong(p_73154_1_, p_73154_2_)); + chunk = chunk == null ? (shouldLoadChunk() ? this.loadChunk(p_73154_1_, p_73154_2_) : this.defaultEmptyChunk) : chunk; // Cauldron handle forge server tick events and load the chunk within 5 seconds of the world being loaded (for chunk loaders) @@ -271,9 +238,12 @@ - private Chunk safeLoadChunk(int p_73239_1_, int p_73239_2_) + public Chunk safeLoadChunk(int p_73239_1_, int p_73239_2_) // CraftBukkit - private -> public { - if (this.currentChunkLoader == null) +- if (this.currentChunkLoader == null) ++ if (mUnloading || this.currentChunkLoader == null) { -@@ -209,6 +307,7 @@ +- return null; +- } +@@ -209,6 +296,7 @@ { try { @@ -281,7 +251,7 @@ Chunk chunk = this.currentChunkLoader.loadChunk(this.worldObj, p_73239_1_, p_73239_2_); if (chunk != null) -@@ -217,8 +316,11 @@ +@@ -217,8 +305,11 @@ if (this.currentChunkProvider != null) { @@ -293,7 +263,7 @@ } return chunk; -@@ -231,7 +333,7 @@ +@@ -231,7 +322,7 @@ } } @@ -302,7 +272,7 @@ { if (this.currentChunkLoader != null) { -@@ -246,7 +348,7 @@ +@@ -246,7 +337,7 @@ } } @@ -311,7 +281,7 @@ { if (this.currentChunkLoader != null) { -@@ -254,15 +356,18 @@ +@@ -254,15 +343,18 @@ { p_73242_1_.lastSaveTime = this.worldObj.getTotalWorldTime(); this.currentChunkLoader.saveChunk(this.worldObj, p_73242_1_); @@ -331,7 +301,7 @@ } } -@@ -277,6 +382,35 @@ +@@ -277,6 +369,35 @@ if (this.currentChunkProvider != null) { this.currentChunkProvider.populate(p_73153_1_, p_73153_2_, p_73153_3_); @@ -367,7 +337,7 @@ GameRegistry.generateWorld(p_73153_2_, p_73153_3_, worldObj, currentChunkProvider, p_73153_1_); chunk.setChunkModified(); } -@@ -286,11 +420,13 @@ +@@ -286,11 +407,13 @@ public boolean saveChunks(boolean p_73151_1_, IProgressUpdate p_73151_2_) { int i = 0; @@ -384,7 +354,7 @@ if (p_73151_1_) { -@@ -325,36 +461,60 @@ +@@ -325,36 +448,60 @@ { if (!this.worldObj.levelSaving) { @@ -465,7 +435,7 @@ if (this.currentChunkLoader != null) { this.currentChunkLoader.chunkTick(); -@@ -371,7 +531,7 @@ +@@ -371,7 +518,7 @@ public String makeString() { @@ -474,7 +444,7 @@ } public List getPossibleCreatures(EnumCreatureType p_73155_1_, int p_73155_2_, int p_73155_3_, int p_73155_4_) -@@ -386,8 +546,31 @@ +@@ -386,8 +533,31 @@ public int getLoadedChunkCount() { diff --git a/src/main/java/kcauldron/wrapper/LongHashMapTrove.java b/src/main/java/kcauldron/wrapper/LongHashMapTrove.java deleted file mode 100644 index b3a8bb4..0000000 --- a/src/main/java/kcauldron/wrapper/LongHashMapTrove.java +++ /dev/null @@ -1,40 +0,0 @@ -package kcauldron.wrapper; - -import gnu.trove.map.TLongObjectMap; -import net.minecraft.util.LongHashMap; - -public class LongHashMapTrove extends LongHashMap { - private final TLongObjectMap mMap; - - public LongHashMapTrove(TLongObjectMap map) { - mMap = map; - } - - @SuppressWarnings("unchecked") - @Override - public void add(long key, Object value) { - mMap.put(key, (T) value); - } - - @Override - public int getNumHashElements() { - return mMap.size(); - } - - @Override - public Object getValueByKey(long key) { - return mMap.get(key); - } - - @Override - public boolean containsItem(long key) { - return mMap.containsKey(key); - } - - @Override - public Object remove(long key) { - return mMap.remove(key); - } - - -} diff --git a/src/main/java/kcauldron/wrapper/VanillaChunkHashMap.java b/src/main/java/kcauldron/wrapper/VanillaChunkHashMap.java deleted file mode 100644 index 3e04f1c..0000000 --- a/src/main/java/kcauldron/wrapper/VanillaChunkHashMap.java +++ /dev/null @@ -1,36 +0,0 @@ -package kcauldron.wrapper; - -import gnu.trove.map.TLongObjectMap; -import net.minecraft.world.chunk.Chunk; - -import org.bukkit.craftbukkit.util.LongHash; - -public class VanillaChunkHashMap extends LongHashMapTrove { - public VanillaChunkHashMap(TLongObjectMap map) { - super(map); - } - - private static long V2B(long key) { - return LongHash.toLong((int) (key & 0xFFFFFFFFL), (int) (key >>> 32)); - } - - @Override - public void add(long key, Object value) { - super.add(V2B(key), value); - } - - @Override - public boolean containsItem(long key) { - return super.containsItem(V2B(key)); - } - - @Override - public Object getValueByKey(long key) { - return super.getValueByKey(V2B(key)); - } - - @Override - public Object remove(long key) { - return super.remove(V2B(key)); - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 9318634..04f4a7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1,7 +1,5 @@ package org.bukkit.craftbukkit; -import gnu.trove.procedure.TObjectProcedure; - import java.io.File; import java.util.ArrayList; import java.util.Collection; @@ -138,7 +136,7 @@ public boolean isChunkLoaded(int x, int z) { } public Chunk[] getLoadedChunks() { - Object[] chunks = world.theChunkProviderServer.loadedChunkHashMap_KC.values(); + Object[] chunks = world.theChunkProviderServer.loadedChunkHashMap_KC.values().toArray(); org.bukkit.Chunk[] craftChunks = new CraftChunk[chunks.length]; for (int i = 0; i < chunks.length; i++) { @@ -278,6 +276,7 @@ private void chunkLoadPostProcess(net.minecraft.world.chunk.Chunk chunk, int x, if (chunk != null) { world.theChunkProviderServer.loadedChunkHashMap_KC.put(LongHash.toLong(x, z), chunk); world.theChunkProviderServer.loadedChunks.add(chunk); // Cauldron - vanilla compatibility + world.theChunkProviderServer.loadedChunkHashMap.add(ChunkCoordIntPair.chunkXZ2Int(x, z), chunk); chunk.onChunkLoad(); @@ -1393,25 +1392,40 @@ public void processChunkGC() { return; } - final net.minecraft.world.gen.ChunkProviderServer cps = world.theChunkProviderServer; - cps.loadedChunkHashMap_KC.forEachValue(new TObjectProcedure() { - @Override - public boolean execute(net.minecraft.world.chunk.Chunk chunk) { + //final net.minecraft.world.gen.ChunkProviderServer cps = world.theChunkProviderServer; + //cps.loadedChunkHashMap_KC.forEachValue(new TObjectProcedure() { + //@Override + //public boolean execute(net.minecraft.world.chunk.Chunk chunk) { // If in use, skip it - if (isChunkInUse(chunk.xPosition, chunk.zPosition)) { - return true; - } - + // if (isChunkInUse(chunk.xPosition, chunk.zPosition)) { + //return true; + //} +// // Already unloading? - if (cps.chunksToUnload.contains(chunk.xPosition, chunk.zPosition)) { - return true; - } - + //if (cps.chunksToUnload.contains(chunk.xPosition, chunk.zPosition)) { + //return true; + //} +// // Add unload request - cps.unloadChunksIfNotNearSpawn(chunk.xPosition, chunk.zPosition); - return true; - } - }); + //cps.unloadChunksIfNotNearSpawn(chunk.xPosition, chunk.zPosition); + //return true; + //} + //}); + net.minecraft.world.gen.ChunkProviderServer cps = world.theChunkProviderServer; + for (net.minecraft.world.chunk.Chunk chunk : cps.loadedChunkHashMap_KC.values()) { + // If in use, skip it + if (isChunkInUse(chunk.xPosition, chunk.zPosition)) { + continue; + } + + // Already unloading? + if (cps.chunksToUnload.contains(chunk.xPosition, chunk.zPosition)) { + continue; + } + + // Add unload request + cps.unloadChunksIfNotNearSpawn(chunk.xPosition, chunk.zPosition); + } } // Spigot start