As soon as you think you have exhausted all of your resources. As soon as you think there is nothing else you can do. As soon as your back is up against the wall and there are no more options. This is when you are the most creative.
You have tried all your ideas so you have to come up with new ones. These new ideas are often so creative that you do not even think it will work. Try it anyway and see what happens.
This is running into the wall as compared to running through the wall. There is no such thing as writers block. Just keep writing.