The Issue
Some 16-bit dos doors are a bit sensitive in DOSEMU 1.4, I have found that running the i386 version of DOSEMU eliminated a lot of issues I faced with compatibility.
The main problem I was faced with with an unexpected CPU exception error that was not very descriptive (at least to my eyes). Since I am not familiar with debugging these kinds of issues with dos applications I quickly turned to trial and error troubleshooting.
The Error
In Console:
ERROR: unexpected CPU exception 0x0d err=0x00000000 cr2=000010a1 while in vm86 (DOS)
Program=sigsegv.c, Line=193
EIP: 4d74:00000091 ESP: 5d22:00003ff8 VFLAGS(b): 00000 01110010 10010111
EAX: 0104572b EBX: 00000064 ECX: 00000037 EDX: 00000043 VFLAGS(h): 00007297
ESI: 00000264 EDI: 0000006c EBP: 00003ffa DS: 5000 ES: 0040 FS: 0000 GS: 0000
FLAGS: CF PF AF SF IF NT RF VM VIF IOPL: 3
STACK: 00 fc 46 72 d1 02 74 4d 8a 00 -> 13 00 00 00 95 05 ac 05 00 00
OPS : e8 3c 02 f7 d0 f7 d2 b9 37 00 -> f7 f1 a3 c4 cf 1e 0e 1f ba 38
f7f1 4d74:0091 div cx
Dosemu_boot.log:
... * Fault out of DOSEMU code, cs:eip=33:4abd40, cr2=124b, fault_cnt=1 * Fault out of DOSEMU code, cs:eip=33:4abd40, cr2=124b, fault_cnt=1 * Fault out of DOSEMU code, cs:eip=33:4abd40, cr2=124b, fault_cnt=1 * Fault out of DOSEMU code, cs:eip=33:4abd40, cr2=124b, fault_cnt=1 * Fault out of DOSEMU code, cs:eip=33:4abd40, cr2=124b, fault_cnt=1 ============================================================== CPU exception 0x00 err=0x00000000 cr2=000010a1 eip=7fe667b2598a ============================================================== ============================================================== CPU exception 0x0d err=0x00000000 cr2=000010a1 eip=0047934d ============================================================== ERROR: unexpected CPU exception 0x0d err=0x00000000 cr2=000010a1 while in vm86 (DOS) leavedos(dosemu_fault1|204) called - shutting down leavedos() called from within a signal context! ======================= LEAVE CPU-EMU ===============
The Fix
A few hours of fiddling around and I decided to move from the amd64 dosemu binaries and install the i386 version of DOSEMU and whalla, problem solved.
In Debian 9.5 stretch to uninstall and re-install the i386 version of DOSEMU issue the following commands (assuming you already have DOSEMU installed):
dpkg --add-architecture i386 apt remove dosemu* apt-get update apt install dosemu:i386
…and that should take care of the problem.
There is no need to delete your configuration files/hdimage, etc. from your existing amd64 dosemu installation.