LWJGL Forum

Archive => Resolved Bugs/RFE => Topic started by: Sworddragon on February 04, 2012, 10:44:10

Title: [CLOSED] Visible mouse cursor in Minecraft
Post by: Sworddragon on February 04, 2012, 10:44:10
I'm using LWJGL #1544 (LWJGL 2.8.3 is affected too) with Minecraft (Linux 64 Bit and OpenJDK 7) and sometimes I'm seeing the mouse cursor of my desktop in the game. This happens if I'm in a world and pressing ESC to call the menu and clicking on "Back to Game" in this menu (this happens ~every 10 tries). The mouse cursor removes if I'm pressing a few times on my mouse (for example a few left mouse clicks).
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Matzon on February 04, 2012, 13:57:13
Does it happen in non-minecraft and especially jdk6 code too?
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Sworddragon on February 04, 2012, 16:01:17
It happens on OpenJDK 6 too. If it happens on other java applications I don't know because Minecraft is the only application for which I need OpenJDK. If the system is under heavy load there is even a high chance that after clicking "Back to game" the same menu is opened again (it is temporary the same issue as http://lwjgl.org/forum/index.php/topic,4315.0.html).

The used jdk builds were:

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11) (6b24-1.11-0ubuntu1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)


java version "1.7.0_147-icedtea"
OpenJDK Runtime Environment (IcedTea7 2.0) (7~b147-2.0-1ubuntu2)
OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Matzon on February 05, 2012, 09:35:32
well, fwiw, I think you should contact minecraft support for this. There is nothing saying that there is a general issue with visible cursor in lwjgl in general.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Sworddragon on February 05, 2012, 11:20:50
Maybe this is a Minecraft issue but this is difficult to say. But I'm not trying to contact the support because I tried this already in the past and had no success. The support is in my opinion really bad at Mojang and they have only a pseudo bug tracker. A report there would be just a waste. This bug is only a minor issue and I can live with it. Maybe it will be fixed randomly in the future.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Matzon on February 05, 2012, 20:22:28
I understand your point of view, but as we dont have report of a general linux issue, we will for the time being, probably assume its a minecraft issue.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: kappa on February 05, 2012, 20:34:00
IIRC Minecraft doesn't use LWJGL's mouse grab calls but instead rolls its own version using AWT.

Remember this as there use to be a mouse grab bug on windows (http://lwjgl.org/forum/index.php/topic,3192.0.html) with LWJGL 2.4 (which Minecraft still uses!). The bug has long since been fixed and Notch still owes spasi a beer for fixing it :)
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Fool Running on February 06, 2012, 13:43:48
Quote from: Sworddragon on February 04, 2012, 10:44:10
I'm using LWJGL #1544 (LWJGL 2.8.3 is affected too) with Minecraft (Linux 64 Bit and OpenJDK 7) and sometimes I'm seeing the mouse cursor of my desktop in the game. This happens if I'm in a world and pressing ESC to call the menu and clicking on "Back to Game" in this menu (this happens ~every 10 tries). The mouse cursor removes if I'm pressing a few times on my mouse (for example a few left mouse clicks).
I'm curious why you replaced the LWJGL that comes with Minecraft with a different version? And, for that matter, why you expect there to be no problems. ;D

Minecraft as it is released does not have this problem.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Sworddragon on February 06, 2012, 18:22:15
Quote from: Matzon on February 05, 2012, 09:35:32
well, fwiw, I think you should contact minecraft support for this. There is nothing saying that there is a general issue with visible cursor in lwjgl in general.

Quote from: kappa on February 05, 2012, 20:34:00
IIRC Minecraft doesn't use LWJGL's mouse grab calls but instead rolls its own version using AWT.

I have tested this now with LWJGL 2.8.1 and all is working fine. Even if I force a heavy load of my system with other tasks the problem doesn't appear. On clicking "Back to game" I can see how the mouse cursor is removing and after ~1 second (because of the heavy load) the menu is closing. This could be an indication that this is an issue with LWJGL 2.8.3.


Quote from: kappa on February 05, 2012, 20:34:00Remember this as there use to be a mouse grab bug on windows (http://lwjgl.org/forum/index.php/topic,3192.0.html) with LWJGL 2.4 (which Minecraft still uses!). The bug has long since been fixed and Notch still owes spasi a beer for fixing it :)

Interesting that the version is so old (how can I figure it out?). I remember some months ago I was using the distributed version of LWJGL with Minecraft for ~1 year and had an annoying bug. On clicking in the game the window lost for a really short time the focus and the mouse cursor was visible. If an already pressed key was released in this time it get locked. My character in Minecraft was so running often automatically into the death.


Quote from: Fool Running on February 06, 2012, 13:43:48I'm curious why you replaced the LWJGL that comes with Minecraft with a different version? And, for that matter, why you expect there to be no problems. ;D

The outdated version of LWJGL distributed with Minecraft has more annoying bugs (see above or my linked thread). Using a newer version was much more comfortable. This allows me even to report bugs that I can find in LWJGL.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Sworddragon on August 06, 2012, 14:24:32
The bug still exists in LWJGL 2.8.4 and the newest trunk. With Minecraft 1.3 it is now possible to play a demo version for a few days if you haven't purchased the game. Maybe you can try to reproduce the bug with LWJGL 2.8.4 or higher and compare it with LWJGL 2.8.1.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: princec on August 06, 2012, 18:58:28
Do you get the problem with Revenge of the Titans?

Cas :)
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Sworddragon on August 07, 2012, 07:23:49
I have tested this with the game but it never uses the mouse cursor from my desktop environment if I'm pausing the game.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: princec on August 07, 2012, 08:43:58
Bug would appear to be back in Mojang's court then.

Cas :)
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Sworddragon on August 08, 2012, 07:52:14
Why should it be a problem with Minecraft? That the mouse cursor from the desktop environment appears if the game is paused is the normal behavior. On unpausing the mouse cursor disappears on LWJGL 2.8.1 but not on LWJGL 2.8.4. Have you already tried to reproduce it? :)
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: princec on August 08, 2012, 08:53:36
This kind of problem is for Mojang to sort out. When they come up with an official bug report with all the attendant requirements, someone will be able to look in to it, but until then, it's their problem.

Cas :)
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: kappa on August 08, 2012, 09:05:39
Agreed, we don't even know whether they use the LWJGL Mouse Grab API or some custom AWT solution. Last I heard (a few year back now) they were using AWT but its unknown whether its since been changed.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Sworddragon on August 08, 2012, 11:30:27
In this case I don't understand why this bug happens in LWJGL 2.8.4 but not in LWJGL 2.8.1.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: princec on August 08, 2012, 12:00:04
Because Mojang haven't tested their code against 2.8.4, that's why.

Cas :)
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Sworddragon on April 24, 2013, 00:57:02
I have tested this again with LWJGL 2.9.0. The behavior of the bug has changed a little - it has now a ~95% reproducing chance. I'm wondering why this bug has a different behavior on different versions: 2.8.1 is working fine, 2.8.3+ has a ~10% reproducing chance and 2.9.0 has a ~95% reproducing chance.

In this case it is a disadvantage that Minecraft is not free. If somebody of you would be able to test this it would maybe easier to say if it is a Minecraft or LWJGL bug.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: princec on April 24, 2013, 07:54:31
Until someone makes a simple testcase to prove it, it's still Minecraft's problem. Indeed, until Minecraft is actually released with LWJGL 2.9.0... it's really nobody's business to speculate.

Cas :)
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: Sworddragon on July 03, 2013, 08:42:47
Minecraft 1.6.1 is now out and officially uses LWJGL 2.9.0. The bug doesn't appear there anymore so I think this thread can be moved.
Title: Re: [BUG] Visible mouse cursor in Minecraft
Post by: kappa on July 03, 2013, 08:46:40
cool, thanks for following up and reporting that the problem is fixed.