Bug 22044 - Out of memory after prolonged plugin usage (and having performed many builds)
Summary: Out of memory after prolonged plugin usage (and having performed many builds)
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-30 11:43 EDT by Andrew Clement CLA
Modified: 2002-09-19 07:31 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2002-07-30 11:43:00 EDT
If the plugin is used in anger and the user performs many compiles, a dialog 
appears reporting that eclipse has run out of memory.  I have personally seen 
it after 30minutes usage (whilst giving a demo!).  The underlying problem is 
perhaps a memory leak in the AspectJ outline view that reflects the 
crosscutting view for the current file being edited - this view is updated for 
every compile and may be hanging on to previous versions of its contents.
Comment 1 Andrew Clement CLA 2002-08-30 03:18:51 EDT
This may be because getContentOutline (defined in the content outline page 
class) just asks AJDE for new structure views, it never tells AJDE to discard 
old views.  The structure view manager in AJDE maintains a List of views which 
is added to each time createViewForSourceFile() is called.  The obvious part of 
the fix is to tell the structure view manager to delete a view just before 
building another one.

However, when this was applied to Adrians codebase, there were problems with 
the callback onto the outline page not being invoked when the model was updated 
(e.g. by adding a private field) - this appeared to be because the setRenderer
() call made just after calling createViewForSourceFile was not being invoked - 
the fix here being to remove the condition check that prevents setRenderer 
being called in some circumstances.  However, retrying the first part of the 
fix today (i.e. just deleting views from the svManager) seems to be 
sufficient.  

I wonder if we were guarding the setRenderer calls *because* of the problem of 
leaving multiple views for the same file registered with the structure view 
manager.  If we did that then the outline page code would potentially be 
getting multiple calls back from AJDE (one for each view that has been left 
with the svManager).  If we correctly delete views, can we remove the guard ???
Comment 2 Adrian Colyer CLA 2002-09-19 07:31:33 EDT
The guard can be removde and this problem should now be resolved. Fix is in 
binary 0.5.2 drop.