This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Memory Leak - Dangling references to JTextFields from sun.awt.X11.XInputMethod field needResetXICClient | ||
---|---|---|---|
Product: | ide | Reporter: | honza.hubeny |
Component: | Performance | Assignee: | Tomas Hurka <thurka> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | chemFelix, jglick |
Priority: | P2 | ||
Version: | 7.0 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
The netbeans RCP test suite to reproduce the problem
requested java heap dump |
Can you attach compressed heap dump? Note also that you can use NetBeans to analyze the heap dump instead of jhat. Hi, I'm sorry to not respond for a long time. I have attached the heap dump. The heap dump was created after closing the MemLeakTopComponent and after invoking the garbage collector (as was described in the first bug comment). Meanwhile I changed a little bit the testing envornment: java version "1.7.0" Java(TM) SE Runtime Environment (build 1.7.0-b147) Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode) netbeans IDE 7.0.1, rcp platform 7.0 OS: Linux kernel version 2.6.38 Java L&F: metal Created attachment 109784 [details]
requested java heap dump
Closing as wontfix. The problem is in JDK and should be fixed there. *** Bug 205254 has been marked as a duplicate of this bug. *** *** Bug 245072 has been marked as a duplicate of this bug. *** |
Created attachment 108886 [details] The netbeans RCP test suite to reproduce the problem This bug was tested on following configuration: java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode) netbeans IDE & platform 7.0 OS: Linux kernel version 2.6.38 Java L&F: metal Bug description: In the attachment is simple test suite with test module. The test module contains one top component which is automatically opened on the startup of the RCP application. The top Component contains JTextField and JFormattedTextField. After the application start click with mouse to the JTextField or to the JFormattedTextField. When the text field has focus close the top component. After closing the top component click on the memory panel in order to invoke the garbage collection. After the garbage collection analyze the java heap with jmap and jhat utils (see the script java_mem_leak.sh in the attachment). You can see that the MemLeakTopComponent is still on the heap. When you check the root set references you can see that the cause is the reference from sun.awt.X11.XInputMethod field needResetXICClient to the jTextField or JFormattedTextField (see the atached memleak.html page). I suppose that the needResetXICClient field is not correctly cleared when the MemLeakTopComponent is closed. When you open several MemleakTopComponents and close them all, only the last top component remains in memory.