Can you check the console log? It is in the Eclips as shown in the attachment here. Mainly it will be the memory size isn't enough. you have two ways to solve this issue:
Simply you can increase the memory size in Qsys and regenerate the HDL file then recompile the system again.
2- Right click the project>>properties>> NIOS II application properties>> Change the Debug level and optimization level. Then Right click your BSP project>>NIOS II>>BSP editor>>settings>> Enable small C library.
If the second option doesn't work then you must increase your memory (1st option).