United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6227246 Improve Windows unhandled structured exception reporting
JDK-6227246 : Improve Windows unhandled structured exception reporting

Details
Type:
Enhancement
Submit Date:
2005-02-09
Status:
Closed
Updated Date:
2012-10-13
Project Name:
JDK
Resolved Date:
2007-04-24
Component:
hotspot
OS:
windows
Sub-Component:
runtime
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
hs10 (b12)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
Hotspot registers structured exception handlers than handle both expected internally-used exceptions and unexpected exceptions.  One flavor of unexpected exception are those thrown by external libraries called via Java code such as customer native libraries or Windows system libraries.

In a non-Java application, when such an unexpected event occurs and the exception is not handled by the application, Windows displays the "Application Error" message box with a detailed decription of the exception.

In Hotspot, when an unhandled exception is encountered, we do not unwind to the Windows handler, but instead issue our own error report and terminate the process.  In some cases we may not provide as much error information as the Windows handler would have.  It should be investigated whether this situation can be improved.



###@###.### 2005-2-09 15:19:43 GMT

                                    

Comments
EVALUATION

Iimplemented Windows-only flag -XX+UseOSErrorReporting which allows 
us instead of running of our crash handler and dying, forward exception handling 
to the OS in case of actual crash.
                                     
2005-11-25
EVALUATION

Some of the changes to this fix weren't integrated or were merged out by mistake.
                                     
2006-08-07
EVALUATION

Fixed 6227246: Improve Windows unhandled structured exception reporting

This was fixed by adding a flag -XX:+UseOSErrorReporting which defaults to
false for the 6.0 release.  The fix in one of the files os_win32.cpp was
somehow not included the sources so the WER was never enabled.

The original change is modified to print the error reporting dialog for
guarantees and assertions as well and also prints out the hs_err file and
information to the screen before the WER dialog window is shown.

In the long term we want to get rid of UseOSErrorReporting and use WER
all the time.  Improvements are planned for this in dolphin under
bug number 6394477.  In this putback, I added an API for finding the
hs_err_pid file for use with WER.

Fix verified (y/n): y
Verified by: sent (1) error report to Microsoft using WER (more with later WER
work)
Also added bogus asserts/crashes in different places to verify the message box
(bogus crashes/asserts subsequently removed).

Webrev (includes this and other related fixes):
http://jruntime.east/~coleenp/webrev/6227246
                                     
2007-03-23



Hardware and Software, Engineered to Work Together