Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » UI component not reclaimed
UI component not reclaimed [message #139214] Fri, 03 July 2009 12:06 Go to next message
lsq  is currently offline lsq Friend
Messages: 40
Registered: July 2009
Member
hi all,
I am currently profiling a RAP application, I find a prominent leak
suspect when I drill down in the heap dump after manully terminates all
user session on a tomcat server, where the RAP application resides.
I find a org.eclipse.core.internal.registry.ExtensionRegistry instance
that keeps the UI components from beeing reclaimed. As the
ExtensionRegistry instance keeps track these UI objects indirectly.

From the heap dump I find that The ExtensionRegistry has a reference of
org.eclipse.core.runtime.ListenerList which keeps an array of
ExtensionRegistry$ListenerInfo, each of which keeps a typed listener.These
listeners according to the type can in turn reference e.g., Display
instance in the application and to other UI components. After analyze the
correlation between these objects, I find out that each new
WorkbenchWindow or a fresh user request will contribute to the
ExtensionRegistry a few entries with typed listeners, e.g., a
org.eclipse.ui.internal.registry.UIExtensionTracker instance keeps track
of a Display instance and then to UIThread and then ServiceContext. These
entries are not removed as they should be after the user sesion expired or
terminated.Similarly, org.eclipse.ui.internal.services.RegistryPersistence
as an entry in the Listener list prevents a WorkbenchWindow instance from
reclaimed.

There maybe something wrong with the registry (plugin.xml), but there is
no warning in the editor for these plugin.xml. The application is running
while the memory is leaking.

Thanks in advance for your help.
Re: UI component not reclaimed [message #139592 is a reply to message #139214] Tue, 07 July 2009 16:04 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Hi,

running a simple workbench application based on RAP 1.3 does not
leak memory.
Which version do you use?
Can you provide code that demonstrates the leak? If so, please file
a bugzilla with some standalone code attached.

Cheers,
Rüdiger


lsq wrote:
> hi all,
> I am currently profiling a RAP application, I find a prominent leak
> suspect when I drill down in the heap dump after manully terminates all
> user session on a tomcat server, where the RAP application resides.
> I find a org.eclipse.core.internal.registry.ExtensionRegistry instance
> that keeps the UI components from beeing reclaimed. As the
> ExtensionRegistry instance keeps track these UI objects indirectly.
>
> From the heap dump I find that The ExtensionRegistry has a reference of
> org.eclipse.core.runtime.ListenerList which keeps an array of
> ExtensionRegistry$ListenerInfo, each of which keeps a typed
> listener.These listeners according to the type can in turn reference
> e.g., Display instance in the application and to other UI components.
> After analyze the correlation between these objects, I find out that
> each new WorkbenchWindow or a fresh user request will contribute to the
> ExtensionRegistry a few entries with typed listeners, e.g., a
> org.eclipse.ui.internal.registry.UIExtensionTracker instance keeps track
> of a Display instance and then to UIThread and then ServiceContext.
> These entries are not removed as they should be after the user sesion
> expired or terminated.Similarly,
> org.eclipse.ui.internal.services.RegistryPersistence as an entry in the
> Listener list prevents a WorkbenchWindow instance from reclaimed.
>
> There maybe something wrong with the registry (plugin.xml), but there is
> no warning in the editor for these plugin.xml. The application is
> running while the memory is leaking.
>
> Thanks in advance for your help.
>
Re: UI component not reclaimed [message #139797 is a reply to message #139592] Thu, 09 July 2009 06:10 Go to previous messageGo to next message
lsq  is currently offline lsq Friend
Messages: 40
Registered: July 2009
Member
Thank you for your patience:
I have found out that it was my mistake by accepting a default
implemantation of a WorkbenchListener's preShutdown method which return
false as a common rule. The beforeDestroy method registered by
WorkbenchShutdownHandler quits processing earlier than it should, as a
result, informations registration entries are not removed as they should
be and still retain a significant part of UI componnets. For RAP 1.2 M7 I
am using the general approach for handling session expiration(or workbench
shut down) is to implement sessionstorelistener. While these listeners
are kept in a set(hashset), first problem is the calling order is
unpredictable, secondly these processing is rather streamlined and a
careless mistake can result in serious impact(e.g., a memory leak in my
case, 60% of the heap dump are kept by one single instance of
org.eclipse.core.internal.registry.ExtensionRegistry class.

Thanks a million!
Rüdiger Herrmann wrote:

> Hi,

> running a simple workbench application based on RAP 1.3 does not
> leak memory.
> Which version do you use?
> Can you provide code that demonstrates the leak? If so, please file
> a bugzilla with some standalone code attached.

> Cheers,
> Rüdiger


> lsq wrote:
>> hi all,
>> I am currently profiling a RAP application, I find a prominent leak
>> suspect when I drill down in the heap dump after manully terminates all
>> user session on a tomcat server, where the RAP application resides.
>> I find a org.eclipse.core.internal.registry.ExtensionRegistry instance
>> that keeps the UI components from beeing reclaimed. As the
>> ExtensionRegistry instance keeps track these UI objects indirectly.
>>
>> From the heap dump I find that The ExtensionRegistry has a reference of
>> org.eclipse.core.runtime.ListenerList which keeps an array of
>> ExtensionRegistry$ListenerInfo, each of which keeps a typed
>> listener.These listeners according to the type can in turn reference
>> e.g., Display instance in the application and to other UI components.
>> After analyze the correlation between these objects, I find out that
>> each new WorkbenchWindow or a fresh user request will contribute to the
>> ExtensionRegistry a few entries with typed listeners, e.g., a
>> org.eclipse.ui.internal.registry.UIExtensionTracker instance keeps track
>> of a Display instance and then to UIThread and then ServiceContext.
>> These entries are not removed as they should be after the user sesion
>> expired or terminated.Similarly,
>> org.eclipse.ui.internal.services.RegistryPersistence as an entry in the
>> Listener list prevents a WorkbenchWindow instance from reclaimed.
>>
>> There maybe something wrong with the registry (plugin.xml), but there is
>> no warning in the editor for these plugin.xml. The application is
>> running while the memory is leaking.
>>
>> Thanks in advance for your help.
>>
Re: UI component not reclaimed [message #139808 is a reply to message #139797] Thu, 09 July 2009 06:21 Go to previous messageGo to next message
lsq  is currently offline lsq Friend
Messages: 40
Registered: July 2009
Member
A better approach I think is to do a thorough clean up under any
circumstances, irrelevant to any user defined hooks , as the application
is using limited resources for multiple user sessions instead of just for
a single user in a desktop application.
Re: UI component not reclaimed [message #1400822 is a reply to message #139214] Mon, 14 July 2014 19:19 Go to previous message
Mario Marinato is currently offline Mario MarinatoFriend
Messages: 38
Registered: March 2011
Location: Brazil
Member
Hi,

How did you solve this issue? I develop an RCP application and I'm facing the same problem with my views. When they are closed, they're still referenced by the org.eclipse.core.internal.registry.ExtensionRegistry instance.

Thanks,


Mário Marinato
From Brazil
Previous Topic:FileDialog
Next Topic:Object null within Qooxdoo code
Goto Forum:
  


Current Time: Thu Apr 25 11:33:39 GMT 2024

Powered by FUDForum. Page generated in 0.03555 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top