JDK-4739681 : Assertion failure in awt_TopLevel.c
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2002-08-30
  • Updated: 2002-09-20
  • Resolved: 2002-09-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Relates :  
Relates :  
Description

Name: dmR10075			Date: 08/30/2002



Use the following test case:
import java.awt.*;

public class Test {
    public static void main(String[] args) {
        Frame f = new Frame("Frame");
        Window w = new Window(f);
        f.setVisible(true);
        w.setVisible(true);
        try {
            Thread.sleep(1000);
        } catch( Exception e ) {
        }
        f.dispose();
        w.dispose();
    }
}

to reproduce the problem.
1. Compile and run the test with java_g
2. Program will exit with Assertion failure message.
Assert fail in file ../../../src/solaris/native/sun/awt/awt_TopLevel.c, line 2164
        toplevel != NULL
Assertion failed: FALSE, file ../../../src/share/native/sun/awt/debug/debug_assert.c, line 24

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis
24-08-2004

EVALUATION Name: dmR10075 Date: 08/30/2002 This assertion is erroneous - it fails on condition which belongs to normal program control flow. It should be removed. ###@###.### 2002-08-30 ======================================================================
30-08-2002

SUGGESTED FIX Name: dmR10075 Date: 08/30/2002 *** /tmp/geta23730 Mon Aug 19 17:49:57 2002 --- awt_TopLevel.c Mon Aug 19 17:47:38 2002 *************** *** 2067,2075 **** struct FrameData *pdata; struct WidgetInfo* winfo; Widget toplevel = findTopLevelByShell(parentShell); - DASSERT(toplevel != NULL); if (toplevel == NULL) { ! // Huh - has already been deleted? return; } winfo = findWidgetInfo(toplevel); --- 2069,2076 ---- struct FrameData *pdata; struct WidgetInfo* winfo; Widget toplevel = findTopLevelByShell(parentShell); if (toplevel == NULL) { ! // Has already been deleted or it is topmost shell return; } winfo = findWidgetInfo(toplevel); ###@###.### 2002-08-30 ======================================================================
30-08-2002