Community
Participate
Working Groups
Build Identifier: RAP 1.3 There are 3 static WizardRegisties in WorkbenchPlugin. I think we must to dispose them while Workbench is closing (Workbench.shutdown()) and reseting WorkbenchPlugin. Supposed patch is applied. Reproducible: Always
Created attachment 179493 [details] WorkbenchPlugin patch
Actually, this WizardRegisties should be SessionSingletons and the proposed patch isn't full fixes for the issue. But anyway, wizards registries must be disposed on workbench shutdown to prevent memory leaks.
Could you explain why these registries should have session scope? As far as I can see, they only keep wizard descriptors that are read from the extension registry, but do not reference any display.
Ralf, I mean that these registries shouldn't be singletons. They are created once than user start session (workbench starting) and should be disposed on session ending (workbench shutdown). If we keep them singletons - first user load wizard descriptors/categories and localize their names (and other parameters) using its own locale settings, second user will get these cached registries in singleton instances. Than I sad SessionSingletons it doesn't exactly consider using SessionSingletonBase class, but mean read registries on user session start and dispose them on its ending. For example, we get this problem for "Other" wizard category. Investigating this problem encourage me to file this issue. Best regards, Yury.
Created attachment 185975 [details] Patch to make wizard registries session singletons I see that these three registries should be session singletons: * ExportWizardRegistry * ImportWizardRegistry * NewWizardRegistry However, AbstractExtensionWizardRegistry#dispose() is never called in RCP. I wonder if we have to. With the patch the registries seem to be cleaned up at session timeout already.
Yury, would be great if you could have a look at the patch. Let me know whether it works for you.
Hi, Ralf. I've checked your fixes and it works. But one moment we have to do also: WizardsRegistryReader.UNCATEGORIZED_WIZARD_CATEGORY_LABEL static field should be removed and WorkbenchMessages.get().NewWizardsRegistryReader_otherCategory should be used in WizardsRegistryReader.moveElementToUncategorizedCategory method (for correct localization). Best regards, Yury.
Good catch! Thanks for the feedback. Applied 2nd patch to CVS HEAD and inlined the constant as suggested.