I found an infinite anything* glitch that has to do with the chest.
Step 1: Get two stacks of the resource you want to get. Make sure they have different amounts and they add up to 100 or more.
Step 2: Put both stacks in a chest.
Step 3: Try to get one on your inventory.
Bam.
*Any farmable resource