Inventory system not adding items properly and returning infinity loop error

All slots already exist in a hidden way, and I just turn them visible once an item is included. After I clear it, the slot becomes invisible once again. Is that what you meant to ask?