United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7082294 nsk/regression/b4265661 crashes on windows
7082294 : nsk/regression/b4265661 crashes on windows

Details
Type:
Bug
Submit Date:
2011-08-23
Status:
Closed
Updated Date:
2012-03-20
Project Name:
JDK
Resolved Date:
2012-03-20
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7u2,8
Fixed Versions:
7u4

Related Reports
Backport:

Sub Tasks

Description
Originally observed on HS22 b02 JDK 7u2 b03 PIT and I was able to reproduce the crash after 112 iterations on the vm-x4170-01a machine. The crash is reproducible with both product and fastdebug bits with UTE and '-server -Xmixed' VM options.

                                    

Comments
SUGGESTED FIX

http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/c5618ec76f11
                                     
2012-02-14
EVALUATION

The reason is double attempt to delete GDI font in AwtFont::Dispose() method from:
1. pDataDisposeMethod() -> AwtObject::_Dispose() -> WM_AWT_DISPOSE-> AwtFont::Dispose()
2. AwtToolkit::Dispose() -> AwtObjectList::Cleanup() -> AwtFont::Dispose()
After the first GDI font deletion we don't mark font handle (m_hFont[i]) as invalid to avoid further deletion attempts
and what is worse delete m_hFont array making this pointer invalid for further calls of AwtFont::Dispose() and other methods.
                                     
2012-01-17
EVALUATION

Seems like an attempt to delete GDI object (Font) that is used from another thread at the same time.
Going to research it further...
                                     
2011-12-12
EVALUATION

[2011-08-20T03:49:20.58] # The crash happened outside the Java Virtual Machine in native code.
[2011-08-20T03:49:20.58] # See problematic frame for where to report the bug.
[2011-08-20T03:49:20.58] #
[2011-08-20T03:49:20.58] *********************
[2011-08-20T03:49:20.77] AWT Assertion Failure
[2011-08-20T03:49:20.77] *********************
[2011-08-20T03:49:20.77] ::DeleteObject(font)
[2011-08-20T03:49:20.77] File '../../../src/windows/native/sun/windows/awt_Font.cpp', at line 164

Looks like an AWT bug from the error report.
                                     
2011-12-08
EVALUATION

Transferring to AWT for closer inspection.
                                     
2011-12-08



Hardware and Software, Engineered to Work Together