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 76035 - Code completion doesn't work with some of large projects
Summary: Code completion doesn't work with some of large projects
Status: CLOSED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 5.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-06 15:14 UTC by soldatov
Modified: 2010-02-01 10:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2006-05-06 15:14:48 UTC
Steps:
- Create new C/C++ Appplication project
- Push "File|Add Existing Item..." menu
- Select all *.cc files from Freeway project (project from SunStudio11) and add
to "Source Files" project
- Push "File|Add Existing Item..." menu
- Select all *.h files from Freeway project and add to "Header Files" project
- Open maniac.cc file in built-in editor
- Move cursor at 51-th line
- Press "ctrl-space" (code completion)
"Please wait..." message arisen and hidden after 5 second. But code completion
list does not appears.

- cat ~/.netbeans/5.0/var/log/messages.log

java.lang.NullPointerException
        at
org.netbeans.modules.cnd.api.model.util.CsmSortUtilities.compareFunctions(CsmSortUtilities.java:355)
        at
org.netbeans.modules.cnd.api.model.util.CsmSortUtilities.access$400(CsmSortUtilities.java:36)
        at
org.netbeans.modules.cnd.api.model.util.CsmSortUtilities$NaturalMemberNameComparator.compare(CsmSortUtilities.java:216)
        at java.util.Arrays.mergeSort(Arrays.java:1307)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.mergeSort(Arrays.java:1295)
        at java.util.Arrays.sort(Arrays.java:1223)
        at java.util.Collections.sort(Collections.java:159)
        at
org.netbeans.modules.cnd.api.model.util.CsmSortUtilities.sortMembers(CsmSortUtilities.java:101)
        at
org.netbeans.modules.cnd.completion.csm.CsmProjectContentResolver.getLibElements(CsmProjectContentResolver.java:208)
        at
org.netbeans.modules.cnd.completion.csm.CsmProjectContentResolver.getLibFunctions(CsmProjectContentResolver.java:180)
        at
org.netbeans.modules.cnd.completion.csm.CompletionResolverImpl.getLibFunctions(CompletionResolverImpl.java:326)
        at
org.netbeans.modules.cnd.completion.csm.CompletionResolverImpl.resolveContext(CompletionResolverImpl.java:215)
        at
org.netbeans.modules.cnd.completion.csm.CompletionResolverImpl.resolve(CompletionResolverImpl.java:139)
        at
org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.resolveItem(CsmCompletionQuery.java:755)
        at
org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery$Context.resolveExp(CsmCompletionQuery.java:682)
        at
org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.getResult(CsmCompletionQuery.java:173)
        at
org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.query(CsmCompletionQuery.java:160)
        at
org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.query(CsmCompletionQuery.java:90)
        at org.netbeans.editor.ext.Completion.performQuery(Completion.java:589)
        at org.netbeans.editor.ext.Completion.access$700(Completion.java:47)
        at org.netbeans.editor.ext.Completion$1QueryTask.run(Completion.java:515)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Comment 1 Vladimir Kvashin 2006-05-08 16:25:07 UTC
There is more easy example. Type the following in some file;
then invoke completion inside foo() function body

namespace AAA {
}

void AAA_foo(AAA a) {
}

void foo() {
    // incvoke completion here.
}
Comment 2 Vladimir Kvashin 2006-05-08 17:21:52 UTC
Fixed. Affected files: 
- CsmSortUtilities.java
- TypeImpl.java
Commited into CVS.
Comment 3 Alexander Pepin 2008-01-25 18:37:02 UTC
verified in NB6.0