Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 62321 - [EditorMgmt] Editor leak by listeners
Summary: [EditorMgmt] Editor leak by listeners
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 RC1   Edit
Assignee: Christof Marti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-14 13:53 EDT by Christof Marti CLA
Modified: 2004-05-26 11:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christof Marti CLA 2004-05-14 13:53:48 EDT
Found two paths to a CUE via listeners after closing all editors:

GC Roots -> Object CompilationUnitEditor #00418c1e: Reverse Paths

  |
  +---org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor (#00418c1e)
    |
    +---fJavaEditor of
org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater (#0112a087)
    | |
    | +---[1]  of java.lang.Object[10] (#00d28683)
    |   |
    |   +---listeners of org.eclipse.jface.util.ListenerList (#00bef2b0)
    |     |
    |     +---fListeners of
org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager (#016b321b)
    |       |
    |       +---fProblemMarkerManager of org.eclipse.jdt.internal.ui.JavaPlugin
(#0048869d)
    |         |
    |         +---fgJavaPlugin of org.eclipse.jdt.internal.ui.JavaPlugin (#013c5d59)
    |
    +---this$0 of
org.eclipse.ui.texteditor.AbstractTextEditor$PropertyChangeListener (#003f578f)
      |
      +---[0]  of java.lang.Object[1] (#004b5c10)
        |
        +---listeners of org.eclipse.jface.util.ListenerList (#01829eea)
          |
          +---fClientListeners of
org.eclipse.ui.texteditor.ChainedPreferenceStore (#0005e8d2)
            |
            +---this$0 of
org.eclipse.ui.texteditor.ChainedPreferenceStore$PropertyChangeListener (#008086e8)
              |
              +---[0]  of java.lang.Object[15] (#00232228)
                |
                +---listeners of org.eclipse.jface.util.ListenerList (#00342ac2)
                  |
                  +---listeners of
org.eclipse.ui.plugin.AbstractUIPlugin$CompatibilityPreferenceStore (#0018cce6)
                    |
                    +---preferenceStore of
org.eclipse.ui.internal.editors.text.EditorsPlugin (#00f45f16)
                      |
                      +---fgInstance of
org.eclipse.ui.internal.editors.text.EditorsPlugin (#01a46f50)


--------------------------------------------------------------------------------

GC Roots -> Object CompilationUnitEditor #00418c1e: Direct Paths

  |
  +---org.eclipse.jdt.internal.ui.JavaPlugin (#013c5d59)
  | |
  | +---fgJavaPlugin org.eclipse.jdt.internal.ui.JavaPlugin (#0048869d)
  |   |
  |   +---fProblemMarkerManager
org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager (#016b321b)
  |     |
  |     +---fListeners org.eclipse.jface.util.ListenerList (#00bef2b0)
  |       |
  |       +---listeners java.lang.Object[10] (#00d28683)
  |         |
  |         +---[1] 
org.eclipse.jdt.internal.ui.javaeditor.JavaEditorErrorTickUpdater (#0112a087)
  |           |
  |           +---fJavaEditor
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor (#00418c1e)
  |
  +---org.eclipse.ui.internal.editors.text.EditorsPlugin (#01a46f50)
    |
    +---fgInstance org.eclipse.ui.internal.editors.text.EditorsPlugin (#00f45f16)
      |
      +---preferenceStore
org.eclipse.ui.plugin.AbstractUIPlugin$CompatibilityPreferenceStore (#0018cce6)
        |
        +---listeners org.eclipse.jface.util.ListenerList (#00342ac2)
          |
          +---listeners java.lang.Object[15] (#00232228)
            |
            +---[0] 
org.eclipse.ui.texteditor.ChainedPreferenceStore$PropertyChangeListener (#008086e8)
              |
              +---this$0 org.eclipse.ui.texteditor.ChainedPreferenceStore
(#0005e8d2)
                |
                +---fClientListeners org.eclipse.jface.util.ListenerList (#01829eea)
                  |
                  +---listeners java.lang.Object[1] (#004b5c10)
                    |
                    +---[0] 
org.eclipse.ui.texteditor.AbstractTextEditor$PropertyChangeListener (#003f578f)
                      |
                      +---this$0
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor (#00418c1e)
Comment 1 Kai-Uwe Maetzel CLA 2004-05-17 04:19:01 EDT
Could not reproduce. Code path works fine in the close and close all scenario. 
Suspect thrown exception in the path.
Comment 2 Christof Marti CLA 2004-05-17 07:12:18 EDT
I200405131600

The only exceptions I saw where three BundleExceptions. It acctually looks like
the editor's dispose() method was never called.

Reopening and moving to Platform/UI.
Comment 3 Christof Marti CLA 2004-05-18 04:27:56 EDT
Found again with I200405171219 with ZRH plugin-export 200405170827.
Comment 4 Michael Van Meekeren CLA 2004-05-18 09:46:20 EDT
stefan, have you seen this?
Comment 5 Michael Van Meekeren CLA 2004-05-18 16:56:24 EDT
Christof could you provide simpler steps to show when an editor dispose method 
is not called?

Comment 6 Christof Marti CLA 2004-05-19 06:56:34 EDT
I found this situation only after working for some time and unfortunately cannot
provide steps to reproduce.
Comment 7 Stefan Xenos CLA 2004-05-21 14:18:05 EDT
All of these listeners seem to be registered by and in JDT components.
Comment 8 Dani Megert CLA 2004-05-24 05:23:57 EDT
please provide more details
Comment 9 Kai-Uwe Maetzel CLA 2004-05-24 11:20:13 EDT
Stefan, the issue ist not that the listeners are JDT or text listeners but 
that the IWorkbenchPart.dispose method is apparently not called. We checked 
that all listeners are correctly removed, when dispose is called.
Comment 10 Christof Marti CLA 2004-05-25 12:53:20 EDT
I've been running M9 for two days now and cannot find the described leak
anymore. I'll check again.
Comment 11 Christof Marti CLA 2004-05-26 11:42:06 EDT
Cannot reproduce. Closing.