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.

Bug 147352 - HierarchyTopComponent$ResolvableHelper is loaded during 2nd NetBeans startup
Summary: HierarchyTopComponent$ResolvableHelper is loaded during 2nd NetBeans startup
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords: PERFORMANCE, TEST
Depends on:
Blocks:
 
Reported: 2008-09-16 11:22 UTC by Alexander Kouznetsov
Modified: 2009-10-01 00:52 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stacktrace (4.48 KB, text/plain)
2008-09-16 11:24 UTC, Alexander Kouznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kouznetsov 2008-09-16 11:22:04 UTC
Performance test reports that the following class is loaded during 2nd NetBeans startup without any projects opened.

org.netbeans.modules.cnd.navigation.hierarchy.HierarchyTopComponent$ResolvableHelper

Please don't load this class.

This issue is based on the following jtulach's comment: Bug in cnd. Looks like useless deserialization.
Comment 1 Alexander Kouznetsov 2008-09-16 11:24:08 UTC
Created attachment 69930 [details]
Stacktrace
Comment 2 Vladimir Kvashin 2008-09-16 22:17:23 UTC
As I understand, it reproduces as follows: 
1. launch NB, open a C/C++ project, invoke type or header hierarchy
2. close all projects, close IDE
3. open IDE with options
-J-verbose:class 2>&1 | grep ResolvableHelper

See that the class is loaded.

If you don't open C/C++ projects or never invoke hierarchy, 
the class is not loaded.

Do I understand the issue correctly?

Anyhow, I see no reason for this to be P3.
Comment 3 Alexander Kouznetsov 2008-09-17 10:07:22 UTC
The class is loaded when there are no projects opened. So this is considered as P3 issue.
Comment 4 Tomas Pavek 2008-09-17 10:16:51 UTC
There is no C/C++ project opened during the first start - the IDE is just closed. So there seems to be no reason to 
have the HierarchyTopComponent trying to deserialize during the second start. Can you find out why it happens?
Comment 5 Alexander Simon 2008-09-18 07:38:24 UTC
Be consistent. Compare with IZ#146490. So it is P4.
Comment 6 Jaroslav Tulach 2008-09-18 12:55:07 UTC
We are consistent. At the same time as this issue we reported P3 issue 147355 against core/palette.
Comment 7 Alexander Simon 2008-09-18 13:27:44 UTC
I think that this bug is a part of  IZ#127408 because I see following loaded classes (first and second start without
projects):
[Loaded org.netbeans.modules.cnd.navigation.hierarchy.HierarchyAction from
jar:file:/export/home/as204739/main/nbbuild/netbeans/cnd2/modules/org-netbeans-modules-cnd-navigation.jar!/]
[Loaded org.netbeans.modules.cnd.navigation.hierarchy.HierarchyTopComponent from
jar:file:/export/home/as204739/main/nbbuild/netbeans/cnd2/modules/org-netbeans-modules-cnd-navigation.jar!/]
[Loaded org.netbeans.modules.cnd.navigation.hierarchy.HierarchyTopComponent$ResolvableHelper from
jar:file:/export/home/as204739/main/nbbuild/netbeans/cnd2/modules/org-netbeans-modules-cnd-navigation.jar!/]

Comment 8 Alexander Simon 2008-09-18 13:31:40 UTC
So, if I change:
    public @Override int getPersistenceType() {
        return TopComponent.PERSISTENCE_ALWAYS; //-> to TopComponent.PERSISTENCE_ONLY_OPENED
    }
It do not fix redundant loading.
Comment 9 Alexander Kouznetsov 2008-09-30 19:45:43 UTC
Updated priority to keep consistency.
Comment 10 Leonid Lenyashin 2009-09-28 12:45:11 UTC
Please evaluate
Comment 11 Vladimir Voskresensky 2009-09-28 15:43:22 UTC
fixed
http://hg.netbeans.org/cnd-main?cmd=changeset;node=4e6c49097068
Comment 12 Quality Engineering 2009-10-01 00:52:10 UTC
Integrated into 'main-golden', will be available in build *200909301401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4e6c49097068
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed IZ#147352: HierarchyTopComponent$ResolvableHelper is loaded during 2nd NetBeans startup