Performance Issue probably run out of Ram

I am not sure if i Run out of memory i am just wondering why the code works without the marked code line(see code main program above) but it doesent with the two more lines. It also won't run when I try to print a text in the loop og the lightUpLeds function.

I also now that the marked code line works when it's the only line which is compiled by me