Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My Windows command prompt will randomly freeze up when running an Ant script. The script has no spots in it where it waits for user input.

Also, when it freezes I can unfreeze it by focusing the command window and pressing enter. After pressing enter, the process continues.

This happens completely randomly. And it seems like it will eventually continue on its on, but it will sit there for several minutes before continuing. But if I press enter, it does it instantly.

What is going on?

(Would this be better for Stack Overflow? I do not believe this has anything to do with my code, because there is no spot asking for user input. So i am assuming it has something to do with Windows.)

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I may have found the issue. Through some trial and error it seems that when i click in the command prompt it freezes the console. When i press escape (to take the cursor out of the window) it unfreezes the console.

So, to avoid this problem, i just don't click in the windows command prompt window while anything is running.

share|improve this answer
    
This has happened to me, too (in fact, I only found this question because I was typing one), but it has happened regardless of whether I have clicked in the window or not. To give you an example, I had a server that I started via the command line and then left running on a machine that didn't have any users. When accessing it, instructions would hang because the command prompt was "stuck" waiting for a keypress (exactly like your symptom). Seems few have had this problem, so there is no solution yet. –  K. Carpenter Mar 14 at 1:25

I completely disagree that it has anything to do with Windows.

My reasoning is this: when you focus on the window and press Enter, it continues working.

There's a problem with your script, not Windows, and not the command prompt.

share|improve this answer
    
You are wrong. Please see my answer that is posted. –  prolink007 May 4 '12 at 15:54
    
This is a user error, and I maintain that there is nothing wrong with Windows or the command prompt. –  user3463 May 4 '12 at 21:01
    
It's a "feature", not a bug :-) –  Aaron Blenkush Oct 2 '13 at 23:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.