Why does make often crash creating a sh.exe.stackdump file when I try to compile my source code?
If you experience random crashes with make as well as with the msysinfo command (i.e., repeating the command often allows to compile the source code succesfully), the issue might be caused by the Logitech QuickCam software. Here is a solution to this issue:
- type the command services.msc from a command prompt (you will need administrator privileges to do this), then find the "Logitech Process Monitor" service, and change the “Startup type” from “Auto” to “Manual”. Do the same with the "LVSrvLauncher" service.
- type the command regedit from the command prompt (you will need administrator privileges to do this), then find the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Among the other REG_SZ keys, there should be three of them related to the Logitech QuickCam, namely: "LogitechCommunicationsManager", "LogitechQuickCamRibbon", "LVCOMSX". Make a backup of the registry, then remove them.
- Reboot your PC.
In this way the Logitech QuickCam daemon will be no longer available but the camera will keep working just fine with 3rd party software (e.g., Skype). If you want a less drastic solution, just kill the lvprcsrv.exe process whenever you want to use MSYS by typing at the command prompt: pskill -t lvprcsrv.exe (you will need PsTools and administrator privileges to do this). However, as soon as you will plug in the USB cable of your Logitech QuickCam, the daemon will be restarted, while with the first procedure it won’t.
This FAQ entry has been reproduced from the MinGW FAQ


