While having the debug menu pie chart enabled (shift+F3), then changing any settings and eventually quitting the world will cause the game to crash with an ArrayIndexOutOfBoundsException. Please note that before the error occurs the following string is printed in the Minecraft game output console:
Something's taking too long! 'root' took aprox ... msSnippet from the error:
java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(ArrayList.java:418)
at java.util.ArrayList.remove(ArrayList.java:495)
at vn.e(SourceFile:103)
at bnv.b(SourceFile:889)
at bnv.a(SourceFile:382)
at net.minecraft.client.main.Main.main(SourceFile:140)
Duplicate of MC-123585. Please use the search function next time.