When an item is consumed, all the items do not move up one, instead the spot in the inventory that was consumed remains blank and the last item is deleted temporarily. For example *=Item, X=Blank spot
* * * * * *
six items
* * * X *
item four is consumed leaving and open blank spot and item six disappears
But when a new item is discovered
* * * X * * *
Item six reappears but Item four still remains blank
------
I think this may cause the crash when inventory is full as there could be the possibility that the inventory is full but the last item is invisible because of the bug, so when you pick up a new item, it doesn't say inventory full because the last item reads as missing, but then it adds the new item and the last item and then there is one more than the maximum and the games like, oh no that doesn't work.
Hope this helps