latex and pdftex hangs when compiling
What worked for me on Windows 7:
Reboot.
Install all latest MiKTeX updates:
Reboot.
Refresh FNDB (file name database) using MikTeX Options:
During this step, additional packages were installed.
The reboots were done because, after testing, there were issues with processes locking files.
Possibly related: On my system I got an error message about a missing QT5 DLL, which I solved by installing package: miktex-qt5-bin
I had to delete my *.aux file and there was a *.synctex(busy) file which I also deleted. Then I could compile again.