MSDOS No Recovery Protocol Error

As I was doing some code bashing and opening files is MS DOS this error message appeared. What seems to cause this error? If I close the program my file that I was working on will not be saved since this is MS DOS and there is no recovery protocol. What to do? Any advice to prevent this in the future?

16 bit MS-DOS Subsystem
<path>PDFXVwer.exe
The NTVDM CPU has encountered an illegal instruction.
CS:0546 IP:017fOP:65 2e 63 73 73 choose close to terminate the application
