General Protection Fault in module WIN87EM.DLL at 0001:02C6

Discussions about using Windows guests in VirtualBox.

General Protection Fault in module WIN87EM.DLL at 0001:02C6

Postby cwsault » 21. Jan 2014, 03:36

Encountered this error when performing some operations with 16-bit software on a Windows XP guest:

General Protection Fault in module WIN87EM.DLL at 0001:02C6

I found this solution for the problem if I were running under VMware (apparently I'm not allowed to post URLs in my first post, so I am pasting it instead):

There are a few applications which may fail with this error when executed in a VM. The problem is that the library tries to read the instruction bytes of the last FPU instruction executed based on the code segment and instruction pointer saved in the FPU environment. Unfortunately, the code segment saved in the FPU environment may be NULL.



When we switch between the virtual machine monitor and the host operating system, we use the primitive hardware instructions to save and restore the FPU state. These instructions were not really designed for an environment that mixes 32-bit and 64-bit execution. When the instructions are executed in 64-bit mode, they don't keep track of the code segment, since segments have little meaning in 64-bit mode. The virtual machine monitor, which saves and restores the FPU state for the guest VM, executes in 64-bit mode. Hence, the FPU code segment is lost.



Fortunately, there is a workaround for this issue. If you add the following option to your configuration file, we will make sure that the FPU code segment is properly saved and restored when switching between the virtual machine monitor and the host operating system (at some small performance penalty):



monitor_control.enable_rigorous_fpu_save_restore = TRUE


However, I have been unable to discover whether VirtualBox has a similar option, and if so, how to enable it. Is there any way to accomplish this, or any other solution to this issue under VirtualBox?
cwsault
 
Posts: 2
Joined: 21. Jan 2014, 03:31

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby SteveDeveloper » 25. Jan 2014, 20:08

Same Problem but my GPF is at address 0001:02C9 (maybe a different version of WIN87EM.DLL?). I never had this issue through Release 4.2.18. It started when I upgraded to 4.3.4 and still have it in 4.3.6. The only reference I ever found to this was the VMWare explanation in the original post. I've been actively maintaining a very large 16-bit project since 1994 (yes my life sucks) and see this error randomly every day. I too was hoping it could be fixed with a VBoxManage setting.
Host: Win 8.1, Guest: Win XP
Here are the before and after logs:

LAST VM 4_2_18 XPHome-2013-11-28-11-56-27.log
Last 4.2.18 Log
(88.27 KiB) Downloaded 278 times


NEW VM 4_3_4 XPHome-2013-12-04-13-40-50.log
First 4.3.4 Log
(58.71 KiB) Downloaded 130 times
SteveDeveloper
 
Posts: 5
Joined: 25. Jan 2014, 19:52

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby michaln » 27. Jan 2014, 13:47

Please open a ticket for this on the public bug tracker. It's far better for tracking defects than the forum and that's why we have it.
michaln
Oracle Corporation
 
Posts: 2966
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby SteveDeveloper » 27. Jan 2014, 20:00

Ticket #12646 "XP Guest GPF in WIN87EM.DLL at 0001:02C9 or 0001:02C6" created.
SteveDeveloper
 
Posts: 5
Joined: 25. Jan 2014, 19:52

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby michaln » 28. Jan 2014, 01:11

Great, thanks. However, one thing is missing -- how to reproduce the problem? Or in other words, how do we tell if it exists or not?
michaln
Oracle Corporation
 
Posts: 2966
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby SteveDeveloper » 28. Jan 2014, 06:20

I'll see if I can find a safe old large 16 bit app that's easy to download and triggers the GPF. The problem is with 16 bit apps (using NTVDM\WOW). It is random, but I'm sure there must be some pattern. I have one app that triggers it about every 3 or 4 times I run it. In another it just appears random. Both apps are fairly large (multiple MB). I tried testing with an old 16bit version of notepad.exe but did not see the GPF.
SteveDeveloper
 
Posts: 5
Joined: 25. Jan 2014, 19:52

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby michaln » 28. Jan 2014, 14:42

I assume the app must use floating-point math to trigger this fault, and that won't happen with Notepad or probably any other applet shipped with Windows. It may also depend on math fault handling in the app.
michaln
Oracle Corporation
 
Posts: 2966
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby FinnChr » 29. Jan 2014, 05:15

SteveDeveloper wrote:Same Problem but my GPF is at address 0001:02C9...


Same address here and using Win 2000 in a VB 4.3.6 r91406 (Win7 64 bit Host).

Try to run old ~1992 application for show maps (local maps in Denmark).

New here..
FinnChr
 
Posts: 5
Joined: 29. Jan 2014, 04:52
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Win 2000 & Unbutu 12.04

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby michaln » 29. Jan 2014, 15:20

FinnChr wrote:Try to run old ~1992 application for show maps (local maps in Denmark).

How?
michaln
Oracle Corporation
 
Posts: 2966
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby FinnChr » 29. Jan 2014, 19:00

michaln wrote:
FinnChr wrote:Try to run old ~1992 application for show maps (local maps in Denmark).

How?


Sorry.. "I am trying to run... ". I get this GPF every time I try to connect this 16 bit app to maps - set the path to the maps. I have run the app first on Win NT and later on Win 2000 for more than 15 years now.. now move all old apps to VirtualBox.

This app "Visit" all in Danish are fairly large from ~1 MB with one map to all maps >15 MB.

From log...
Application popup: Application Error : VISIT caused a General Protection Fault in
module WIN87EM.DLL at 0001:0291.
FinnChr
 
Posts: 5
Joined: 29. Jan 2014, 04:52
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Win 2000 & Unbutu 12.04

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby michaln » 30. Jan 2014, 11:43

FinnChr wrote:I get this GPF every time I try to connect this 16 bit app to maps - set the path to the maps.

OK, that sounds like you have a reliable way to reproduce the problem, which is great... but unless you're planning to fix it yourself, that doesn't help much.

The question is how can we (VirtualBox developers) reproduce the problem? Is the map application available somewhere? Can you provide a test VM?
michaln
Oracle Corporation
 
Posts: 2966
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby FinnChr » 31. Jan 2014, 04:17

michaln wrote:The question is how can we (VirtualBox developers) reproduce the problem? Is the map application available somewhere? Can you provide a test VM?


In a rush..

Nothing on WWW for download - and it's not free or shareware. This app was made in the 'floppy-age'.. some floppy holding install and 1-1x 650 MB CD's with maps.

More than ~20 years back in time it was to expensive and use lot of space, if you install maps on very small HDD, so I think some must have run the app from the HDD and maps from the CD - but all can run from HDD.

Easy to install and make the test. Think VirtualBox with out of the box Win 2000 and even the Win Xp both will show the GPF.. and no localization problem to worry about - I use UK/US Windows.

Haven't the time to make the test VM.. and can't work on it, find and fix the error just now. Will find a solution with links for VirtualBox developers to download the install + one map + translate some of the danish in the steps for reproduce the GPF.

For now I have only found one candidate to the error. Before W2K you see the WIN87EM.DLL in System folder (16 bit), and from W2K the WIN87EM.DLL move to System32 folder and now 32 bit - came back 24-36 hours from now.
FinnChr
 
Posts: 5
Joined: 29. Jan 2014, 04:52
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Win 2000 & Unbutu 12.04

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby cwsault » 31. Jan 2014, 08:07

michaln wrote:
FinnChr wrote:I get this GPF every time I try to connect this 16 bit app to maps - set the path to the maps.

OK, that sounds like you have a reliable way to reproduce the problem, which is great... but unless you're planning to fix it yourself, that doesn't help much.

The question is how can we (VirtualBox developers) reproduce the problem? Is the map application available somewhere? Can you provide a test VM?


I have a copy of software that causes this issue for me, and instructions for reproduction... should I post the copy of the software here, as it's no longer even sold (it is "Accountant's Trial Balance" -- see https://aicpa-sco.custhelp.com/app/answ ... il/a_id/86 )? Or create a VM for you and upload the disk/settings for that?
cwsault
 
Posts: 2
Joined: 21. Jan 2014, 03:31

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby michaln » 31. Jan 2014, 12:27

A pre-configured test VM would be much preferred. If you can upload it somewhere, please PM me with details.
michaln
Oracle Corporation
 
Posts: 2966
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: General Protection Fault in module WIN87EM.DLL at 0001:0

Postby FinnChr » 31. Jan 2014, 19:30

Upload just now the install + one map + and instructions for reproduction the GPF.

Download size ~375 MB and upload can take around 4-5 hours - link for download follow.
FinnChr
 
Posts: 5
Joined: 29. Jan 2014, 04:52
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Win 2000 & Unbutu 12.04

Next

Return to Windows Guests

Who is online

Users browsing this forum: No registered users and 21 guests