I had an issue a couple of years back, we have a back end task which invokes a powerpoint converter to convert ppt files to JPGs and PDFs, and it occasionally kept locking up and the task kept freezing. After digging into it we found that if the PPT file was password protected, or if powerpoint.exe crashed, a modal dialog box would appear preventing the task from ever completing.
Ended up putting another task on the same server which read the start time from the main task, and killing it after a few minutes like a watchdog