[MC-3409] Single player mode, creative mode, E to select block, select block from grid, E to return to game, game freezess, crash log created Created: 18/Nov/12  Updated: 23/Mar/13  Resolved: 04/Mar/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.4, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w09a, Snapshot 13w09b
Fix Version/s: Snapshot 13w10a

Type: Bug
Reporter: Jim Richane Assignee: [Mojang] Jeb (Jens Bergensten)
Resolution: Fixed Votes: 3
Labels: None
Environment:

Windows 7, Java 7, update 7


Attachments: Text File crash-2012-11-18_09.08.59-client.txt    
Issue Links:
Duplicate
is duplicated by MC-5357 Minecraft crashes when leaving invent... Resolved
is duplicated by MC-5419 Crashing every time Resolved
is duplicated by MC-5499 When my son goes into inventory then ... Resolved
is duplicated by MC-5582 Constant Crashing Resolved
is duplicated by MC-5605 Minecraft crashes Resolved
is duplicated by MC-5926 crashes when exiting the inventory sc... Resolved
is duplicated by MC-6566 Keeps Crashing when attempting to upd... Resolved
is duplicated by MC-7330 My Minecraft Crashes whenever I leave... Resolved
is duplicated by MC-7371 when opening inventory to choose blo... Resolved
is duplicated by MC-7864 Crashes after exiting inventory Resolved
is duplicated by MC-8481 World crashes when inventory is exited Resolved
is duplicated by MC-8519 crashwhilst playing Resolved
is duplicated by MC-9003 Crashes when exiting inventory "e" Resolved
is duplicated by MC-9409 crashing after using inventory Resolved
is duplicated by MC-10178 game crashes in create mode Resolved
is duplicated by MC-10190 Crash when closing Inventory Resolved
is duplicated by MC-10494 I start playing and in about two minu... Resolved
is duplicated by MC-10884 Bringing up the Building Blocks selec... Resolved
is duplicated by MC-10887 Experiencing Crash every time leaving... Resolved
is duplicated by MC-11176 Minecraft crash when exiting Inventory Resolved
is duplicated by MC-11292 crashing after opening inventory Resolved
is duplicated by MC-11295 Crashes every time I escape inventory Resolved
is duplicated by MC-11497 Minecraft 1.4.7 Consistently Crashing... Resolved
is duplicated by MC-11501 Game crashed on java key down event Resolved
is duplicated by MC-3414 Minecraft crashes when leaving creati... Resolved
is duplicated by MC-4319 Crashing I feel sad now :( Descriptio... Resolved
is duplicated by MC-4766 crashes when you push the e button Resolved
is duplicated by MC-4856 Hello. We are on a Mac OS X 10.6.8. W... Resolved
is duplicated by MC-4999 CRASH: Description: Updating screen e... Resolved
is duplicated by MC-5274 my account keeps crashing Resolved
CHK:
Confirmation Status: Community Consensus

 Description   

Single player mode > creative mode > E to select block > select block from grid > E to return to game > game freezes > crash log created.



 Comments   
Comment by Markku [ 28/Feb/13 ]

Yes, that would indeed better fix. Alas, the changes would be all over the place, so not feasible to include the code for a fix here. I'd apply that fix shown above for now, and add a Mojang-internal task to "do things right" with better time.

Comment by Sir TLUL [ 28/Feb/13 ]

Wouldn't the better fix be to pipe all isDown queries through a decoder method that handles -100, etc as the correct mouse buttons? This would also mean future input methods could be more easily integrated with legacy code. This isn't a frequently-called method (relatively speaking) so it would add very little overhead.

Comment by Markku [ 28/Feb/13 ]

Affects 13w09b.

Comment by GrygrFlzr [ 08/Feb/13 ]

Andreas: Don't spread your personal information over the internet, I removed it from your comment.

Comment by Andreas [ 08/Feb/13 ]

Well, We can't say you did not spend any time on this...

Well done. Thanks.

Andreas

Regards,

Andreas Niederegger

Comment by Markku [ 07/Feb/13 ]

Reproducible, debugged, and crude fix found (and yet another thing to check for those with the problem).

Check
Ensure that the key configured for 'chat' is a keyboard key, not any mouse button.

Background
I was able to reproduce this crash (not 100% certainly the same reason, though) on win7 64-bit, java 7, MC 1.4.7. Normally I do not experience any of the described problems, but if I adjust my controls certain way, I can cause that crash (i.e. same stacktrace end).

The crash report reveals index out of bounds with value -100, and it is aimed at isKeyDown() method. Searching through the bulk of minecraft code revealed only one location that calls the method with anything else than hardcoded positive value: GuiContainerCreative.keyTyped(), which checks if the key bound to chat has been pressed.

Reproducing it
If that 'chat' key is (accidentally?) bound to mouse buttons (which are handled as key's with codes -100 etc.), then everything works upto opening inventory in creative... but there the next key press will hit this issue (unless already in the search tab) and the code asks LWJGL if the key with code -100 (for left mouse button for example) is down. LWJGL naturally knows nothing about negative key codes and hasn't protected itself from such "malicious" queries...

Fix

GuiContainerCreative.keyTyped(char, int)
        if (selectedTabIndex != CreativeTabs.tabAllSearch.getTabIndex()) {
            if (this.mc.gameSettings.keyBindChat.keyCode >= 0 &&   /* <-- ADDED */
                    Keyboard.isKeyDown(this.mc.gameSettings.keyBindChat.keyCode)) {
                ...

Tested on 1.4.7 and after that change, the inventory can be closed even if the chat is bound in a mouse button.

Comment by Andreas [ 19/Jan/13 ]

Same with us.
It's a read/write issue. Once I assigned administrator rights the problem was resolved

Good luck to all.

Comment by Tails [ 19/Jan/13 ]

I suggest voting for this issue to get more attention to it.

Comment by Michael Keller [ 19/Jan/13 ]

None of these solutions has worked for me. How long does it typically take Mojang to issue an official fix for something that is so severly impacting so many end-users? I am new to their world. Thanks.

Comment by Andreas [ 07/Jan/13 ]

Well done John
Ok, mental note of re-installing the application once the firewall is removed.
I did no have to do this but it should go on record...

Comment by John Dotson [ 07/Jan/13 ]

I change my firewall rules to allow Minecraft, and changed the program to run as Administrator (even though the only user account on the Win7 box is Adminstrator) to no avail. I then uninstalled and reinstalled Minecraft and the issue has disappeared. I am concerned as I did see a comment somewhere about having a 32bit version of Java instead of a 64bit, but can't find it again and couldn't do anything about it on my 32bit box anyway. Thanks to all who have commented here to help give me ideas to remediate.

Comment by Andreas [ 04/Jan/13 ]

Do you have a firewall enabled?
I had parenting controll enabled, once disabled and with full admin rights it worked for me.
I also googled this error and had a few links (which I did NOT need to check as the first thing the link asked to enable admin rights)

Sorry it does not work for you

Comment by Heather McBride [ 04/Jan/13 ]

I have logged into the account on 3 different computers and all have this issue. all three have administrator rights to the logged in user. is there any other fix to this issue?

Comment by Andreas [ 31/Dec/12 ]

Yes. But a Mac. OS X. Make sure you are logged on to the operating system (Mac or Pc) with administrator privilege. I think it has to do with permission. It worked for us. It has not crashed once. But please this might have just been the case for us and yours still crashes. Hope it works for you

Comment by John Dotson [ 30/Dec/12 ]

Logged onto pc as a different user?

Comment by Andreas [ 30/Dec/12 ]

I am not sure if anyone receives this but I tried to use the app under a different user and it does NOT crash. So on my MAC it was a permission issue. Ensure your user account you are logged on is administrator, has full read and write access and no parent control is set up or enabled.

This worked for me. Hope it works for all of you out there.

(somehow I don't think this is the fix though as I woul emagine the guys at minecraft would have tested that one)

Comment by John Dotson [ 30/Dec/12 ]

Agree with Georgia, why isn't there a fix. My sons spent some of their Christmas money to get this broken program.

Comment by Georgia Yancey [ 27/Dec/12 ]

Why is there no fix for this issue? We have the same problem and I see it was first posted in November.

Comment by Kumasasa [ 09/Dec/12 ]

Note:

Description: Updating screen events
java.lang.IndexOutOfBoundsException: -100
	at java.nio.DirectByteBuffer.get(Unknown Source)
	at org.lwjgl.input.Keyboard.isKeyDown(Keyboard.java:399)
	at avl.a(SourceFile:266)
Generated at Sun Jan 12 12:01:07 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.