Today, I used 1024 bytes for my thread's stack. It kept failing for an unknown reason. Even the debugger failed to run. After I doubled the size of the stack to 2048 bytes, the program worked very good and the debugger worked again. My program makes a multiple function calls. So, I can understand that it may require a larger stack to work with than a simpler program.
I want to share my experience with you because it seems impossible to debug when the stack is causing the program to crash too early. I did not have much clue especially when the debugger failed to work. I was lucky today to find the cause and get it to work.
In reply to codetricity: