vavr icon indicating copy to clipboard operation
vavr copied to clipboard

moving from 0.10.4 to io.vavr:vavr:1.0.0-alpha-4 results in this error

Open nagkumar opened this issue 2 years ago • 16 comments

java.lang.IncompatibleClassChangeError: Method 'io.vavr.collection.Stream io.vavr.collection.Stream.of(java.lang.Object[])' must be Methodref constant
	at io.vavr.test.Gen.frequency(Gen.java:277)
	at parse.dont.validate.NIRGenerator.<clinit>(NIRGenerator.java:16)
	at parse.dont.validate.MutatedProperties.invalidNIRCanNeverBeParsed(MutatedProperties.java:15)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:728)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:218)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:214)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:139)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:110)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:90)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:85)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)

nagkumar avatar May 16 '23 10:05 nagkumar

Oh, I logged back in with my alt that I was testing on. There was a bow as a helmet and a fishing rod as a chestplate. The bucket was also in the offhand. So, I guess it doesn't all go away completely, but most of it does.

emkirsh avatar Mar 13 '20 02:03 emkirsh

Confirmed on the following setup:

[00:44:33 INFO]: Server version: 1.15.2-R0.1-SNAPSHOT git-Paper-118 (MC: 1.15.2)
[00:44:33 INFO]: EssentialsX version: 2.17.2.1
[00:44:33 INFO]: LuckPerms version: 5.0.72
[00:44:33 INFO]: Vault version: 1.7.2-b107
[00:44:33 INFO]: EssentialsXProtect version: 2.17.2.1
[00:44:33 INFO]: EssentialsXChat version: 2.17.2.1
[00:44:33 INFO]: EssentialsXGeoIP version: 2.17.2.1
[00:44:33 INFO]: EssentialsXAntiBuild version: 2.17.2.1
[00:44:33 INFO]: EssentialsXSpawn version: 2.17.2.1

It seems the slots are incorrectly mapped when you do the movement action very quickly. Very strange. I've never noticed this because I typically take a second or two to move items. Also, it seems they are mapped to the same location For example, the top middle slot of your own inventory appears to teleport to the observed player's legging slot.

pop4959 avatar Mar 13 '20 07:03 pop4959

Yeah, and some just get flat-out deleted!

emkirsh avatar Mar 13 '20 13:03 emkirsh

Maybe this is asking for too much, but would it be better to convert this to a GUI, and also add a row for the armour and off hand? "Could" fix things and also improve on it

Chew avatar Apr 11 '20 21:04 Chew

Well, considering this is a plugin, not a mod, the only GUIs available are those in vanilla Minecraft. As far as I know, the only way to make a fully-integrated GUI with custom graphics and is not in the form of a vanilla inventory in Minecraft is to have a client-side mod and a server-side equivalent mod installed.

emkirsh avatar Apr 12 '20 03:04 emkirsh

plugins were made so that the players don't have to install mods to begin with, and even the most sophisticated GUIs on a server accessible by a vanilla client still make use of the chest-like inventory function.

emkirsh avatar Apr 12 '20 03:04 emkirsh

I wasn't clear, OpenInv for example has this: image

Top 4 rows mimic inventory, bottom row is armor + off hand. Something like this could work. Plus this works for offline players

Chew avatar Apr 12 '20 04:04 Chew

oh cool! and the armor would be great for punishing people offline! i used to manually go into my friend's playerdata files to paste in a cursed pumpkin with vanishing and binding on their heads.

emkirsh avatar Apr 12 '20 04:04 emkirsh

I am also experiencing this issue on my servers.

Running paper-136 with latest essentialsx dev build 2.18.0.22. Also experiencing this issue on the combination paper-133 with 2.18.0.0.

donvdp avatar Aug 19 '20 10:08 donvdp

bugg still excists in version 2.18.1.0. ive created a small movie about it: https://youtu.be/ihI5M5T4I0M

donvdp avatar Aug 25 '20 08:08 donvdp

Same here.. with /ec also happens

12.09 10:09:04 [Server] INFO Server version: 1.16.2-R0.1-SNAPSHOT git-Tuinity-"0b86de3" (MC: 1.16.2) 12.09 10:09:04 [Server] INFO EssentialsX version: 2.18.1.0 12.09 10:09:04 [Server] INFO PlaceholderAPI version: 2.10.10-DEV-108 12.09 10:09:04 [Server] INFO LuckPerms version: 5.1.96 12.09 10:09:04 [Server] INFO Vault version: 1.7.3-b131 12.09 10:09:04 [Server] INFO EssentialsXChat version: 2.18.1.0 12.09 10:09:04 [Server] INFO EssentialsXSpawn version: 2.18.1.0

niqofdez avatar Sep 12 '20 16:09 niqofdez

Closing this issue as there is nothing we can do about it but I will leave it pinned to the issue tracker

JRoy avatar Jan 11 '21 15:01 JRoy

Unpinning - see https://github.com/EssentialsX/Essentials/issues/3956#issuecomment-771694504 for recommendations.

mdcfe avatar Feb 02 '21 15:02 mdcfe

Recently, I also used the openInventory provided by Bukkit to access another player's inventory and has this same issue. However, I've identified the cause:

The player's inventory has a total of 40 slots. Indexes 0 through 8 refer to the hotbar. 9 throught 35 refer to the main inventory, indexes 36 throught 39 refer to the armor slots, index 40 refers to the off hand. However, when the client opens a player's ineventory, it can only seen slots 0 through 35, indexs greater than 36 refer to clientside player's inventory;

If a player uses a regular click (InventoryClickEvent), this issue doesn't arise. However, when a player drags items (or performs actions too quickly, causing the client to interpret it as a drag operation), it triggers an InventoryDragEvent. For instance, if a player accidentally uses dragging to place an item into their inventory's first slot (index 36), Bukkit, upon receiving this event, thinks index 36 referers to the player's helmet slot, equipping the item as a helmet. Because the clientside player cannot see items beyond index 36, it assumes the item has disappeared.

Here is my solution: Listen to InventoryDragEvent and cancel it if player drag items to their inventory

@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onDropFakePlayerInventory(@NotNull InventoryDragEvent event) {
    var top = event.getView().getTopInventory();
    if (top.getType() == InventoryType.PLAYER && top.getHolder() instanceof Player player ) {
        if (event.getInventorySlots().stream().anyMatch(slot -> slot > 35)) {
            event.setCancelled(true);
        }
    }
}

tanyaofei avatar Nov 12 '23 10:11 tanyaofei

Hey thanks for letting us know - we'll take a look (or if you like, feel free to make a PR yourself with the proposed fix).

pop4959 avatar Nov 12 '23 10:11 pop4959

Hey thanks for letting us know - we'll take a look (or if you like, feel free to make a PR yourself with the proposed fix).

Hey, hello! Has the bug been fixed? if not, i'd be happy to submit a PR to fix it.

tanyaofei avatar Aug 12 '24 02:08 tanyaofei