When I have many programs running, and try to shutdown the computer, it will get stuck. The shutdown flashes, and just does not do anything. So I have to push the power button to shutdown. Is it a bug?
It's not a bug. Check the log files to see what could be causing this. I don't have any issues with shutdown or freezing with my Ubuntu 12.04, now running for over a month. I did have this issue on the 10.04 LTS version but none here. It's most likely a software that prevents Ubuntu to shutdown as the program could still be processing. It may see that nothing is running to you but in the backend there are programs running. One of these programs (possibly a third party application) could be causing this issue. There are several other reasons why this could happen, apart from just the program interference. Hopefully someone will shed some light on these.
Check the output when you type in the following