Project Red - Illumination

Project Red - Illumination

37M Downloads

client crash

0uti opened this issue ยท 7 comments

commented

You seem to have two versions of project red.

commented

@kenzierocks No that's the versions that can cause this crash (I think openeye does it like that)
This is the same as #478 although it was said to be unreproducible.

Can't think what it would be, not item damage because it happens when listed in the creative inventory (GuiContainerCreative) which is a controlled item stack.
Maybe it was caused by an update from 1.6 -> 1.7? @0uti is this an old world updated or a new world?

commented

this is a singleplayer creative world and not ported from 1.6.

commented

Found the reason for this error. Yay!

It's a very simple boolean logic issue; the AND function has a higher precedence than the OR function.

In terms of this crash, it is in items.scala:237
stack.hasTagCompound was being ANDed with Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)
THEN ORed with Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)

So like
Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) && stack.hasTagCompound))

To fix, simply place brackets around correctly

if ((Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)||Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) && stack.hasTagCompound)
commented

@0uti OK. Out of pure random messing I was able to reproduce this error. Now time to find the cause.

Edit
Found 2 ways to reproduce this crash

  1. In creative inventory hold shift and click on the Search Items tab
  2. Again in the creative inventory, in the Search Items textbox, type an upper-case letter (i.e. press shift + letter)
commented

Fixed via aa3e05c

commented

nice one :)