How to Fix General Protection Fault in module WIN87EM.DLL while running Windows 7 in VMWare
Recently ran into an issue with a Windows 7 32-bit VM running in VMware Fusion on Mac OSX 10.9 (Mavericks) when running a Point of Sale application would receive a Application has caused a general protection fault in module WIN87EM.DLL. Starting doing some digging and found this thread discussing the issue at http://social.technet.microsoft.com/Forums/en-US/e0922437-0dc7-4091-a8f7-fadc7fb5bbb5/general-protection-fault-in-module-win87emdll-while-running-windows-xp-mode?forum=w7itprovirt.
Basically the issue is that when you try to run a legacy 16-bit application in Windows XP and above you will receive the GPF (General Protection Fault).
The Windows 80×87 emulator library, WIN87EM.DLL, works at the 16-bit-Windows level to virtualize the coprocessor among multiple Windows-based applications that run inside the system VM.
It appears to me that, with the Virtual Machine using a Virtualized Processor (not related to the above reference to “virtualized coprocessor”) as opposed to an emulated processor, the Virtual Math Coprocessor Device (VMCPD) and/or WIN87EM.DLL generate an error from the virtualized processor.
So how do we fix it. Simple enough you just have to to “hiding” the math coprocessor from the Virtual Machine, so it doesn’t go to the processor. This apparently can be achieved by using a program called WinFloat which includes a tool called HIDE87, which is suppose to hide the math coprocessor from the kernel.
Lucky for us you can download winfloat from http://www.conradshome.com/win31/archive/.
- Click on winfloat.exe to download to a directory. Once downloaded double-click to extract the files.
- Copy HIDE87.com to c:\windows\system32 directory
- Add lh c:\windows\system32\HIDE87.com as the first line to the c:\windows\system32\autoexec.nt file.
- Reboot virtual machine
The error should now be gone. This will work with virtual machines running on Virtualbox and VMWare.
hello !
i cannot find the file “HIDE87.com”, after extraction process
Good morning,
I don’t understand this line. Can you explain?
Add to lh c:\windows\system32\autoexec.nt file for the first line:
I had a typo in there, thanks for bringing that up. Here is what it should say.
Add lh c:\windows\system32\HIDE87.com as the first line to the c:\windows\system32\autoexec.nt file.
The lh stands for load in high memory.
Hi newlife007,
It works great. Now I can use my old software in Virtual Box.
I thank you very very much.
Regards,
Karel
i still strugle in this line Add lh c:\windows\system32\HIDE87.com as the first line to the c:\windows\system32\autoexec.nt file. , what should i do actually?
Find the file called c:\windows\system32\autoexec.nt on your Windows 7 install and add the line lh c:\windows\system32\HIDE87.com to it. Save the file and reboot the Windows 7 virtual machine. The line is telling Windows to load the HIDE87.com file in high memory and will get rid of the error.
Thanks for your steps. My issue was not with a VM whatsoever so these steps can also be used for win87em.dll exceptions running natively in win7 x86.
Thanks for the help. It worked successfully.
🙂
Awesome!
How To Fix Win87em.dll – STEPS
1. Download winfloat.exe from http://www.conradshome.com/win31/archive/
2. Open winfloat.exe with 7zip. Find HIDE87.com and extract it to desktop.
3. Copy HIDE87.com to C:\Windows\System32\
4. Open c:\windows\system32\autoexec.nt with notepad
5. At top of file, after first group of comments add the following
lh %SystemRoot%\system32\HIDE87.com
6. Add a comment above your last line
REM Fix for Gen. Protection Fault in win87em.dll
7. Save changes to autoexec.nt and reboot pc.
it doesn’t work
Really thank you, you saved my day
That saved my day! Thank you!!!
Excellent solution!
Thank you so much for help us saving 20000USD !
Bless you.
That was a really easy fix. Thank you for sharing!
I am so grateful for this thread! Thank you!!! I am just curious if anyone else is encountering dramatically slower responses after going through this process. The CAD program 16 bit that we have to run on an XP virtual machine is now lagging big time for each operation. Just wondering if there is a way around that.
You are the first to say anything about slowness issue. Personally I have not seen it after I corrected it on a few clients.
It is so strange. I have one Parallels Virtual Machine running Windows XP on my 2013 iMac OS SIERRA and I get not general protection fault errors…but when I moved the Virtual Machine to any other Mac in my network I get the error. Before I go through these “fix” steps everything functions lightening fast. Once I do these steps at every single step I take in the CAD program I get the hourglass and hanging? So strange.
Do I have the pieces of code in the right areas of the auto exec file?
@echo off
REM AUTOEXEC.BAT is not used to initialize the MS-DOS environment.
REM AUTOEXEC.NT is used to initialize the MS-DOS environment unless a
REM different startup file is specified in an application’s PIF.
lh %SystemRoot%\system32\HIDE87.com
REM Install CD ROM extensions
lh %SystemRoot%\system32\mscdexnt.exe
REM Install network redirector (load before dosx.exe)
lh %SystemRoot%\system32\redir
REM Install DPMI support
lh %SystemRoot%\system32\dosx
REM The following line enables Sound Blaster 2.0 support on NTVDM.
REM The command for setting the BLASTER environment is as follows:
REM SET BLASTER=A220 I5 D1 P330
REM where:
REM A specifies the sound blaster’s base I/O port
REM I specifies the interrupt request line
REM D specifies the 8-bit DMA channel
REM P specifies the MPU-401 base I/O port
REM T specifies the type of sound blaster card
REM 1 – Sound Blaster 1.5
REM 2 – Sound Blaster Pro I
REM 3 – Sound Blaster 2.0
REM 4 – Sound Blaster Pro II
REM 6 – SOund Blaster 16/AWE 32/32/64
REM
REM The default value is A220 I5 D1 T3 and P330. If any of the switches is
REM left unspecified, the default value will be used. (NOTE, since all the
REM ports are virtualized, the information provided here does not have to
REM match the real hardware setting.) NTVDM supports Sound Blaster 2.0 only.
REM The T switch must be set to 3, if specified.
SET BLASTER=A220 I5 D1 P330 T3
REM To disable the sound blaster 2.0 support on NTVDM, specify an invalid
REM SB base I/O port address. For example:
REM Fix for Gen. Protection Fault in win87em.dll
REM SET BLASTER=A0
HIDE87 is a really old file from Windows 3.1 days and is possible, I have not tried Parallels on OS X Sierra, don’t have them to test. But I have done this on VirtualBox and VMware Fusion and not any issues. Your config looks correct with HIDE87 loading high first, does the CD driver need to load high? Try making it load normal.
Hi, I used your solution in order to be able to operate my 16-bit program on my two computers. It worked perfectly on my Windows Seven 32 bits.
Alas, when I try the same thing on my VirtualBox in Windows XP 32 bits mode on my other computer (Windows 10), the solution works but at the cost of speed. My program (Autosketch 3.1) is almost unusable, just like for Pumpernickle.
Would you know a workaround ?
Thank you very much.
I downloaded the winfloat.exe file from conradshome.com/win31/archive with no problems but their is not a HIDE87.com file.
Their is HIDE87.ASM,HIDE87 MS DOS Appl, HIDE87.OBJ and HIDE87.MAK files. Which one should I use.
Thanks
Sounds like you may have the box checked on the view in Explorer. Organize > Folder and search options > View tab > un-check Hide extensions for known file types. The downloaded file has not changed and it is in there, the HIDE87 (MS Dos application) is he file you want.
Thank you. Worked perfectly.
Friends
WE had the same problem using virtualBox
so, we only uncheck in
Configuration, system, Procesor: PAE/NX
and fix the problem running old applications
Tried this for the game “Welcome to the Future” it loads up, but as soon as you move your head left or right, there is a divide by zero error. This is certainly not meant to be run on modern machines. I wonder if using a real 32 bit windows 10 installation would fix it?
the software I use requires a math processor. after I apply the changes the software cannot open. if there is another solution>_< thx
Could any one help me to fix general protection fault in module WIN 1340.EXT at 006C:58E7.
Thank you, its worked.
hide87.com will force software emulation of x87 instructions. It’s fine as long as the actual 16-bit program uses little floating point arithmetic. If not, probably a better solution would be masking SSE and FXSAVE from the guest VM.
Thanks !!!
It works fine on windows XP VMware Virtual Machine
Made short, my story is this: my game worked fine up to Windows XP included. On Windows 7 is my problem: whatever I type on “autoexec.nt”, the system asks me if I wanna save it, click “save”, it tells me “the autoexec.nt already exists, do I want to replace it?” I click “yes” and the answer is always “ACCESS IS DENIED”. Will you please tell me what should I do in this case ? The system doesn’t want to let me try any modifications !!! Thank you for your answer.
Hello,
the server for “winfloat.exe” seems to be done.
Can somebody help me to get this .exe?
Hi Marten. I managed to download the file from: http://www.gosoftware.com.au/download/winfloat.exe
I got the link from this document: http://www.gosoftware.com.au/support/win87em_dll_error.pdf
It was the only copy of the file I was able to find after an hour of google. It worked for my Win XP VM. Hope this helps.
Hi Mark,
thank you very much for your help!
It’s working perfectly.
Thanks you. I was blocked for 1 month with this problem on my virtualbox in xp sp3. Now i can use pp2000 without problem. Thanks you so much.
I m sorry for my english but i m french guy and i don t wrote for a long Times.
Hey I don’t have a file named autoexec.nt in my System32 Directory. What can i do? And I had also created the file autoexec.nt by myself (in a new notepad i had typed as lh SystemRoot%\system32\HIDE87.com) but the same error is showing for me. Please suggest some solution for this.
Have you copied the autoexec.nt to the Windows\system32 directory and rebooted?
Thank you very much!
works.
Works here in a virtual machine, runs windows 2000 PRO.
Thank you!
Worked great on a Win 10 1909 non VM machine.
Thank you!
It works. Thank you so much.
It worked on Win XP running in VB.
Greetings from Argentina!
Thank you so much
works well thank you
Brilliant! My old Toolbook apps from ’99 and earlier are all 16 Bit. It took some time to find your post, but thanks to you, 5 minutes later everything worked like a charm! You helped bringing old memories back to life!
(VMWare 17 Player, Win XP SP3)