All indices problem

why i get segmentation fault?